changeset 32680:33d15efe7dca

Remove unnecessary GTK+ version checks now that we depend on 2.10.0. I thought I did some of this already, though.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 08 Oct 2011 22:35:05 +0000
parents 6142c3f0868f
children 744df6452cd0
files pidgin/gtkconv.c pidgin/gtkmenutray.h pidgin/plugins/gestures/gestures.c
diffstat 3 files changed, 1 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Sat Oct 08 22:17:55 2011 +0000
+++ b/pidgin/gtkconv.c	Sat Oct 08 22:35:05 2011 +0000
@@ -1146,9 +1146,6 @@
 	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 @@
 	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 @@
 	                                      "/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 @@
 		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 @@
 
 	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);
 
--- a/pidgin/gtkmenutray.h	Sat Oct 08 22:17:55 2011 +0000
+++ b/pidgin/gtkmenutray.h	Sat Oct 08 22:35:05 2011 +0000
@@ -40,9 +40,7 @@
 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
 };
--- a/pidgin/plugins/gestures/gestures.c	Sat Oct 08 22:17:55 2011 +0000
+++ b/pidgin/plugins/gestures/gestures.c	Sat Oct 08 22:35:05 2011 +0000
@@ -145,7 +145,6 @@
 }
 
 #if 0
-#if GTK_CHECK_VERSION(2,4,0)
 static void
 mouse_button_menu_cb(GtkComboBox *opt, gpointer data)
 {
@@ -153,15 +152,6 @@
 
 	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
@@ -230,9 +220,6 @@
 	GtkWidget *toggle;
 #if 0
 	GtkWidget *opt;
-#if GTK_CHECK_VERSION(2,4,0)
-	GtkWidget *menu, *item;
-#endif
 #endif
 
 	/* Outside container */
@@ -243,7 +230,6 @@
 	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,26 +241,6 @@
 	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 */