changeset 1605:75b8e7737bcd

Added support for SID-plugin specific Tuplez format string (see config dialog). Still need to add descriptions of the fields.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 06 Sep 2007 02:52:33 +0300
parents b46e7f445e88
children 331b0614951b 4a03fd025aa2 d6d8e3cd23c5
files src/sid/xmms-sid.c src/sid/xmms-sid.glade src/sid/xs_config.c src/sid/xs_genui.h src/sid/xs_interface.c
diffstat 5 files changed, 289 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/src/sid/xmms-sid.c	Wed Sep 05 22:44:25 2007 +0300
+++ b/src/sid/xmms-sid.c	Thu Sep 06 02:52:33 2007 +0300
@@ -88,7 +88,7 @@
 XS_MUTEX(xs_status);
 static XS_THREAD_T xs_decode_thread;
 
-Tuple * xs_get_song_tuple_info(gchar *songFilename, gint subTune);
+void xs_get_song_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune);
 
 /*
  * Error messages
@@ -460,11 +460,12 @@
 	/* Set song information for current subtune */
 	XSDEBUG("foobar #1\n");
 	xs_status.sidPlayer->plrUpdateSIDInfo(&xs_status);
-	XSDEBUG("foobar #2\n");
 	XS_MUTEX_UNLOCK(xs_status);
-	tmpTuple = xs_get_song_tuple_info(tmpTune->sidFilename, xs_status.currSong);
-	XSDEBUG("foobar #3\n");
-	tmpTitle = tuple_formatter_process_string(tmpTuple, get_gentitle_format());
+	tmpTuple = tuple_new_from_filename(tmpTune->sidFilename);
+	xs_get_song_tuple_info(tmpTuple, tmpTune, xs_status.currSong);
+
+	tmpTitle = tuple_formatter_process_string(tmpTuple,
+		xs_cfg.titleOverride ? xs_cfg.titleFormat : get_gentitle_format());
 	
 	XSDEBUG("foobar #4\n");
 	XS_MUTEX_LOCK(xs_status);
@@ -655,29 +656,17 @@
 
 /* Return song information Tuple
  */
-Tuple * xs_get_song_tuple_info(gchar *songFilename, gint subTune)
+void xs_get_song_tuple_info(Tuple *pResult, t_xs_tuneinfo *pInfo, gint subTune)
 {
-	t_xs_tuneinfo *pInfo;
-	Tuple *pResult;
-	gchar *tmpStr;
-
-	pResult = tuple_new_from_filename(songFilename);
+	gchar *tmpStr, tmpStr2[64];
 
-	/* Get tune information from emulation engine */
-	XS_MUTEX_LOCK(xs_status);
-	pInfo = xs_status.sidPlayer->plrGetSIDInfo(songFilename);
-	if (!pInfo) {
-		XS_MUTEX_UNLOCK(xs_status);
-		return pResult;
-	}
-	XS_MUTEX_UNLOCK(xs_status);
-	
 	tuple_associate_string(pResult, "title", pInfo->sidName);
 	tuple_associate_string(pResult, "artist", pInfo->sidComposer);
 	tuple_associate_string(pResult, "genre", "SID-tune");
 	tuple_associate_string(pResult, "copyright", pInfo->sidCopyright);
-	tuple_associate_string(pResult, "format", pInfo->sidFormat);
+
 	tuple_associate_int(pResult, "subtunes", pInfo->nsubTunes);
+	tuple_associate_string(pResult, "sid-format", pInfo->sidFormat);
 
 	switch (pInfo->sidModel) {
 		case XS_SIDMODEL_6581: tmpStr = "6581"; break;
@@ -686,7 +675,7 @@
 		default: tmpStr = "?"; break;
 	}
 	tuple_associate_string(pResult, "sid-model", tmpStr);
-
+	
 	/* Get sub-tune information, if available */
 	if (subTune < 0 || pInfo->startTune > pInfo->nsubTunes)
 		subTune = pInfo->startTune;
@@ -694,26 +683,61 @@
 	if ((subTune > 0) && (subTune <= pInfo->nsubTunes)) {
 		gint tmpInt = pInfo->subTunes[subTune - 1].tuneLength;
 		tuple_associate_int(pResult, "length", (tmpInt < 0) ? -1 : tmpInt * 1000);
+		
+		tmpInt = pInfo->subTunes[subTune - 1].tuneSpeed;
+		if (tmpInt > 0) {
+			switch (tmpInt) {
+			case XS_CLOCK_PAL: tmpStr = "PAL"; break;
+			case XS_CLOCK_NTSC: tmpStr = "NTSC"; break;
+			case XS_CLOCK_ANY: tmpStr = "ANY"; break;
+			case XS_CLOCK_VBI: tmpStr = "VBI"; break;
+			case XS_CLOCK_CIA: tmpStr = "CIA"; break;
+			default:
+				g_snprintf(tmpStr2, sizeof(tmpStr2), "%dHz", tmpInt);
+				tmpStr = tmpStr2;
+				break;
+			}
+		} else
+			tmpStr = "?";
+
+		tuple_associate_string(pResult, "sid-speed", tmpStr);
 	} else
 		subTune = 1;
 
 	tuple_associate_int(pResult, "subtune", subTune);
 	tuple_associate_int(pResult, "track-number", subTune);
 
-	/* Free tune information */
-	xs_tuneinfo_free(pInfo);
-	return pResult;
+	if (xs_cfg.titleOverride)
+		tuple_associate_string(pResult, "formatter", xs_cfg.titleFormat);
 }
 
 Tuple * xs_get_song_tuple(gchar *songFilename)
 {
-	Tuple *pResult;
+	Tuple *tmpResult;
 	gchar *tmpFilename;
+	t_xs_tuneinfo *tmpInfo;
 	gint subTune;
 
+	/* Get information from URL */
 	xs_get_trackinfo(songFilename, &tmpFilename, &subTune);
-	pResult = xs_get_song_tuple_info(tmpFilename, subTune);
+
+	tmpResult = tuple_new_from_filename(tmpFilename);
+	if (!tmpResult) {
+		g_free(tmpFilename);
+		return NULL;
+	}
+
+	/* Get tune information from emulation engine */
+	XS_MUTEX_LOCK(xs_status);
+	tmpInfo = xs_status.sidPlayer->plrGetSIDInfo(tmpFilename);
+	XS_MUTEX_UNLOCK(xs_status);
 	g_free(tmpFilename);
 
-	return pResult;
+	if (!tmpInfo)
+		return tmpResult;
+	
+	xs_get_song_tuple_info(tmpResult, tmpInfo, subTune);
+	xs_tuneinfo_free(tmpInfo);
+
+	return tmpResult;
 }
