changeset 10294:6484242e4e30

[gaim-migrate @ 11473] "This patch just fixes up some stuff in the choice request stuff.. Basically, if there's more than 5 items which makes it display as an option/dropdown menu, the menu wasn't being shown and the default was never getting set. The reason it's so bulky it's to avoid the option menu growing when the menu is displayed." --Gary Kramlich committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 02 Dec 2004 12:58:25 +0000
parents 77aad37391b9
children 0cf2a686266e
files src/gtkrequest.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkrequest.c	Thu Dec 02 12:47:11 2004 +0000
+++ b/src/gtkrequest.c	Thu Dec 02 12:58:25 2004 +0000
@@ -951,17 +951,21 @@
 
 		menu = gtk_menu_new();
 
-		gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu);
-
 		for (l = labels; l != NULL; l = l->next)
 		{
 			const char *text = l->data;
 
 			item = gtk_menu_item_new_with_label(text);
+			gtk_widget_show(item);
 
 			gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
 		}
 
+		gtk_widget_show(menu);
+		gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu);
+		gtk_option_menu_set_history(GTK_OPTION_MENU(widget),
+						gaim_request_field_choice_get_default_value(field));
+
 		g_signal_connect(G_OBJECT(widget), "changed",
 						 G_CALLBACK(field_choice_menu_cb), field);
 	}