Commit 327aa165 authored by Matthias Clasen's avatar Matthias Clasen

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.
parent 73714fa9
......@@ -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"/>
......
--- 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 ())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment