[pan2: 3/8] added gtk-compat
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2: 3/8] added gtk-compat
- Date: Fri, 21 Dec 2012 22:03:09 +0000 (UTC)
commit b9184627b587a471f360aec72fee103f10c5f7c0
Author: Heinrich MÃller <henmull src gnome org>
Date: Wed Oct 3 12:00:17 2012 +0200
added gtk-compat
pan/gui/gtk-compat.h | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/pan/gui/gtk-compat.h b/pan/gui/gtk-compat.h
index 030ade6..074ba47 100644
--- a/pan/gui/gtk-compat.h
+++ b/pan/gui/gtk-compat.h
@@ -78,10 +78,7 @@ static inline GdkWindow * gdk_window_get_device_position (GdkWindow *window,
gdk_window_get_device_position (event->window, event->device, x, y, t);
#endif
}
- ret = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
-#endif
- return ret;
- }
+
#if !GTK_CHECK_VERSION(2,18,0)
static inline void gtk_widget_get_allocation( GtkWidget *w, GtkAllocation *a)
@@ -189,15 +186,22 @@ static inline GdkWindow * gdk_window_get_device_position (GdkWindow *window,
gtk_widget_modify_font(w,f);
}
#endif
+
#if GTK_CHECK_VERSION(3,0,0)
+// include this for conversion of old key names to new
#include <gdk/gdkkeysyms-compat.h>
+
#define GTK_OBJECT(w) w
+ typedef GtkWidget GtkObject;
#endif
static inline void cursor_unref(GdkCursor *p)
+ {
#if GTK_CHECK_VERSION(3,0,0)
+ g_object_unref(p);
#else
gdk_cursor_unref(p);
+#endif
}
#ifdef __cplusplus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]