[nautilus-actions] Apply Mathias Clasen patch to build against Gtk+ 2.91.7



commit 86436f9cffe59685fc93c2ab19d837aa44974fdb
Author: Pierre Wieser <pwieser trychlos org>
Date:   Thu Dec 23 01:57:31 2010 +0100

    Apply Mathias Clasen patch to build against Gtk+ 2.91.7

 ChangeLog                        |    4 ++++
 src/nact/egg-sm-client-private.h |    9 +++++++++
 src/nact/egg-sm-client-xsmp.c    |   11 +++++++++++
 3 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a1b2c6d..47c721b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-12-22 Pierre Wieser <pwieser trychlos org>
 
+	* src/nact/egg-sm-client-private.h:
+	* src/nact/egg-sm-client-xsmp.c:
+	Apply Mathias Clasen patch to build against Gtk+ 2.91.7.
+
 	* doc/reference/Makefile.am: include auto created files in
 	content_files, so that they are build before XML generation.
 
diff --git a/src/nact/egg-sm-client-private.h b/src/nact/egg-sm-client-private.h
index d13ca89..cc5de42 100644
--- a/src/nact/egg-sm-client-private.h
+++ b/src/nact/egg-sm-client-private.h
@@ -20,7 +20,16 @@
 #ifndef __EGG_SM_CLIENT_PRIVATE_H__
 #define __EGG_SM_CLIENT_PRIVATE_H__
 
+/* patch provided by Mathias Clasen
+ * see http://git.gnome.org/browse/libegg/commit/?id=0be81fa47fb5dabba2be40888ed5d4b16f0ae6a3
+ */
+#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 91 && GTK_MICRO_VERSION >= 7 ) || GTK_MAJOR_VERSION >= 3 )
+#include <gtk/gtk.h>
+#else
+/* GTK+ 3 includes this automatically */
 #include <gdkconfig.h>
+#endif
+
 #include "egg-sm-client.h"
 
 G_BEGIN_DECLS
diff --git a/src/nact/egg-sm-client-xsmp.c b/src/nact/egg-sm-client-xsmp.c
index 41d2636..1456702 100644
--- a/src/nact/egg-sm-client-xsmp.c
+++ b/src/nact/egg-sm-client-xsmp.c
@@ -37,6 +37,13 @@
 
 #include <gdk/gdk.h>
 
+/* patch provided by Mathias Clasen
+ * see http://git.gnome.org/browse/libegg/commit/?id=0be81fa47fb5dabba2be40888ed5d4b16f0ae6a3
+ */
+#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 91 && GTK_MICRO_VERSION >= 7 ) || GTK_MAJOR_VERSION >= 3 )
+#include <gdk/gdkx.h>
+#endif
+
 #define EGG_TYPE_SM_CLIENT_XSMP            (egg_sm_client_xsmp_get_type ())
 #define EGG_SM_CLIENT_XSMP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMP))
 #define EGG_SM_CLIENT_XSMP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMPClass))
@@ -373,7 +380,11 @@ sm_client_xsmp_startup (EggSMClient *client,
       free (ret_client_id);
 
       gdk_threads_enter ();
+#if(( GTK_MAJOR_VERSION >= 2 && GTK_MINOR_VERSION >= 91 && GTK_MICRO_VERSION >= 7 ) || GTK_MAJOR_VERSION >= 3 )
+      gdk_x11_set_sm_client_id (xsmp->client_id);
+#else
       gdk_set_sm_client_id (xsmp->client_id);
+#endif
       gdk_threads_leave ();
 
       g_debug ("Got client ID \"%s\"", xsmp->client_id);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]