--- a/src/sid/xmms-sid.glade	Wed Sep 05 22:44:25 2007 +0300
+++ b/src/sid/xmms-sid.glade	Thu Sep 06 02:52:33 2007 +0300
@@ -2410,6 +2410,154 @@
 	  </child>
 
 	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="border_width">4</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox1">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">2</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="cfg_ftitle_override">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">By enabling this option you can specify a custom Tuplez formatting string for SID-files. The SID-plugin specific Tuplez tags are described shortly below.</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Override generic Tuplez format string</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="xs_cfg_ftitle_override_toggled" last_modification_time="Wed, 05 Sep 2007 21:51:50 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="cfg_ftitle_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkEntry" id="cfg_ftitle_format">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Tuplez format string for SID-files</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char">●</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="cfg_ftitle_descs">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Descriptions of &lt;i&gt;SID-specific&lt;/i&gt; Tuplez fields go here. &lt;b&gt;:D&lt;/b&gt;</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">True</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">8</property>
+			  <property name="ypad">8</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label29">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Song title format:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="w_label27">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Title</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
 	    <widget class="GtkVBox" id="w_vbox19">
 	      <property name="visible">True</property>
 	      <property name="homogeneous">False</property>
@@ -2433,6 +2581,7 @@
 		      <child>
 			<widget class="GtkCheckButton" id="cfg_subauto_enable">
 			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">If enabled, sub-tunes of each file will be added to playlist. If disabled, only the default sub-tune will be added.</property>
 			  <property name="can_focus">True</property>
 			  <property name="label" translatable="yes">Add sub-tunes to playlist</property>
 			  <property name="use_underline">True</property>
@@ -2453,8 +2602,9 @@
 		      <child>
 			<widget class="GtkCheckButton" id="cfg_subauto_min_only">
 			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Only add sub-tunes that have a duration of at least specified time.</property>
 			  <property name="can_focus">True</property>
-			  <property name="label" translatable="yes">Only tunes with specified minimum length </property>
+			  <property name="label" translatable="yes">Only tunes with specified minimum duration</property>
 			  <property name="use_underline">True</property>
 			  <property name="relief">GTK_RELIEF_NORMAL</property>
 			  <property name="focus_on_click">True</property>
