[jhbuild] Make ibus build against dconf again



commit 327aa165bb237604b1ce5b5c6d89ce1d7aeb8554
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jul 17 21:33:57 2012 -0400

    Make ibus build against dconf again
    
    The IBus configuration backend for dconf uses DConfClient
    directly and is thus affected by the recent dconf API changes.
    The patch has been sent to Takao Fujiwara.

 modulesets/gnome-suites-core-deps-3.6.modules |    6 +-
 patches/ibus-dconf.patch                      |   78 +++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 2 deletions(-)
---
diff --git a/modulesets/gnome-suites-core-deps-3.6.modules b/modulesets/gnome-suites-core-deps-3.6.modules
index ddbf4be..fab9000 100644
--- a/modulesets/gnome-suites-core-deps-3.6.modules
+++ b/modulesets/gnome-suites-core-deps-3.6.modules
@@ -1111,11 +1111,13 @@
   </autotools>
 
   <autotools id="ibus"
-             autogenargs="--disable-tests --disable-gconf --disable-dconf --enable-memconf --disable-ui"
+             autogenargs="--disable-tests --disable-gconf --enable-dconf --disable-memconf --disable-ui"
              makeargs="CFLAGS=-Wno-error">
     <branch repo="ibus"
             module="ibus-1.4.99.20120712.tar.gz" version="1.4.99.20120712"
-            hash="sha1:57db18a8a7b25c20d6ae171cab57e72bf613ad39" size="1705854"/>
+            hash="sha1:57db18a8a7b25c20d6ae171cab57e72bf613ad39" size="1705854">
+      <patch file="ibus-dconf.patch" strip="1" />
+    </branch>
     <dependencies>
       <dep package="dbus"/>
       <dep package="glib"/>
diff --git a/patches/ibus-dconf.patch b/patches/ibus-dconf.patch
new file mode 100644
index 0000000..947545a
--- /dev/null
+++ b/patches/ibus-dconf.patch
@@ -0,0 +1,78 @@
+--- ibus-1.4.99.20120712/conf/dconf/config.c	2012-06-01 11:54:27.000000000 -0400
++++ ibus-1.4.99.20120712.dconf/conf/dconf/config.c	2012-07-17 20:17:19.243579503 -0400
+@@ -159,12 +159,14 @@
+ _watch_func (DConfClient         *client,
+              const gchar         *gpath,
+              const gchar * const *items,
+-             gint                 n_items,
+              const gchar         *tag,
+              IBusConfigDConf     *config)
+ {
+     gchar **gkeys = NULL;
+     gint i;
++    gint n_items;
++
++    n_items = g_strv_length ((gchar **)items);
+ 
+     g_return_if_fail (gpath != NULL);
+     g_return_if_fail (n_items >= 0);
+@@ -231,16 +233,13 @@
+ ibus_config_dconf_init (IBusConfigDConf *config)
+ {
+     GVariant *variant;
+-    GError *error;
+ 
+-    config->client = dconf_client_new ("ibus",
+-                                       (DConfWatchFunc)_watch_func,
+-                                       config,
+-                                       NULL);
+-
+-    error = NULL;
+-    if (!dconf_client_watch (config->client, DCONF_PREFIX"/", NULL, &error))
+-        g_warning ("Can not watch dconf path %s", DCONF_PREFIX"/");
++    config->client = dconf_client_new ();
++
++    g_signal_connect (config->client, "changed",
++                      G_CALLBACK (_watch_func), config);
++
++    dconf_client_watch_fast (config->client, DCONF_PREFIX"/");
+ 
+     config->preserve_name_prefixes = NULL;
+     variant = dconf_client_read (config->client,
+@@ -265,9 +264,7 @@
+ ibus_config_dconf_destroy (IBusConfigDConf *config)
+ {
+     if (config->client) {
+-        GError *error = NULL;
+-        if (!dconf_client_unwatch (config->client, DCONF_PREFIX"/", NULL, &error))
+-            g_warning ("Can not unwatch dconf path %s", DCONF_PREFIX"/");
++        dconf_client_unwatch_fast (config->client, DCONF_PREFIX"/");
+ 
+         g_object_unref (config->client);
+         config->client = NULL;
+@@ -307,12 +304,7 @@
+         g_free (gname);
+     }
+ 
+-    retval = dconf_client_write (client,
+-                                 gkey,
+-                                 value,
+-                                 NULL,   /* tag */
+-                                 NULL,   /* cancellable */
+-                                 error);
++    retval = dconf_client_write_fast (client, gkey, value, error);
+     g_free (gkey);
+ 
+     return retval;
+--- ibus-1.4.99.20120712/conf/dconf/config.h	2012-06-01 11:54:27.000000000 -0400
++++ ibus-1.4.99.20120712.dconf/conf/dconf/config.h	2012-07-17 20:15:20.182583759 -0400
+@@ -23,7 +23,8 @@
+ #define __CONFIG_DCONF_H__
+ 
+ #include <ibus.h>
+-#include <dconf/dconf.h>
++#include <client/dconf-client.h>
++#include <common/dconf-paths.h>
+ 
+ #define IBUS_TYPE_CONFIG_DCONF            \
+     (ibus_config_dconf_get_type ())



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