cpw.qulogic.gtk3: f87ae859: Fix all deprecated GTK_WIDGET_* macros.

qulogic at pidgin.im qulogic at pidgin.im
Sun Oct 9 04:34:57 EDT 2011


----------------------------------------------------------------------
Revision: f87ae8592ef8d696073cc528016b5b5b024eea23
Parent:   64a8ae2420edbcee9629c0983b9e301382f35bcb
Author:   qulogic at pidgin.im
Date:     10/08/11 22:50:20
Branch:   im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/f87ae8592ef8d696073cc528016b5b5b024eea23

Changelog: 

Fix all deprecated GTK_WIDGET_* macros.

Changes against parent 64a8ae2420edbcee9629c0983b9e301382f35bcb

  patched  pidgin/gtkblist.c
  patched  pidgin/gtkcellrendererexpander.c
  patched  pidgin/gtkconv.c
  patched  pidgin/gtkdebug.c
  patched  pidgin/gtkimhtml.c
  patched  pidgin/gtkimhtmltoolbar.c
  patched  pidgin/gtkmenutray.c
  patched  pidgin/gtknotify.c
  patched  pidgin/gtkpounce.c
  patched  pidgin/gtkrequest.c
  patched  pidgin/gtksavedstatuses.c
  patched  pidgin/gtkstatusbox.c
  patched  pidgin/gtkutils.c

-------------- next part --------------
============================================================
--- pidgin/gtkimhtml.c	8582542bb005869a469c102865df4937898cbaab
+++ pidgin/gtkimhtml.c	c3108ad13449facac9c5d8bf623295ae1dbb06eb
@@ -65,6 +65,16 @@
 
 #define TOOLTIP_TIMEOUT 500
 
+#if !GTK_CHECK_VERSION(2,20,0)
+#define gtk_widget_get_realized(x) GTK_WIDGET_REALIZED(x)
+
+#if !GTK_CHECK_VERSION(2,18,0)
+#define gtk_widget_get_has_window(x) !GTK_WIDGET_NO_WINDOW(x)
+#define gtk_widget_get_state(x) GTK_WIDGET_STATE(x)
+#define gtk_widget_is_drawable(x) GTK_WIDGET_DRAWABLE(x)
+#endif
+#endif
+
 static GtkTextViewClass *parent_class = NULL;
 
 struct scalable_data {
@@ -422,7 +432,7 @@ static void gtk_imhtml_size_allocate(Gtk
 
 	/* Don't scroll here if we're in the middle of a smooth scroll */
 	if (scroll && imhtml->scroll_time == NULL &&
-	    GTK_WIDGET_REALIZED(imhtml))
+	    gtk_widget_get_realized(GTK_WIDGET(imhtml)))
 		gtk_imhtml_scroll_to_end(imhtml, FALSE);
 }
 
@@ -539,7 +549,7 @@ gtk_imhtml_tip (gpointer data)
 
 	g_return_val_if_fail(GTK_IS_IMHTML(imhtml), FALSE);
 