--- a/src/sid/xs_config.c	Wed Sep 05 22:44:25 2007 +0300
+++ b/src/sid/xs_config.c	Thu Sep 06 02:52:33 2007 +0300
@@ -127,10 +127,10 @@
 #ifndef AUDACIOUS_PLUGIN
 { CTYPE_INT,	&xs_cfg.subsongControl,		"subsongControl" },
 { CTYPE_BOOL,	&xs_cfg.detectMagic,		"detectMagic" },
+#endif
 
 { CTYPE_BOOL,	&xs_cfg.titleOverride,		"titleOverride" },
 { CTYPE_STR,	&xs_cfg.titleFormat,		"titleFormat" },
-#endif
 
 { CTYPE_BOOL,	&xs_cfg.subAutoEnable,		"subAutoEnable" },
 { CTYPE_BOOL,	&xs_cfg.subAutoMinOnly,		"subAutoMinOnly" },
@@ -191,10 +191,10 @@
 { WTYPE_BGROUP,	CTYPE_INT,	"cfg_subctrl_patch",	&xs_cfg.subsongControl,		XS_SSC_PATCH },
 
 { WTYPE_BUTTON,	CTYPE_BOOL,	"cfg_detectmagic",	&xs_cfg.detectMagic,		0 },
+#endif
 
 { WTYPE_BUTTON,	CTYPE_BOOL,	"cfg_ftitle_override",	&xs_cfg.titleOverride,		0 },
 { WTYPE_TEXT,	CTYPE_STR,	"cfg_ftitle_format",	&xs_cfg.titleFormat,		0 },
-#endif
 
 { WTYPE_BUTTON,	CTYPE_BOOL,	"cfg_subauto_enable",	&xs_cfg.subAutoEnable,		0 },
 { WTYPE_BUTTON,	CTYPE_BOOL,	"cfg_subauto_min_only",	&xs_cfg.subAutoMinOnly,		0 },
@@ -275,7 +275,7 @@
 	xs_pstrcpy(&xs_cfg.stilDBPath, "~/C64Music/DOCUMENTS/STIL.txt");
 	xs_pstrcpy(&xs_cfg.hvscPath, "~/C64Music");
 
-#ifdef HAVE_SONG_POSITION
+#if defined(HAVE_SONG_POSITION) && !defined(AUDACIOUS_PLUGIN)
 	xs_cfg.subsongControl = XS_SSC_PATCH;
 #else
 	xs_cfg.subsongControl = XS_SSC_POPUP;
@@ -283,9 +283,7 @@
 
 	xs_cfg.detectMagic = FALSE;
 
-#if defined(HAVE_XMMSEXTRA) || defined(AUDACIOUS_PLUGIN)
-	xs_cfg.titleOverride = FALSE;
-#else
+#ifndef HAVE_XMMSEXTRA
 	xs_cfg.titleOverride = TRUE;
 #endif
 	xs_pstrcpy(&xs_cfg.titleFormat, "%p - %t (%c) [%n/%N][%m/%C]");
@@ -1080,7 +1078,7 @@
 	gtk_widget_set_sensitive(LUW("cfg_filters_notebook"), isActive);
 }
 
-#ifndef AUDACIOUS_PLUGIN
+
 void xs_cfg_ftitle_override_toggled(GtkToggleButton * togglebutton, gpointer user_data)
 {
 	gboolean isActive = GTK_TOGGLE_BUTTON(togglebutton)->active;
@@ -1089,7 +1087,7 @@
 
 	gtk_widget_set_sensitive(LUW("cfg_ftitle_box"), isActive);
 }
