cpw.qulogic.gtk3: b2743b4c: Remove unnecessary GTK+ version checks n...
qulogic at pidgin.im
qulogic at pidgin.im
Sun Oct 9 04:34:50 EDT 2011
----------------------------------------------------------------------
Revision: b2743b4c43aef329ea9e54e9a563880cc0b8488c
Parent: a6d5d6ca39ccbc74c99b173d5126f3a0e260fb3e
Author: qulogic at pidgin.im
Date: 10/08/11 18:35:05
Branch: im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/b2743b4c43aef329ea9e54e9a563880cc0b8488c
Changelog:
Remove unnecessary GTK+ version checks now that we depend on 2.10.0.
I thought I did some of this already, though.
Changes against parent a6d5d6ca39ccbc74c99b173d5126f3a0e260fb3e
patched pidgin/gtkconv.c
patched pidgin/gtkmenutray.h
patched pidgin/plugins/gestures/gestures.c
-------------- next part --------------
============================================================
--- pidgin/gtkconv.c 8fe5d04f356abad26ccea0b0f436411b9fdb1b00
+++ pidgin/gtkconv.c d743210fc97b8dec1a79b7edada7a196fe4f2f93
@@ -1146,9 +1146,6 @@ menu_view_log_cb(GtkAction *action, gpoi
gdk_window_set_cursor(gtkblist->window->window, cursor);
gdk_window_set_cursor(win->window->window, cursor);
gdk_cursor_unref(cursor);
-#if GTK_CHECK_VERSION(2,4,0) && !GTK_CHECK_VERSION(2,6,0) //FIXME: What?
- gdk_display_flush(gdk_drawable_get_display(GDK_DRAWABLE(widget->window)));
-#endif
name = purple_conversation_get_name(conv);
account = purple_conversation_get_account(conv);
@@ -3467,7 +3464,6 @@ regenerate_options_items(PidginWindow *w
GtkWidget *menu;
PidginConversation *gtkconv;
GList *list;
-#if GTK_CHECK_VERSION(2,6,0)
GtkWidget *more_menu;
gtkconv = pidgin_conv_window_get_active_gtkconv(win);
@@ -3475,10 +3471,6 @@ regenerate_options_items(PidginWindow *w
"/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; )
@@ -3534,12 +3526,8 @@ 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) {
@@ -10130,12 +10118,7 @@ pidgin_conv_window_remove_gtkconv(Pidgin
index = gtk_notebook_page_num(GTK_NOTEBOOK(win->notebook), gtkconv->tab_cont);
-#if GTK_CHECK_VERSION(2,10,0)
g_object_ref_sink(G_OBJECT(gtkconv->tab_cont));
-#else
- g_object_ref(gtkconv->tab_cont);
- gtk_object_sink(GTK_OBJECT(gtkconv->tab_cont));
-#endif
gtk_notebook_remove_page(GTK_NOTEBOOK(win->notebook), index);
============================================================
--- pidgin/plugins/gestures/gestures.c c67dccef48e662b2b7f008f47824c4cbb4c0d060
+++ pidgin/plugins/gestures/gestures.c cae48552aef2dc49d4a35fcf7cbdfa45f27d26bb
@@ -145,7 +145,6 @@ new_conv_cb(PurpleConversation *conv)
}
#if 0
-#if GTK_CHECK_VERSION(2,4,0)
static void
mouse_button_menu_cb(GtkComboBox *opt, gpointer data)
{
@@ -153,16 +152,7 @@ mouse_button_menu_cb(GtkComboBox *opt, g
gstroke_set_mouse_button(button + 2);
}
-#else
-static void
-mouse_button_menu_cb(GtkMenuItem *item, gpointer data)
-{
- int button = (int)data;
-
- gstroke_set_mouse_button(button + 2);
-}
#endif
-#endif
static void
toggle_draw_cb(GtkToggleButton *toggle, gpointer data)
@@ -230,10 +220,7 @@ get_config_frame(PurplePlugin *plugin)
GtkWidget *toggle;
#if 0
GtkWidget *opt;
-#if GTK_CHECK_VERSION(2,4,0)
- GtkWidget *menu, *item;
#endif
-#endif
/* Outside container */
ret = gtk_vbox_new(FALSE, 18);
@@ -243,7 +230,6 @@ get_config_frame(PurplePlugin *plugin)
vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration"));
#if 0
-#if GTK_CHECK_VERSION(2,4,0)
/* Mouse button drop-down menu */
opt = gtk_combo_box_new_text();
@@ -255,27 +241,7 @@ get_config_frame(PurplePlugin *plugin)
gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0);
gtk_combo_box_set_active(GTK_COMBO_BOX(opt),
gstroke_get_mouse_button() - 2);
-#else
- /* Mouse button drop-down menu */
- menu = gtk_menu_new();
- opt = gtk_option_menu_new();
-
- item = gtk_menu_item_new_with_label(_("Middle mouse button"));
- g_signal_connect(G_OBJECT(item), "activate",
- G_CALLBACK(mouse_button_menu_cb), opt);
- gtk_menu_append(menu, item);
-
- item = gtk_menu_item_new_with_label(_("Right mouse button"));
- g_signal_connect(G_OBJECT(item), "activate",
- G_CALLBACK(mouse_button_menu_cb), opt);
- gtk_menu_append(menu, item);
-
- gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0);
- gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu);
- gtk_option_menu_set_history(GTK_OPTION_MENU(opt),
- gstroke_get_mouse_button() - 2);
#endif
-#endif
/* "Visual gesture display" checkbox */
toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display"));
============================================================
--- pidgin/gtkmenutray.h 4f6ecf0373eac5fbce176690307da1d1991f9b00
+++ pidgin/gtkmenutray.h c9ff16a951d6ad167f148de98e9c5198023d0ad9
@@ -40,9 +40,7 @@ struct _PidginMenuTray {
struct _PidginMenuTray {
GtkMenuItem gparent; /**< The parent instance */
GtkWidget *tray; /**< The tray */
-#if GTK_CHECK_VERSION(2,12,0)
- gpointer depr1;
-#else
+#if !GTK_CHECK_VERSION(2,12,0)
GtkTooltips *tooltips; /**< Tooltips */
#endif
};
More information about the Commits
mailing list