cpw.qulogic.gtk3: 5204b1b3: Enable the menu-refreshing logic in the ...

qulogic at pidgin.im qulogic at pidgin.im
Mon Mar 14 02:50:52 EDT 2011


----------------------------------------------------------------------
Revision: 5204b1b3816e4356312730935b2f3b6e9b940e1a
Parent:   9f9150c83aa41a5ad716a09dc9be9079a5235a85
Author:   qulogic at pidgin.im
Date:     03/14/11 02:45:05
Branch:   im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/5204b1b3816e4356312730935b2f3b6e9b940e1a

Changelog: 

Enable the menu-refreshing logic in the conversation menu, now that
the signal (un)blocking affects the correct widget.

Changes against parent 9f9150c83aa41a5ad716a09dc9be9079a5235a85

  patched  pidgin/gtkconv.c

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	7844c735a1e8d9176cff2f9cab931c3497ce2485
+++ pidgin/gtkconv.c	db636d50c1052ebbf319c172521172c814c30b89
@@ -3501,7 +3501,6 @@ regenerate_plugins_items(PidginWindow *w
 	g_object_set_data(G_OBJECT(win->window), "plugin-actions", action_items);
 }
 
-#if 0
 static void menubar_activated(GtkWidget *item, gpointer data)
 {
 	PidginWindow *win = data;
@@ -3520,12 +3519,11 @@ focus_out_from_menubar(GtkWidget *wid, P
 {
 	/* The menubar has been deactivated. Make sure the 'More' submenu is regenerated next time
 	 * the 'Conversation' menu pops up. */
-	GtkWidget *menuitem = gtk_item_factory_get_item(win->menu.item_factory, N_("/Conversation"));
+	GtkWidget *menuitem = gtk_ui_manager_get_widget(win->menu.ui, "/Conversation/ConversationMenu");
 	g_signal_handlers_unblock_by_func(G_OBJECT(menuitem), G_CALLBACK(menubar_activated), win);
 	g_signal_handlers_disconnect_by_func(G_OBJECT(win->menu.menubar),
 				G_CALLBACK(focus_out_from_menubar), win);
 }
-#endif
 
 static GtkWidget *
 setup_menubar(PidginWindow *win)
@@ -3534,6 +3532,7 @@ setup_menubar(PidginWindow *win)
 	const char *method;
 	GtkActionGroup *action_group;
 	GError *error;
+	GtkWidget *menuitem;
 
 	action_group = gtk_action_group_new("ConversationActions");
 	gtk_action_group_add_actions(action_group,
@@ -3568,6 +3567,9 @@ setup_menubar(PidginWindow *win)
 	win->menu.menubar =
 		gtk_ui_manager_get_widget(win->menu.ui, "/Conversation");
 
+	menuitem = gtk_ui_manager_get_widget(win->menu.ui, "/Conversation/ConversationMenu");
+	g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(menubar_activated), win);
+
 	win->menu.view_log =
 		gtk_ui_manager_get_action(win->menu.ui,
 		                          "/Conversation/ConversationMenu/ViewLog");


More information about the Commits mailing list