diff --git a/configure.ac b/configure.ac index 2dc651edd..ef833dd24 100644 --- a/configure.ac +++ b/configure.ac @@ -59,7 +59,7 @@ CLUTTER_MIN_VERSION=1.2.0 GOBJECT_INTROSPECTION_MIN_VERSION=0.6.9 GJS_MIN_VERSION=0.6 MUTTER_MIN_VERSION=2.29.1 -GTK_MIN_VERSION=2.20.0 +GTK_MIN_VERSION=2.18.0 # Collect more than 20 libraries for a prize! PKG_CHECK_MODULES(MUTTER_PLUGIN, gio-unix-2.0 dbus-glib-1 diff --git a/src/Makefile-tray.am b/src/Makefile-tray.am index 86e41cc92..64e397f07 100644 --- a/src/Makefile-tray.am +++ b/src/Makefile-tray.am @@ -15,6 +15,7 @@ TRAY_STAMP_FILES = stamp-na-marshal.h # please, keep this sorted alphabetically tray_source = \ + gtk-compat.h \ tray/na-tray-child.c \ tray/na-tray-child.h \ tray/na-tray-manager.c \ diff --git a/src/Makefile.am b/src/Makefile.am index a78d10ef7..7fc7a56a9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,6 +82,7 @@ libgnome_shell_la_SOURCES = \ $(shell_built_sources) \ $(shell_public_headers_h) \ gnome-shell-plugin.c \ + gtk-compat.h \ shell-app.c \ shell-app-private.h \ shell-app-system.c \ diff --git a/src/gtk-compat.h b/src/gtk-compat.h new file mode 100644 index 000000000..9515205ab --- /dev/null +++ b/src/gtk-compat.h @@ -0,0 +1,19 @@ +#ifndef __GTK_COMPAT_H__ +#define __GTK_COMPAT_H__ + +#include + +/* Provide a compatibility layer for accessor functions introduced + * in GTK+ 2.20 which we need to build with GSEAL_ENABLE. + * That way it is still possible to build with GTK+ 2.18 when not + * using GSEAL_ENABLE + */ + +#if !GTK_CHECK_VERSION(2, 20, 0) + +#define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED (w) +#define gtk_widget_get_mapped(w) GTK_WIDGET_MAPPED (w) + +#endif /* GTK_CHECK_VERSION(2, 20, 0) */ + +#endif /* __GTK_COMPAT_H__ */ diff --git a/src/shell-embedded-window.c b/src/shell-embedded-window.c index 1f11780e7..ce084fb72 100644 --- a/src/shell-embedded-window.c +++ b/src/shell-embedded-window.c @@ -6,6 +6,7 @@ #include #include "shell-embedded-window-private.h" +#include "gtk-compat.h" /* This type is a subclass of GtkWindow that ties the window to a * ShellGtkEmbed; the window is reparented into the stage diff --git a/src/shell-gtk-embed.c b/src/shell-gtk-embed.c index 70573470d..0f763bf3a 100644 --- a/src/shell-gtk-embed.c +++ b/src/shell-gtk-embed.c @@ -3,6 +3,7 @@ #include "config.h" #include "shell-embedded-window-private.h" +#include "gtk-compat.h" #include #include diff --git a/src/tray/na-tray-child.c b/src/tray/na-tray-child.c index 19a307380..be0a616a4 100644 --- a/src/tray/na-tray-child.c +++ b/src/tray/na-tray-child.c @@ -23,6 +23,7 @@ #include #include "na-tray-child.h" +#include "gtk-compat.h" #include #include diff --git a/src/tray/na-tray-manager.c b/src/tray/na-tray-manager.c index cebc7adfd..4dee40974 100644 --- a/src/tray/na-tray-manager.c +++ b/src/tray/na-tray-manager.c @@ -25,6 +25,7 @@ #include #include "na-tray-manager.h" +#include "gtk-compat.h" #include #include