# HG changeset patch # User Elliott Sales de Andrade # Date 1318110518 0 # Node ID 59b0cf5850387cd7622d17952d6831a707010f15 # Parent 8f2715fc36dbd3ae7f6db4dae710da2c92e624cb 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. diff -r 8f2715fc36db -r 59b0cf585038 pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Sat Oct 08 21:24:14 2011 +0000 +++ b/pidgin/gtkaccount.c Sat Oct 08 21:48:38 2011 +0000 @@ -829,8 +829,11 @@ 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 @@ 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) { diff -r 8f2715fc36db -r 59b0cf585038 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Oct 08 21:24:14 2011 +0000 +++ b/pidgin/gtkconv.c Sat Oct 08 21:48:38 2011 +0000 @@ -3132,7 +3132,7 @@ { "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 @@ 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 @@ } gtk_widget_show_all(menu); -#endif } static void @@ -3503,8 +3509,6 @@ 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 @@ 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 @@ 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 @@ { /* 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 @@ 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 @@ 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 @@ } return colors; -} \ No newline at end of file +}