-#endif
+
 
 void xs_cfg_emu_sidplay1_toggled(GtkToggleButton * togglebutton, gpointer user_data)
 {
@@ -1290,18 +1288,16 @@
 
 	gtk_widget_set_sensitive(LUW("cfg_resid_frame"), FALSE);
 
-#ifndef AUDACIOUS_PLUGIN
-#  ifndef HAVE_XMMSEXTRA
+#if !defined(HAVE_XMMSEXTRA) && !defined(AUDACIOUS_PLUGIN)
 	gtk_widget_set_sensitive(LUW("cfg_ftitle_override"), FALSE);
 	xs_cfg.titleOverride = TRUE;
-#  endif
-#  ifdef HAVE_SONG_POSITION
+#endif
+
+#if !defined(HAVE_SONG_POSITION) && !defined(AUDACIOUS_PLUGIN)
 	gtk_widget_set_sensitive(LUW("cfg_subctrl_patch"), FALSE);
-#  endif
+#endif
 
 	xs_cfg_ftitle_override_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_ftitle_override")), NULL);
-#endif /* !AUDACIOUS_PLUGIN */
-
 	xs_cfg_emu_filters_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_emu_filters")), NULL);
 	xs_cfg_emu_sidplay1_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_emu_sidplay1")), NULL);
 	xs_cfg_emu_sidplay2_toggled(GTK_TOGGLE_BUTTON(LUW("cfg_emu_sidplay2")), NULL);
--- a/src/sid/xs_genui.h	Wed Sep 05 22:44:25 2007 +0300
+++ b/src/sid/xs_genui.h	Thu Sep 06 02:52:33 2007 +0300
@@ -188,3 +188,7 @@
 xs_confirmwin_delete                   (GtkWidget       *widget,
                                         GdkEvent        *event,
                                         gpointer         user_data);
+
+void
+xs_cfg_ftitle_override_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
--- a/src/sid/xs_interface.c	Wed Sep 05 22:44:25 2007 +0300
+++ b/src/sid/xs_interface.c	Thu Sep 06 02:52:33 2007 +0300
@@ -173,6 +173,14 @@
   GtkWidget *cfg_sld_dbbrowse;
   GtkWidget *label17;
   GtkWidget *w_label26;
+  GtkWidget *frame1;
+  GtkWidget *vbox1;
+  GtkWidget *cfg_ftitle_override;
+  GtkWidget *cfg_ftitle_box;
+  GtkWidget *cfg_ftitle_format;
+  GtkWidget *cfg_ftitle_descs;
+  GtkWidget *label29;
+  GtkWidget *w_label27;
   GtkWidget *w_vbox19;
   GtkWidget *w_frame31;
   GtkWidget *w_vbox35;
@@ -1016,6 +1024,54 @@
   gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 4), w_label26);
   gtk_label_set_justify (GTK_LABEL (w_label26), GTK_JUSTIFY_CENTER);
 
+  frame1 = gtk_frame_new (NULL);
+  gtk_widget_set_name (frame1, "frame1");
+  gtk_widget_show (frame1);
+  gtk_container_add (GTK_CONTAINER (cfg_notebook), frame1);
+  gtk_container_set_border_width (GTK_CONTAINER (frame1), 4);
+
+  vbox1 = gtk_vbox_new (FALSE, 2);
+  gtk_widget_set_name (vbox1, "vbox1");
+  gtk_widget_show (vbox1);
+  gtk_container_add (GTK_CONTAINER (frame1), vbox1);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 2);
+
+  cfg_ftitle_override = gtk_check_button_new_with_mnemonic (_("Override generic Tuplez format string"));
+  gtk_widget_set_name (cfg_ftitle_override, "cfg_ftitle_override");
+  gtk_widget_show (cfg_ftitle_override);
+  gtk_box_pack_start (GTK_BOX (vbox1), cfg_ftitle_override, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, cfg_ftitle_override, _("By enabling this option you can specify a custom Tuplez formatting string for SID-files. The SID-plugin specific Tuplez tags are described shortly below."), NULL);
+
+  cfg_ftitle_box = gtk_vbox_new (FALSE, 0);
+  gtk_widget_set_name (cfg_ftitle_box, "cfg_ftitle_box");
+  gtk_widget_show (cfg_ftitle_box);
+  gtk_box_pack_start (GTK_BOX (vbox1), cfg_ftitle_box, TRUE, TRUE, 0);
+
+  cfg_ftitle_format = gtk_entry_new ();
+  gtk_widget_set_name (cfg_ftitle_format, "cfg_ftitle_format");
+  gtk_widget_show (cfg_ftitle_format);
+  gtk_box_pack_start (GTK_BOX (cfg_ftitle_box), cfg_ftitle_format, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, cfg_ftitle_format, _("Tuplez format string for SID-files"), NULL);
+  gtk_entry_set_invisible_char (GTK_ENTRY (cfg_ftitle_format), 9679);
+
+  cfg_ftitle_descs = gtk_label_new (_("Descriptions of <i>SID-specific</i> Tuplez fields go here. <b>:D</b>"));
+  gtk_widget_set_name (cfg_ftitle_descs, "cfg_ftitle_descs");
+  gtk_widget_show (cfg_ftitle_descs);
+  gtk_box_pack_start (GTK_BOX (cfg_ftitle_box), cfg_ftitle_descs, TRUE, TRUE, 0);
+  gtk_label_set_use_markup (GTK_LABEL (cfg_ftitle_descs), TRUE);
+  gtk_label_set_line_wrap (GTK_LABEL (cfg_ftitle_descs), TRUE);
+  gtk_misc_set_padding (GTK_MISC (cfg_ftitle_descs), 8, 8);
+
+  label29 = gtk_label_new (_("Song title format:"));
+  gtk_widget_set_name (label29, "label29");
+  gtk_widget_show (label29);
+  gtk_frame_set_label_widget (GTK_FRAME (frame1), label29);
+
+  w_label27 = gtk_label_new (_("Title"));
+  gtk_widget_set_name (w_label27, "w_label27");
+  gtk_widget_show (w_label27);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 5), w_label27);
+
   w_vbox19 = gtk_vbox_new (FALSE, 0);
   gtk_widget_set_name (w_vbox19, "w_vbox19");
   gtk_widget_show (w_vbox19);
