Branch: refs/heads/master
Home:   https://github.com/ibus/ibus

Commit: 61f0894c3555478117e9d5f286d0085bd5afdad3
    https://github.com/ibus/ibus/commit/61f0894c3555478117e9d5f286d0085bd5afdad3
Author: Yusuke Sato <[email protected]>
Date:   2010-12-26 (Sun, 26 Dec 2010)

Changed paths:
  M src/ibusconfig.c

Log Message:
-----------
Fix API compatibility issue in ibus_config_new.

On ibus-1.3, ibus_config_new returns NULL when ibus-gconf is not started yet, 
but on 1.4 it returns a valid, non-NULL IBusConfig object. This patch fixes the 
discrepancy by changing the behavior of ibus_config_new of 1.4.

If we don't return NULL when ibus-gconf does not exist, successive calls e.g. 
ibus_config_set_value will fail with a cryptic error message like 'IBUS-WARNING 
**: org.freedesktop.IBus.Config.SetValue: Cannot invoke method; proxy is for a 
well-known name without an owner and proxy was constructed with the 
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag'. I believe returning NULL makes it 
easier to use the ibusconfig.h APIs.

Please note that this patch is particularly important for Chromium OS. Since 
ibus_config_new is called shortly after ibus-daemon starts on the OS, 
ibus_config_new is sometimes called before ibus-memconf starts actually. This 
change helps the glue between chrome and ibus-daemon to remain clean.

BUG=none
TEST=manually on Chromium OS

Review URL: http://codereview.appspot.com/3784043


-- 
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en

回复