summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-03-23 15:13:55 +0000
committerjstebbins <[email protected]>2011-03-23 15:13:55 +0000
commitb2b7423cbd647bae6fc7cccd1d39d6c06d6db88e (patch)
tree0e47ba44ff3dd775a05f3315b715e5c03601eb5f /gtk/src
parente63bdc7ee302f04c359f20c20fda35f0c16bcb5c (diff)
LinGui: backwards compatibility fix
gtk versions prior to 2.22 don't have gtk_widget_set/get_realized() func git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3876 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/ghbcompat.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk/src/ghbcompat.h b/gtk/src/ghbcompat.h
index 911f13262..24ad6bf35 100644
--- a/gtk/src/ghbcompat.h
+++ b/gtk/src/ghbcompat.h
@@ -8,12 +8,23 @@
#include <gdk/gdkkeysyms.h>
#endif
+#if !GTK_CHECK_VERSION(2, 22, 0)
// Define any keys not defined by older GDK versions
-#if !defined(GDK_KEY_Delete)
#define GDK_KEY_Delete GDK_Delete
#define GDK_KEY_Return GDK_Return
#define GDK_KEY_Down GDK_Down
#define GDK_KEY_Up GDK_Up
+
+// Replace simple accessor functions added to newer gtk versions
+static inline void gtk_widget_set_realized(GtkWidget *widget, gboolean realized)
+{
+ GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);
+}
+
+static inline gboolean gtk_widget_get_realized(GtkWidget *widget)
+{
+ return GTK_WIDGET_REALIZED(widget);
+}
#endif
#endif // _GHB_COMPAT_H_