@@ -1037,11 +1093,13 @@
   gtk_widget_set_name (cfg_subauto_enable, "cfg_subauto_enable");
   gtk_widget_show (cfg_subauto_enable);
   gtk_box_pack_start (GTK_BOX (w_vbox35), cfg_subauto_enable, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, cfg_subauto_enable, _("If enabled, sub-tunes of each file will be added to playlist. If disabled, only the default sub-tune will be added."), NULL);
 
-  cfg_subauto_min_only = gtk_check_button_new_with_mnemonic (_("Only tunes with specified minimum length "));
+  cfg_subauto_min_only = gtk_check_button_new_with_mnemonic (_("Only tunes with specified minimum duration"));
   gtk_widget_set_name (cfg_subauto_min_only, "cfg_subauto_min_only");
   gtk_widget_show (cfg_subauto_min_only);
   gtk_box_pack_start (GTK_BOX (w_vbox35), cfg_subauto_min_only, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, cfg_subauto_min_only, _("Only add sub-tunes that have a duration of at least specified time."), NULL);
 
   cfg_subauto_box = gtk_hbox_new (FALSE, 2);
   gtk_widget_set_name (cfg_subauto_box, "cfg_subauto_box");
@@ -1171,7 +1229,7 @@
   w_label3 = gtk_label_new (_("Misc"));
   gtk_widget_set_name (w_label3, "w_label3");
   gtk_widget_show (w_label3);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 5), w_label3);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (cfg_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (cfg_notebook), 6), w_label3);
   gtk_label_set_justify (GTK_LABEL (w_label3), GTK_JUSTIFY_CENTER);
 
   hbuttonbox1 = gtk_hbutton_box_new ();
@@ -1247,6 +1305,9 @@
   g_signal_connect ((gpointer) cfg_sld_dbbrowse, "clicked",
                     G_CALLBACK (xs_cfg_sldb_browse),
                     NULL);
+  g_signal_connect ((gpointer) cfg_ftitle_override, "toggled",
+                    G_CALLBACK (xs_cfg_ftitle_override_toggled),
+                    NULL);
   g_signal_connect ((gpointer) cfg_subauto_enable, "toggled",
                     G_CALLBACK (xs_cfg_subauto_enable_toggled),
                     NULL);
@@ -1401,6 +1462,14 @@
   GLADE_HOOKUP_OBJECT (xs_configwin, cfg_sld_dbbrowse, "cfg_sld_dbbrowse");
   GLADE_HOOKUP_OBJECT (xs_configwin, label17, "label17");
   GLADE_HOOKUP_OBJECT (xs_configwin, w_label26, "w_label26");
+  GLADE_HOOKUP_OBJECT (xs_configwin, frame1, "frame1");
+  GLADE_HOOKUP_OBJECT (xs_configwin, vbox1, "vbox1");
+  GLADE_HOOKUP_OBJECT (xs_configwin, cfg_ftitle_override, "cfg_ftitle_override");
+  GLADE_HOOKUP_OBJECT (xs_configwin, cfg_ftitle_box, "cfg_ftitle_box");
+  GLADE_HOOKUP_OBJECT (xs_configwin, cfg_ftitle_format, "cfg_ftitle_format");
+  GLADE_HOOKUP_OBJECT (xs_configwin, cfg_ftitle_descs, "cfg_ftitle_descs");
+  GLADE_HOOKUP_OBJECT (xs_configwin, label29, "label29");
+  GLADE_HOOKUP_OBJECT (xs_configwin, w_label27, "w_label27");
   GLADE_HOOKUP_OBJECT (xs_configwin, w_vbox19, "w_vbox19");
   GLADE_HOOKUP_OBJECT (xs_configwin, w_frame31, "w_frame31");
   GLADE_HOOKUP_OBJECT (xs_configwin, w_vbox35, "w_vbox35");