-	if (!imhtml->tip || !GTK_WIDGET_DRAWABLE (GTK_WIDGET(imhtml))) {
+	if (!imhtml->tip || !gtk_widget_is_drawable (GTK_WIDGET(imhtml))) {
 		imhtml->tip_timer = 0;
 		return FALSE;
 	}
@@ -592,7 +602,7 @@ gtk_imhtml_tip (gpointer data)
 	h = 8 + baseline_skip;
 
 	gdk_window_get_pointer (NULL, &x, &y, NULL);
-	if (GTK_WIDGET_NO_WINDOW (GTK_WIDGET(imhtml)))
+	if (!gtk_widget_get_has_window (GTK_WIDGET(imhtml)))
 		y += GTK_WIDGET(imhtml)->allocation.y;
 
 	scr_w = gdk_screen_width();
@@ -788,7 +798,7 @@ gtk_imhtml_expose_event (GtkWidget      
 			gdk_color_parse(GTK_IMHTML(widget)->edit.background, &gcolor);
 			gdk_cairo_set_source_color(cr, &gcolor);
 		} else {
-			gdk_cairo_set_source_color(cr, &(widget->style->base[GTK_WIDGET_STATE(widget)]));
+			gdk_cairo_set_source_color(cr, &(widget->style->base[gtk_widget_get_state(widget)]));
 		}
 
 		cairo_rectangle(cr,
============================================================
--- pidgin/gtkconv.c	32b21d5a450f137b105a01d72ebfa5abacba3ad2
+++ pidgin/gtkconv.c	9cf1c4e20e6a8e6e94064cb42dbb85bf867f63aa
@@ -80,6 +80,15 @@
 
 #include "gtknickcolors.h"
 
+#if !GTK_CHECK_VERSION(2,20,0)
+#define gtk_widget_get_realized(x) GTK_WIDGET_REALIZED(x)
+
+#if !GTK_CHECK_VERSION(2,18,0)
+#define gtk_widget_get_visible(x) GTK_WIDGET_VISIBLE(x)
+#define gtk_widget_is_drawable(x) GTK_WIDGET_DRAWABLE(x)
+#endif
+#endif
+
 /**
  * A GTK+ Instant Message pane.
  */
@@ -7205,7 +7214,7 @@ pidgin_conv_update_fields(PurpleConversa
 		if (title != markup)
 			g_free(markup);
 
-		if (!GTK_WIDGET_REALIZED(gtkconv->tab_label))
+		if (!gtk_widget_get_realized(gtkconv->tab_label))
 			gtk_widget_realize(gtkconv->tab_label);
 
 		accessibility_obj = gtk_widget_get_accessible(gtkconv->tab_cont);
@@ -7599,7 +7608,7 @@ pidgin_conv_get_tab_at_xy(PidginWindow *
 		tab = gtk_notebook_get_tab_label(GTK_NOTEBOOK(notebook), page);
 
 		/* Make sure the tab is not hidden beyond an arrow */
-		if (!GTK_WIDGET_DRAWABLE(tab) && gtk_notebook_get_show_tabs(notebook))
+		if (!gtk_widget_is_drawable(tab) && gtk_notebook_get_show_tabs(notebook))
 			continue;
 
 		if (horiz) {
@@ -9446,7 +9455,7 @@ infopane_entry_activate(PidginConversati
 	PurpleConversation *conv = gtkconv->active_conv;
 	const char *text = NULL;
 
-	if (!GTK_WIDGET_VISIBLE(gtkconv->infopane)) {
+	if (!gtk_widget_get_visible(gtkconv->infopane)) {
 		/* There's already an entry for alias. Let's not create another one. */
 		return FALSE;
 	}
@@ -9606,7 +9615,7 @@ static gboolean gtk_conv_configure_cb(Gt
 static gboolean gtk_conv_configure_cb(GtkWidget *w, GdkEventConfigure *event, gpointer data) {
 	int x, y;
 
-	if (GTK_WIDGET_VISIBLE(w))
+	if (gtk_widget_get_visible(w))
 		gtk_window_get_position(GTK_WINDOW(w), &x, &y);
 	else
 		return FALSE; /* carry on normally */
@@ -9641,7 +9650,7 @@ pidgin_conv_set_position_size(PidginWind
 	 /* if the window exists, is hidden, we're saving positions, and the
           * position is sane... */
 	if (win && win->window &&
-			!GTK_WIDGET_VISIBLE(win->window) && conv_width != 0) {
+			!gtk_widget_get_visible(win->window) && conv_width != 0) {
 
 #ifdef _WIN32  /* only override window manager placement on Windows */
 		/* ...check position is on screen... */
@@ -10246,7 +10255,7 @@ conv_placement_last_created_win_type_con
 	PurpleConversationType type = purple_conversation_get_type(conv->active_conv);
 	GList *all;
 
-	if (GTK_WIDGET_VISIBLE(w))
+	if (gtk_widget_get_visible(w))
 		gtk_window_get_position(GTK_WINDOW(w), &x, &y);
 	else
 		return FALSE; /* carry on normally */
============================================================
--- pidgin/gtkutils.c	b23387cb1db6bc1515a1c266ec1a258908f24e6e
+++ pidgin/gtkutils.c	16e057ad2d67a180c6ed446dea01ba5abe68e7a3
@@ -70,6 +70,11 @@
 #include "gtkwebview.h"
 #include "pidgin/minidialog.h"
 
+#if !GTK_CHECK_VERSION(2,18,0)
+#define gtk_widget_get_visible(x) GTK_WIDGET_VISIBLE(x)
+#define gtk_widget_is_sensitive(x) GTK_WIDGET_IS_SENSITIVE(x)
+#endif
+
 typedef struct {
 	GtkTreeModel *model;
 	gint default_item;
@@ -356,7 +361,7 @@ pidgin_toggle_sensitive(GtkWidget *widge
 	if (to_toggle == NULL)
 		return;
 
-	sensitivity = GTK_WIDGET_IS_SENSITIVE(to_toggle);
+	sensitivity = gtk_widget_is_sensitive(to_toggle);
 
 	gtk_widget_set_sensitive(to_toggle, !sensitivity);
 }
@@ -373,7 +378,7 @@ pidgin_toggle_sensitive_array(GtkWidget 
 		if (element == NULL)
 			continue;
 
-		sensitivity = GTK_WIDGET_IS_SENSITIVE(element);
+		sensitivity = gtk_widget_is_sensitive(element);
 
 		gtk_widget_set_sensitive(element, !sensitivity);
 	}
@@ -385,7 +390,7 @@ pidgin_toggle_showhide(GtkWidget *widget
 	if (to_toggle == NULL)
 		return;
 
-	if (GTK_WIDGET_VISIBLE(to_toggle))
+	if (gtk_widget_get_visible(to_toggle))
 		gtk_widget_hide(to_toggle);
 	else
 		gtk_widget_show(to_toggle);
@@ -2991,7 +2996,7 @@ gboolean pidgin_auto_parent_window(GtkWi
 		windows = g_list_delete_link(windows, windows);
 
 		if (window == widget ||
-				!GTK_WIDGET_VISIBLE(window))
+				!gtk_widget_get_visible(window))
 			continue;
 
 		if (!gdk_property_get(window->window, _WindowTime, _Cardinal, 0, sizeof(time_t), FALSE,
@@ -3045,7 +3050,7 @@ gboolean pidgin_auto_parent_window(GtkWi
 		windows = g_list_delete_link(windows, windows);
 
 		if (window == widget ||
-				!GTK_WIDGET_VISIBLE(window)) {
+				!gtk_widget_get_visible(window)) {
 			continue;
 		}
 
============================================================
--- pidgin/gtkpounce.c	91cb352e3bb67038d882c0212da4497f10d43d16
+++ pidgin/gtkpounce.c	74f44bbd73c8346e3b7a2851ae58fb0fc45c6ad9
@@ -1018,7 +1018,11 @@ pounces_manager_configure_cb(GtkWidget *
 static gboolean
 pounces_manager_configure_cb(GtkWidget *widget, GdkEventConfigure *event, PouncesManager *dialog)
 {
+#if GTK_CHECK_VERSION(2,18,0)
+	if (gtk_widget_get_visible(widget)) {
+#else
 	if (GTK_WIDGET_VISIBLE(widget)) {
+#endif
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/pounces/dialog/width",  event->width);
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/pounces/dialog/height", event->height);
 	}
============================================================
--- pidgin/gtkdebug.c	f8426fc49b7e7e33021a3f78510bb72de71ea44b
+++ pidgin/gtkdebug.c	1c51a02d41acfcaeb63dde3d6a38d384d6db5575
@@ -128,7 +128,11 @@ configure_cb(GtkWidget *w, GdkEventConfi
 static gboolean
 configure_cb(GtkWidget *w, GdkEventConfigure *event, DebugWindow *win)
 {
+#if GTK_CHECK_VERSION(2,18,0)
+	if (gtk_widget_get_visible(w)) {
+#else
 	if (GTK_WIDGET_VISIBLE(w)) {
+#endif
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/width",  event->width);
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/debug/height", event->height);
 	}
@@ -625,7 +629,11 @@ regex_key_release_cb(GtkWidget *w, GdkEv
 static void
 regex_key_release_cb(GtkWidget *w, GdkEventKey *e, DebugWindow *win) {
 	if(e->keyval == GDK_Return &&
+#if GTK_CHECK_VERSION(2,18,0)
+	   gtk_widget_is_sensitive(win->filter) &&
+#else
 	   GTK_WIDGET_IS_SENSITIVE(win->filter) &&
+#endif
 	   !gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter)))
 	{
 		gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), TRUE);
============================================================
--- pidgin/gtkblist.c	2687fd98f885cc253dbc294c6fb584bbaff8b08f
+++ pidgin/gtkblist.c	361a96d3e7ac0bd8a7c3d99ccc35c44265d5c8a5
@@ -124,6 +124,11 @@ typedef struct
 #define PIDGIN_BUDDY_LIST_GET_PRIVATE(list) \
 	((PidginBuddyListPrivate *)((list)->priv))
 
+#if !GTK_CHECK_VERSION(2,18,0)
+#define gtk_widget_get_visible(x) GTK_WIDGET_VISIBLE(x)
+#define gtk_widget_has_focus(x) GTK_WIDGET_HAS_FOCUS(x)
+#endif
+
 static guint accounts_merge_id;
 static GtkActionGroup *accounts_action_group = NULL;
 
@@ -245,7 +250,7 @@ static gboolean gtk_blist_configure_cb(G
 
 	/* check for visibility because when we aren't visible, this will   *
 	 * give us bogus (0,0) coordinates.                      - xOr      */
-	if (GTK_WIDGET_VISIBLE(w))
+	if (gtk_widget_get_visible(w))
 		gtk_window_get_position(GTK_WINDOW(w), &x, &y);
 	else
 		return FALSE; /* carry on normally */
@@ -4456,7 +4461,7 @@ static void pidgin_blist_restore_positio
 	/* if the window exists, is hidden, we're saving positions, and the
 	 * position is sane... */
 	if (gtkblist && gtkblist->window &&
-		!GTK_WIDGET_VISIBLE(gtkblist->window) && blist_width != 0) {
+		!gtk_widget_get_visible(gtkblist->window) && blist_width != 0) {
 
 		blist_x      = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/x");
 		blist_y      = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/blist/y");
@@ -4486,7 +4491,7 @@ static gboolean pidgin_blist_refresh_tim
 	PurpleBlistNode *gnode, *cnode;
 
 	if (gtk_blist_visibility == GDK_VISIBILITY_FULLY_OBSCURED
-			|| !GTK_WIDGET_VISIBLE(gtkblist->window))
+			|| !gtk_widget_get_visible(gtkblist->window))
 		return TRUE;
 
 	for(gnode = list->root; gnode; gnode = gnode->next) {
@@ -6995,7 +7000,7 @@ static void pidgin_blist_set_visible(Pur
 		return;
 
 	if (show) {
-		if(!PIDGIN_WINDOW_ICONIFIED(gtkblist->window) && !GTK_WIDGET_VISIBLE(gtkblist->window))
+		if(!PIDGIN_WINDOW_ICONIFIED(gtkblist->window) && !gtk_widget_get_visible(gtkblist->window))
 			purple_signal_emit(pidgin_blist_get_handle(), "gtkblist-unhiding", gtkblist);
 		pidgin_blist_restore_position();
 		gtk_window_present(GTK_WINDOW(gtkblist->window));
@@ -7004,7 +7009,7 @@ static void pidgin_blist_set_visible(Pur
 			purple_signal_emit(pidgin_blist_get_handle(), "gtkblist-hiding", gtkblist);
 			gtk_widget_hide(gtkblist->window);
 		} else {
-			if (!GTK_WIDGET_VISIBLE(gtkblist->window))
+			if (!gtk_widget_get_visible(gtkblist->window))
 				gtk_widget_show(gtkblist->window);
 			gtk_window_iconify(GTK_WINDOW(gtkblist->window));
 		}
@@ -7409,7 +7414,7 @@ pidgin_blist_toggle_visibility()
 pidgin_blist_toggle_visibility()
 {
 	if (gtkblist && gtkblist->window) {
-		if (GTK_WIDGET_VISIBLE(gtkblist->window)) {
+		if (gtk_widget_get_visible(gtkblist->window)) {
 			/* make the buddy list visible if it is iconified or if it is
 			 * obscured and not currently focused (the focus part ensures
 			 * that we do something reasonable if the buddy list is obscured
@@ -7474,7 +7479,7 @@ set_urgent(void)
 static void
 set_urgent(void)
 {
-	if (gtkblist->window && !GTK_WIDGET_HAS_FOCUS(gtkblist->window))
+	if (gtkblist->window && !gtk_widget_has_focus(gtkblist->window))
 		pidgin_set_urgent(GTK_WINDOW(gtkblist->window), TRUE);
 }
 
============================================================
--- pidgin/gtknotify.c	ac2319fc013ff53277e4a94347db774676c037ac
+++ pidgin/gtknotify.c	f6e05e6f359711f92980ff231679f5690870c46a
@@ -777,7 +777,11 @@ pidgin_notify_emails(PurpleConnection *g
 		}
 	}
 
+#if GTK_CHECK_VERSION(2,18,0)
+	if (!gtk_widget_get_visible(mail_dialog->dialog)) {
+#else
 	if (!GTK_WIDGET_VISIBLE(mail_dialog->dialog)) {
+#endif
 		GdkPixbuf *pixbuf = gtk_widget_render_icon(mail_dialog->dialog, PIDGIN_STOCK_DIALOG_MAIL,
 							   gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL), NULL);
 		char *label_text = g_strdup_printf(ngettext("<b>%d new email.</b>",
@@ -793,7 +797,11 @@ pidgin_notify_emails(PurpleConnection *g
 		g_free(label_text);
 		if (pixbuf)
 			g_object_unref(pixbuf);
+#if GTK_CHECK_VERSION(2,18,0)
+	} else if (!gtk_widget_has_focus(mail_dialog->dialog))
+#else
 	} else if (!GTK_WIDGET_HAS_FOCUS(mail_dialog->dialog))
+#endif
 		pidgin_set_urgent(GTK_WINDOW(mail_dialog->dialog), TRUE);
 
 	return data;
============================================================
--- pidgin/gtkrequest.c	9a7b1178b56346565f239204e45deadba3515748
+++ pidgin/gtkrequest.c	cb7b1638eb5f32651de9c1f6743d4ed9624fd7a7
@@ -263,7 +263,11 @@ multifield_ok_cb(GtkWidget *button, Pidg
 {
 	generic_response_start(data);
 
+#if GTK_CHECK_VERSION(2,18,0)
+	if (!gtk_widget_has_focus(button))
+#else
 	if (!GTK_WIDGET_HAS_FOCUS(button))
+#endif
 		gtk_widget_grab_focus(button);
 
 	if (data->cbs[0] != NULL)
============================================================
--- pidgin/gtkimhtmltoolbar.c	7872e60a5ea3c549ef2e389954705c308501cba9
+++ pidgin/gtkimhtmltoolbar.c	5e1a2065179318713da9d4977fbc7c4765a3b0b0
@@ -43,6 +43,11 @@
 
 #include <gdk/gdkkeysyms.h>
 
+#if !GTK_CHECK_VERSION(2,18,0)
+#define gtk_widget_get_visible(x) GTK_WIDGET_VISIBLE(x)
+#define gtk_widget_is_sensitive(x) GTK_WIDGET_IS_SENSITIVE(x)
+#endif
+
 static GtkHBoxClass *parent_class = NULL;
 
 static void toggle_button_set_active_block(GtkToggleButton *button,
@@ -1196,7 +1201,7 @@ gtk_imhtmltoolbar_popup_menu(GtkWidget *
 	if (event->button != 3)
 		return FALSE;
 
-	wide = GTK_WIDGET_VISIBLE(toolbar->bold);
+	wide = gtk_widget_get_visible(toolbar->bold);
 
 	menu = gtk_menu_new();
 	item = gtk_menu_item_new_with_mnemonic(wide ? _("Group Items") : _("Ungroup Items"));
@@ -1291,7 +1296,7 @@ button_visibility_changed(GtkWidget *but
 static void
 button_visibility_changed(GtkWidget *button, gpointer dontcare, GtkWidget *item)
 {
-	if (GTK_WIDGET_VISIBLE(button))
+	if (gtk_widget_get_visible(button))
 		gtk_widget_hide(item);
 	else
 		gtk_widget_show(item);
@@ -1300,7 +1305,7 @@ button_sensitiveness_changed(GtkWidget *
 static void
 button_sensitiveness_changed(GtkWidget *button, gpointer dontcare, GtkWidget *item)
 {
-	gtk_widget_set_sensitive(item, GTK_WIDGET_IS_SENSITIVE(button));
+	gtk_widget_set_sensitive(item, gtk_widget_is_sensitive(button));
 }
 
 static void
============================================================
--- pidgin/gtksavedstatuses.c	141ac008e46b318c9b9943cbe757b8203b5154b5
+++ pidgin/gtksavedstatuses.c	f6982dc2c237ab48f1bec14d3ca059cb8e061ed3
@@ -524,7 +524,11 @@ configure_cb(GtkWidget *widget, GdkEvent
 static gboolean
 configure_cb(GtkWidget *widget, GdkEventConfigure *event, StatusWindow *dialog)
 {
+#if GTK_CHECK_VERSION(2,18,0)
+	if (gtk_widget_get_visible(widget))
+#else
 	if (GTK_WIDGET_VISIBLE(widget))
+#endif
 	{
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/status/dialog/width",  event->width);
 		purple_prefs_set_int(PIDGIN_PREFS_ROOT "/status/dialog/height", event->height);
============================================================
--- pidgin/gtkstatusbox.c	f21ab86002a651a8470d90daf156bfa1e5f9acb9
+++ pidgin/gtkstatusbox.c	cedf6ff878cea2c09eaa314309c75748d50a7d55
@@ -70,6 +70,10 @@
 /* Timeout for typing notifications in seconds */
 #define TYPING_TIMEOUT 4
 
+#if !GTK_CHECK_VERSION(2,18,0)
+#define gtk_widget_is_sensitive(x) GTK_WIDGET_IS_SENSITIVE(x)
+#endif
+
 static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data);
 static void imhtml_format_changed_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, void *data);
 static void remove_typing_cb(PidginStatusBox *box);
@@ -2625,7 +2629,7 @@ static void pidgin_status_box_changed(Pi
 		purple_timeout_remove(status_box->typing);
 	status_box->typing = 0;
 
-	if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box)))
+	if (gtk_widget_is_sensitive(GTK_WIDGET(status_box)))
 	{
 		if (type == PIDGIN_STATUS_BOX_TYPE_POPULAR || type == PIDGIN_STATUS_BOX_TYPE_SAVED_POPULAR)
 		{
@@ -2687,7 +2691,7 @@ static void pidgin_status_box_changed(Pi
 	}
 	g_list_free(accounts);
 
-	if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box)))
+	if (gtk_widget_is_sensitive(GTK_WIDGET(status_box)))
 	{
 		if (status_box->imhtml_visible)
 		{
@@ -2743,7 +2747,7 @@ static void imhtml_changed_cb(GtkTextBuf
 static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data)
 {
 	PidginStatusBox *status_box = (PidginStatusBox*)data;
-	if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box)))
+	if (gtk_widget_is_sensitive(GTK_WIDGET(status_box)))
 	{
 		if (status_box->typing != 0) {
 			pidgin_status_box_pulse_typing(status_box);
============================================================
--- pidgin/gtkmenutray.c	016012e872fd980cd6e935ac2f42953c87a57e91
+++ pidgin/gtkmenutray.c	f07a230cf8c60c93d564b7dc567fd301cda0fe81
@@ -40,6 +40,10 @@ static GObjectClass *parent_class = NULL
  * Internal Stuff
  *****************************************************************************/
 
+#if !GTK_CHECK_VERSION(2,18,0)
+#define gtk_widget_get_has_window(x) !GTK_WIDGET_NO_WINDOW(x)
+#endif
+
 /******************************************************************************
  * Item Stuff
  *****************************************************************************/
@@ -209,7 +213,7 @@ pidgin_menu_tray_add(PidginMenuTray *men
 	g_return_if_fail(PIDGIN_IS_MENU_TRAY(menu_tray));
 	g_return_if_fail(GTK_IS_WIDGET(widget));
 
-	if (GTK_WIDGET_NO_WINDOW(widget))
+	if (!gtk_widget_get_has_window(widget))
 	{
 		GtkWidget *event;
 
@@ -256,7 +260,7 @@ pidgin_menu_tray_set_tooltip(PidginMenuT
 	 * case, we want to set the tooltip on the widget's parent,
 	 * not on the widget itself.
 	 */
-	if (GTK_WIDGET_NO_WINDOW(widget))
+	if (!gtk_widget_get_has_window(widget))
 		widget = widget->parent;
 
 #if GTK_CHECK_VERSION(2,12,0)
============================================================
--- pidgin/gtkcellrendererexpander.c	01bc91354dc0835326ffc257cbb92d1efe223cb4
+++ pidgin/gtkcellrendererexpander.c	8251823853d9dead3d8f867585f16f5ec79f8ac3
@@ -250,8 +250,13 @@ static void pidgin_cell_renderer_expande
 		state = GTK_STATE_INSENSITIVE;
 	else if (flags & GTK_CELL_RENDERER_PRELIT)
 		state = GTK_STATE_PRELIGHT;
+#if GTK_CHECK_VERSION(2,18,0)
+	else if (gtk_widget_has_focus (widget) && flags & GTK_CELL_RENDERER_SELECTED)
+		state = GTK_STATE_ACTIVE;
+#else
 	else if (GTK_WIDGET_HAS_FOCUS (widget) && flags & GTK_CELL_RENDERER_SELECTED)
 		state = GTK_STATE_ACTIVE;
+#endif
 	else
 		state = GTK_STATE_NORMAL;
 


More information about the Commits mailing list