[im-chooser] update EggSmClient code

Matthias Clasen mclasen at fedoraproject.org
Mon Jan 10 03:13:59 UTC 2011


commit 8c819a58c3269867dea9c6c815ce3dbebf7b4ad9
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Sun Jan 9 22:13:40 2011 -0500

    update EggSmClient code

 im-chooser-eggsmclient-update.patch |   40 +++++++++++++++++++++++++++++++++++
 im-chooser.spec                     |    4 +++
 2 files changed, 44 insertions(+), 0 deletions(-)
---
diff --git a/im-chooser-eggsmclient-update.patch b/im-chooser-eggsmclient-update.patch
new file mode 100644
index 0000000..bd6b607
--- /dev/null
+++ b/im-chooser-eggsmclient-update.patch
@@ -0,0 +1,40 @@
+diff -up im-chooser-1.4.1/src/ui/eggsmclient-private.h.gtk3 im-chooser-1.4.1/src/ui/eggsmclient-private.h
+--- im-chooser-1.4.1/src/ui/eggsmclient-private.h.gtk3	2011-01-09 22:11:50.731902005 -0500
++++ im-chooser-1.4.1/src/ui/eggsmclient-private.h	2011-01-09 22:12:25.741902266 -0500
+@@ -20,7 +20,13 @@
+ #ifndef __EGG_SM_CLIENT_PRIVATE_H__
+ #define __EGG_SM_CLIENT_PRIVATE_H__
+ 
++#include <gtk/gtk.h>
++
++#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0)
++/* GTK+ 3 includes this automatically */
+ #include <gdkconfig.h>
++#endif
++
+ #include "eggsmclient.h"
+ 
+ G_BEGIN_DECLS
+diff -up im-chooser-1.4.1/src/ui/eggsmclient-xsmp.c.gtk3 im-chooser-1.4.1/src/ui/eggsmclient-xsmp.c
+--- im-chooser-1.4.1/src/ui/eggsmclient-xsmp.c.gtk3	2011-01-09 22:12:00.378902003 -0500
++++ im-chooser-1.4.1/src/ui/eggsmclient-xsmp.c	2011-01-09 22:12:29.538902616 -0500
+@@ -36,6 +36,7 @@
+ #include <X11/SM/SMlib.h>
+ 
+ #include <gdk/gdk.h>
++#include <gdk/gdkx.h>
+ 
+ #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))
+@@ -367,7 +368,11 @@ sm_client_xsmp_startup (EggSMClient *cli
+       free (ret_client_id);
+ 
+       gdk_threads_enter ();
++#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0)
+       gdk_set_sm_client_id (xsmp->client_id);
++#else
++      gdk_x11_set_sm_client_id (xsmp->client_id);
++#endif
+       gdk_threads_leave ();
+ 
+       g_debug ("Got client ID \"%s\"", xsmp->client_id);
diff --git a/im-chooser.spec b/im-chooser.spec
index 850de7b..c37eace 100644
--- a/im-chooser.spec
+++ b/im-chooser.spec
@@ -11,6 +11,9 @@ BuildRequires:	desktop-file-utils intltool gettext
 
 Source0:	http://fedorahosted.org/releases/i/m/%{name}/%{name}-%{version}.tar.bz2
 
+# update eggsmclient code from upstream to fix build with gtk3
+Patch0:         im-chooser-eggsmclient-update.patch
+
 Summary:	Desktop Input Method configuration tool
 Group:		Applications/System
 Obsoletes:	system-switch-im
@@ -35,6 +38,7 @@ This package contains the control-center panel module on GNOME3.
 
 %prep
 %setup -q
+%patch0 -p1 -b .eggsmclient-update
 
 %build
 %configure --with-desktopfile=%{_datadir}/applications/fedora-im-chooser.desktop


More information about the scm-commits mailing list