cpw.qulogic.gtk3: efc68ab9: gtk_widget_[gs]et_{mapped, realized} were...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Jul 26 02:01:32 EDT 2010
----------------------------------------------------------------------
Revision: efc68ab9763f6883dbfc28aaae3fb6cf2a00c8b5
Parent: 5cac5b3331dee001c9eba7b299ac74199aced3ec
Author: qulogic at pidgin.im
Date: 07/25/10 18:37:17
Branch: im.pidgin.cpw.qulogic.gtk3
URL: http://d.pidgin.im/viewmtn/revision/info/efc68ab9763f6883dbfc28aaae3fb6cf2a00c8b5
Changelog:
gtk_widget_[gs]et_{mapped,realized} were added in GTK+ 2.20.
Changes against parent 5cac5b3331dee001c9eba7b299ac74199aced3ec
patched pidgin/plugins/ticker/gtkticker.c
-------------- next part --------------
============================================================
--- pidgin/plugins/ticker/gtkticker.c ac84823185d2a8b83be62ff02a79f396205a2ef5
+++ pidgin/plugins/ticker/gtkticker.c 8b3633ad35e56f82b27ce97c16cae683d4e48e23
@@ -21,27 +21,23 @@
* GtkTicker Copyright 2000 Syd Logan
*/
-/* FIXME: GTK+ deprecated GTK_WIDGET_MAPPED/REALIZED, but don't provide
- accessor functions yet. */
-#undef GSEAL_ENABLE
-
#include "gtkticker.h"
#include <gtk/gtk.h>
-/* These don't seem to be in a release yet. See BZ #69872 */
-#define gtk_widget_is_mapped(x) GTK_WIDGET_MAPPED(x)
-#define gtk_widget_is_realized(x) GTK_WIDGET_REALIZED(x)
-#define gtk_widget_set_realized(x,y) do {\
+#if !GTK_CHECK_VERSION(2,20,0)
+#define gtk_widget_get_mapped(x) GTK_WIDGET_MAPPED(x)
+#define gtk_widget_set_mapped(x,y) do {\
if (y) \
- GTK_WIDGET_SET_FLAGS(x, GTK_REALIZED); \
+ GTK_WIDGET_SET_FLAGS(x, GTK_MAPPED); \
else \
- GTK_WIDGET_UNSET_FLAGS(x, GTK_REALIZED); \
+ GTK_WIDGET_UNSET_FLAGS(x, GTK_MAPPED); \
} while(0)
-#define gtk_widget_set_mapped(x,y) do {\
+#define gtk_widget_get_realized(x) GTK_WIDGET_REALIZED(x)
+#define gtk_widget_set_realized(x,y) do {\
if (y) \
- GTK_WIDGET_SET_FLAGS(x, GTK_MAPPED); \
+ GTK_WIDGET_SET_FLAGS(x, GTK_REALIZED); \
else \
- GTK_WIDGET_UNSET_FLAGS(x, GTK_MAPPED); \
+ GTK_WIDGET_UNSET_FLAGS(x, GTK_REALIZED); \
} while(0)
#if !GTK_CHECK_VERSION(2,18,0)
@@ -51,6 +47,7 @@
#define gtk_widget_get_window(x) x->window
#endif
#endif
+#endif
static void gtk_ticker_compute_offsets (GtkTicker *ticker);
static void gtk_ticker_class_init (GtkTickerClass *klass);
@@ -181,13 +178,13 @@ static void gtk_ticker_put (GtkTicker *t
ticker->children = g_list_append (ticker->children, child_info);
- if (gtk_widget_is_realized (ticker))
+ if (gtk_widget_get_realized (ticker))
gtk_widget_realize (widget);
if (gtk_widget_get_visible (GTK_WIDGET (ticker)) &&
gtk_widget_get_visible (widget))
{
- if (gtk_widget_is_mapped (GTK_WIDGET (ticker)))
+ if (gtk_widget_get_mapped (GTK_WIDGET (ticker)))
gtk_widget_map (widget);
gtk_widget_queue_resize (GTK_WIDGET (ticker));
@@ -298,7 +295,7 @@ static void gtk_ticker_map (GtkWidget *w
children = children->next;
if (gtk_widget_get_visible (child->widget) &&
- !gtk_widget_is_mapped (child->widget))
+ !gtk_widget_get_mapped (child->widget))
gtk_widget_map (child->widget);
}
@@ -474,7 +471,7 @@ static void gtk_ticker_size_allocate (Gt
#else
widget->allocation = *allocation;
#endif
- if (gtk_widget_is_realized (widget))
+ if (gtk_widget_get_realized (widget))
gdk_window_move_resize (gtk_widget_get_window (widget),
allocation->x,
allocation->y,
More information about the Commits
mailing list