comparison src/gtkrequest.c @ 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 e8d62dc363c5
children ec140184437b
comparison
equal deleted inserted replaced
10293:77aad37391b9 10294:6484242e4e30
949 949
950 widget = gtk_option_menu_new(); 950 widget = gtk_option_menu_new();
951 951
952 menu = gtk_menu_new(); 952 menu = gtk_menu_new();
953 953
954 gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu);
955
956 for (l = labels; l != NULL; l = l->next) 954 for (l = labels; l != NULL; l = l->next)
957 { 955 {
958 const char *text = l->data; 956 const char *text = l->data;
959 957
960 item = gtk_menu_item_new_with_label(text); 958 item = gtk_menu_item_new_with_label(text);
959 gtk_widget_show(item);
961 960
962 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); 961 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
963 } 962 }
963
964 gtk_widget_show(menu);
965 gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu);
966 gtk_option_menu_set_history(GTK_OPTION_MENU(widget),
967 gaim_request_field_choice_get_default_value(field));
964 968
965 g_signal_connect(G_OBJECT(widget), "changed", 969 g_signal_connect(G_OBJECT(widget), "changed",
966 G_CALLBACK(field_choice_menu_cb), field); 970 G_CALLBACK(field_choice_menu_cb), field);
967 } 971 }
968 else 972 else