Mercurial > pidgin
changeset 25442:008f186c7bc7
Fix from "oopepe" to make menus more reliably responsive.
Fixes #8352
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 10 Feb 2009 04:20:24 +0000 |
parents | 273efe387134 |
children | 9ee0cb95a252 |
files | pidgin/gtkblist.c pidgin/gtkdocklet.c |
diffstat | 2 files changed, 6 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Tue Feb 10 03:22:35 2009 +0000 +++ b/pidgin/gtkblist.c Tue Feb 10 04:20:24 2009 +0000 @@ -7676,13 +7676,11 @@ if (!disabled_accounts) { menuitem = gtk_menu_item_new_with_label(_("Enable Account")); gtk_menu_shell_append(GTK_MENU_SHELL(accountmenu), menuitem); - gtk_widget_show(menuitem); submenu = gtk_menu_new(); gtk_menu_set_accel_group(GTK_MENU(submenu), accel_group); gtk_menu_set_accel_path(GTK_MENU(submenu), N_("<PurpleMain>/Accounts/Enable Account")); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); - gtk_widget_show(submenu); disabled_accounts = TRUE; } @@ -7704,7 +7702,6 @@ g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(enable_account_cb), account); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); - gtk_widget_show(menuitem); } else { enabled_accounts = TRUE; } @@ -7746,21 +7743,18 @@ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); } gtk_menu_shell_append(GTK_MENU_SHELL(accountmenu), menuitem); - gtk_widget_show(menuitem); submenu = gtk_menu_new(); gtk_menu_set_accel_group(GTK_MENU(submenu), accel_group); gtk_menu_set_accel_path(GTK_MENU(submenu), accel_path_buf); g_free(accel_path_buf); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); - gtk_widget_show(submenu); menuitem = gtk_menu_item_new_with_mnemonic(_("_Edit Account")); g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(modify_account_cb), account); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); - gtk_widget_show(menuitem); pidgin_separator(submenu); @@ -7772,7 +7766,6 @@ menuitem = gtk_menu_item_new_with_label(_("No actions available")); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); gtk_widget_set_sensitive(menuitem, FALSE); - gtk_widget_show(menuitem); } pidgin_separator(submenu); @@ -7781,8 +7774,8 @@ g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(disable_account_cb), account); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); - gtk_widget_show(menuitem); - } + } + gtk_widget_show_all(accountmenu); } static GList *plugin_submenus = NULL; @@ -7821,13 +7814,11 @@ menuitem = gtk_image_menu_item_new_with_label(_(plugin->info->name)); gtk_menu_shell_append(GTK_MENU_SHELL(pluginmenu), menuitem); - gtk_widget_show(menuitem); plugin_submenus = g_list_append(plugin_submenus, menuitem); submenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); - gtk_widget_show(submenu); gtk_menu_set_accel_group(GTK_MENU(submenu), accel_group); path = g_strdup_printf("%s/Tools/%s", gtkblist->ift->path, plugin->info->name); @@ -7836,6 +7827,7 @@ build_plugin_actions(submenu, plugin, NULL); } + gtk_widget_show_all(pluginmenu); } static void
--- a/pidgin/gtkdocklet.c Tue Feb 10 03:22:35 2009 +0000 +++ b/pidgin/gtkdocklet.c Tue Feb 10 04:20:24 2009 +0000 @@ -344,7 +344,9 @@ docklet_menu_leave_enter(GtkWidget *menu, GdkEventCrossing *event, void *data) { static guint hide_docklet_timer = 0; - if (event->type == GDK_LEAVE_NOTIFY && event->detail == GDK_NOTIFY_ANCESTOR) { + + if (event->type == GDK_LEAVE_NOTIFY && (event->detail == GDK_NOTIFY_ANCESTOR || + event->detail == GDK_NOTIFY_UNKNOWN)) { purple_debug(PURPLE_DEBUG_INFO, "docklet", "menu leave-notify-event\n"); /* Add some slop so that the menu doesn't annoyingly disappear when mousing around */ if (hide_docklet_timer == 0) { @@ -652,11 +654,9 @@ menuitem = gtk_image_menu_item_new_with_label(_(plugin->info->name)); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); - gtk_widget_show(menuitem); submenu = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); - gtk_widget_show(submenu); build_plugin_actions(submenu, plugin, NULL);