[Xfce4-commits] <xfce4-panel:devel> Work around some gseal problems in the macros.
Nick Schermer
noreply at xfce.org
Tue Dec 22 14:28:01 CET 2009
Updating branch refs/heads/devel
to 8887bfc4cc0a79cece9afb1e2c4864227b3c2321 (commit)
from b80df3fa706b966c395d01f8b55870823b831a5b (commit)
commit 8887bfc4cc0a79cece9afb1e2c4864227b3c2321
Author: Nick Schermer <nick at xfce.org>
Date: Tue Dec 22 16:24:16 2009 +0100
Work around some gseal problems in the macros.
libxfce4panel/libxfce4panel-deprecated.h | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/libxfce4panel/libxfce4panel-deprecated.h b/libxfce4panel/libxfce4panel-deprecated.h
index 5ede1ed..1415c33 100644
--- a/libxfce4panel/libxfce4panel-deprecated.h
+++ b/libxfce4panel/libxfce4panel-deprecated.h
@@ -71,6 +71,12 @@ enum /*< skip >*/
#define _panel_g_type_register_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init) \
g_type_register_static_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init, 0)
+#if GTK_CHECK_VERSION (2, 14, 0)
+#define _panel_gtk_widget_get_window(w) gtk_widget_get_window (GTK_WIDGET (w))
+#else
+#define _panel_gtk_widget_get_window(w) (GTK_WIDGET (w)->window)
+#endif
+
#define XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(construct_func) \
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL (construct_func, NULL, NULL)
@@ -202,10 +208,10 @@ enum /*< skip >*/
&& GTK_WIDGET_DRAWABLE (plug) \
&& _xpp_alpha < 1.00) \
{ \
- cr = gdk_cairo_create (plug->window); \
+ cr = gdk_cairo_create (_panel_gtk_widget_get_window (plug)); \
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); \
\
- color = &(plug->style->bg[GTK_STATE_NORMAL]); \
+ color = &(gtk_widget_get_style (plug)->bg[GTK_STATE_NORMAL]); \
cairo_set_source_rgba (cr, \
color->red / 65535.00, \
color->green / 65535.00, \
More information about the Xfce4-commits
mailing list