pidgin: 62602e84: Fix from "oopepe" to make menus more rel...

datallah at pidgin.im datallah at pidgin.im
Mon Feb 9 23:30:39 EST 2009


-----------------------------------------------------------------
Revision: 62602e847acec0723ca97176c40fd6b2f3516b77
Ancestor: bb5683a7a6c140fe8254da325ae93e68b137e504
Author: datallah at pidgin.im
Date: 2009-02-10T04:20:24
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/62602e847acec0723ca97176c40fd6b2f3516b77

Modified files:
        pidgin/gtkblist.c pidgin/gtkdocklet.c

ChangeLog: 

Fix from "oopepe" to make menus more reliably responsive.
Fixes #8352

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	8fb829682a7ec3574013e22200eb3a99fddc8f60
+++ pidgin/gtkblist.c	4d322f2f724403f447c49ffd3cde271fb15f088d
@@ -7676,13 +7676,11 @@ pidgin_blist_update_accounts_menu(void)
 			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 @@ pidgin_blist_update_accounts_menu(void)
 			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 @@ pidgin_blist_update_accounts_menu(void)
 			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 @@ pidgin_blist_update_accounts_menu(void)
 			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 @@ pidgin_blist_update_accounts_menu(void)
 		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 @@ pidgin_blist_update_plugin_actions(void)
 
 		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 @@ pidgin_blist_update_plugin_actions(void)
 
 		build_plugin_actions(submenu, plugin, NULL);
 	}
+	gtk_widget_show_all(pluginmenu);
 }
 
 static void
============================================================
--- pidgin/gtkdocklet.c	f42a159b6e3e0e8b80fed9d0d294e6586b467c85
+++ pidgin/gtkdocklet.c	c0e40bdb8277634d1236b4100d56e9fc750f1c38
@@ -344,7 +344,9 @@ docklet_menu_leave_enter(GtkWidget *menu
 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 @@ docklet_plugin_actions(GtkWidget *menu)
 
 		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);
 


More information about the Commits mailing list