changeset 1561:88878ed02ca0

Few minor changes, to amend differences between XMMS-SID and this.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 02 Sep 2007 23:08:33 +0300
parents e5a0c508c025
children 58f03e54b97a 828f45d8e8f8 d03b7e323ac0
files src/sid/xs_fileinfo.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/sid/xs_fileinfo.c	Sun Sep 02 23:00:33 2007 +0300
+++ b/src/sid/xs_fileinfo.c	Sun Sep 02 23:08:33 2007 +0300
@@ -228,10 +228,7 @@
 	tmpText = LUW("fileinfo_sub_info");
 
 	/* Get subtune information */
-	if (widget)
-		tmpIndex = gtk_option_menu_get_history(GTK_OPTION_MENU(widget));
-	else
-		tmpIndex = 0;
+	tmpIndex = g_list_index(GTK_MENU_SHELL(data)->children, gtk_menu_get_active(GTK_MENU(data)));
 	
 	if (xs_fileinfostil && tmpIndex <= xs_fileinfostil->nsubTunes)
 		tmpNode = xs_fileinfostil->subTunes[tmpIndex];
@@ -311,6 +308,8 @@
 	tmpMenuItem = gtk_menu_item_new_with_label(_("General info"));
 	gtk_widget_show(tmpMenuItem);
 	gtk_menu_append(GTK_MENU(tmpMenu), tmpMenuItem);
+	g_signal_connect(G_OBJECT(tmpMenuItem), "activate",
+		G_CALLBACK(xs_fileinfo_subtune), tmpMenu);
 
 	/* Other menu items */
 	for (n = 1; n <= tmpInfo->nsubTunes; n++) {
@@ -334,10 +333,11 @@
 		tmpMenuItem = gtk_menu_item_new_with_label(tmpStr);
 		gtk_widget_show(tmpMenuItem);
 		gtk_menu_append(GTK_MENU(tmpMenu), tmpMenuItem);
+		g_signal_connect(G_OBJECT(tmpMenuItem), "activate",
+			G_CALLBACK(xs_fileinfo_subtune), tmpMenu);
 	}
 
 	gtk_option_menu_set_menu(GTK_OPTION_MENU(tmpOptionMenu), tmpMenu);
-	g_signal_connect(G_OBJECT(tmpOptionMenu), "changed", G_CALLBACK(xs_fileinfo_subtune), tmpMenu);
 	gtk_widget_show(tmpOptionMenu);
 
 	/* Set the subtune information */