cpw.qulogic.gtk3: fb7a4b99: Apply some changes that don't require GT...

qulogic at pidgin.im qulogic at pidgin.im
Sun Oct 9 04:35:00 EDT 2011


----------------------------------------------------------------------
Revision: fb7a4b99be20e28fa62f6e47528cd50690e9078f
Parent:   79c9bec98bc26569dd1b6b63db4361ec98ce8628
Author:   qulogic at pidgin.im
Date:     10/08/11 17:48:38
Branch:   im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/fb7a4b99be20e28fa62f6e47528cd50690e9078f

Changelog: 

Apply some changes that don't require GTK+ 3.0.

applied changes from f017f92d2834b148a4583586bf9ba2d7a184e149
             through 3a572d2b49759264dd54b77ac23764af78d630c6
Changelog: Hide some Facebook settings hacks for now.

applied changes from 3a572d2b49759264dd54b77ac23764af78d630c6
             through 5a380480965863fe5303a11e5b54915402525a55
Changelog: We don't need this extra slash.

applied changes from 5a380480965863fe5303a11e5b54915402525a55
             through 84f2abc2501c34fb226b46effa1713fe0fc7ae01
Changelog: Add back the More and plugin action menu entries.

applied changes from 9f9150c83aa41a5ad716a09dc9be9079a5235a85
             through 5204b1b3816e4356312730935b2f3b6e9b940e1a
Changelog: Enable the menu-refreshing logic in the conversation
           menu, now that the signal (un)blocking affects the
           correct widget.

Changes against parent 79c9bec98bc26569dd1b6b63db4361ec98ce8628

  patched  pidgin/gtkaccount.c
  patched  pidgin/gtkconv.c

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	99361cc09341df7ae856ec590a405c2faedbc39e
+++ pidgin/gtkconv.c	161dca28367d6c526b90d07358a16dc4ff03ae95
@@ -3132,7 +3132,7 @@ static GtkActionEntry menu_entries[] =
 	{ "MediaMenu", NULL, N_("M_edia"), NULL, NULL, NULL },
 	{ "AudioCall", PIDGIN_STOCK_TOOLBAR_AUDIO_CALL, N_("_Audio Call"), NULL, NULL, G_CALLBACK(menu_initiate_media_call_cb) },
 	{ "VideoCall", PIDGIN_STOCK_TOOLBAR_VIDEO_CALL, N_("_Video Call"), NULL, NULL, G_CALLBACK(menu_initiate_media_call_cb) },
-	{ "AudioVideoCall", PIDGIN_STOCK_TOOLBAR_VIDEO_CALL, N_("Audio\\/Video _Call"), NULL, NULL, G_CALLBACK(menu_initiate_media_call_cb) },
+	{ "AudioVideoCall", PIDGIN_STOCK_TOOLBAR_VIDEO_CALL, N_("Audio/Video _Call"), NULL, NULL, G_CALLBACK(menu_initiate_media_call_cb) },
 #endif
 
 	{ "SendFile", PIDGIN_STOCK_TOOLBAR_SEND_FILE, N_("Se_nd File..."), NULL, NULL, G_CALLBACK(menu_send_file_cb) },
@@ -3464,14 +3464,21 @@ regenerate_options_items(PidginWindow *w
 static void
 regenerate_options_items(PidginWindow *win)
 {
-#if GTK_CHECK_VERSION(2,6,0)
-#else
 	GtkWidget *menu;
 	PidginConversation *gtkconv;
 	GList *list;
+#if GTK_CHECK_VERSION(2,6,0)
+	GtkWidget *more_menu;
 
 	gtkconv = pidgin_conv_window_get_active_gtkconv(win);
+	more_menu = gtk_ui_manager_get_widget(win->menu.ui,
+	                                      "/Conversation/ConversationMenu/MoreMenu");
+	gtk_widget_show(more_menu);
+	menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(more_menu));
+#else
+	gtkconv = pidgin_conv_window_get_active_gtkconv(win);
 	menu = gtk_item_factory_get_widget(win->menu.item_factory, N_("/Conversation/More"));
+#endif
 
 	/* Remove the previous entries */
 	for (list = gtk_container_get_children(GTK_CONTAINER(menu)); list; )
@@ -3489,7 +3496,6 @@ regenerate_options_items(PidginWindow *w
 	}
 
 	gtk_widget_show_all(menu);
-#endif
 }
 
 static void
@@ -3503,8 +3509,6 @@ regenerate_plugins_items(PidginWindow *w
 static void
 regenerate_plugins_items(PidginWindow *win)
 {
-#if GTK_CHECK_VERSION(2,6,0)
-#else
 	GList *action_items;
 	GtkWidget *menu;
 	GList *list;
@@ -3530,7 +3534,12 @@ regenerate_plugins_items(PidginWindow *w
 		action_items = g_list_delete_link(action_items, action_items);
 	}
 
+#if GTK_CHECK_VERSION(2,6,0)
+	item = gtk_ui_manager_get_widget(win->menu.ui, "/Conversation/OptionsMenu");
+	menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(item));
+#else
 	menu = gtk_item_factory_get_widget(win->menu.item_factory, N_("/Options"));
+#endif
 
 	list = purple_conversation_get_extended_menu(conv);
 	if (list) {
@@ -3546,10 +3555,8 @@ regenerate_plugins_items(PidginWindow *w
 		g_signal_connect(G_OBJECT(item), "destroy", G_CALLBACK(remove_from_list), win);
 	}
 	g_object_set_data(G_OBJECT(win->window), "plugin-actions", action_items);
-#endif
 }
 
-#if 0
 static void menubar_activated(GtkWidget *item, gpointer data)
 {
 	PidginWindow *win = data;
@@ -3568,12 +3575,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)
@@ -3582,6 +3588,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,
@@ -3616,6 +3623,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");
@@ -10773,4 +10783,4 @@ generate_nick_colors(guint *color_count,
 	}
 
 	return colors;
-}
\ No newline at end of file
+}
============================================================
--- pidgin/gtkaccount.c	e5b729bd377b0164ab0495fefad9b182db22be3f
+++ pidgin/gtkaccount.c	d7d5141343a56b92a9cf35bf94b632a6e08276cf
@@ -829,8 +829,11 @@ add_protocol_options(AccountPrefsDialog 
 			gtk_label_new_with_mnemonic(_("Ad_vanced")), 1);
 	gtk_widget_show(vbox);
 
+/* FIXME: Facebook forced-options hack */
+#if 0
 	menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu));
 	item = gtk_menu_get_active(GTK_MENU(menu));
+#endif
 
 	for (l = dialog->prpl_info->protocol_options; l != NULL; l = l->next)
 	{
@@ -946,9 +949,12 @@ add_protocol_options(AccountPrefsDialog 
 				model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
 				opt_entry->widget = combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(model));
 
+/* FIXME: Facebook forced-options hack */
+#if 0
 				if (g_object_get_data(G_OBJECT(item), "fakefacebook") &&
 					!strcmp(opt_entry->setting, "connection_security"))
 					str_value = "opportunistic_tls";
+#endif
 
 				/* Loop through list of PurpleKeyValuePair items */
 				for (node = list; node != NULL; node = node->next) {


More information about the Commits mailing list