Patchwork [ui/gtk,12/13] Add compat macro for gtk_widget_get_realized

login
register
mail settings
Submitter Daniel P. Berrange
Date Feb. 25, 2013, 3:20 p.m.
Message ID <1361805646-6425-13-git-send-email-berrange@redhat.com>
Download mbox | patch
Permalink /patch/222934/
State New
Headers show

Comments

Daniel P. Berrange - Feb. 25, 2013, 3:20 p.m.
From: "Daniel P. Berrange" <berrange@redhat.com>

The gtk_widget_get_realized method only arrived in GTK 2.20,
so defined a compat macro for earlier GTK

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 ui/gtk.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/ui/gtk.c b/ui/gtk.c
index fa4c3b0..82f0bb2 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -84,6 +84,11 @@  static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 }
 #endif
 
+#if !GTK_CHECK_VERSION(2, 20, 0)
+#define gtk_widget_get_realized(widget) GTK_WIDGET_REALIZED(widget)
+#endif
+
+
 typedef struct VirtualConsole
 {
     GtkWidget *menu_item;