From: Yusuke Sato Date: Wed, 5 Jan 2011 23:44:49 +0000 (+0900) Subject: Call ibus_hotkey_profile_remove_hotkey_by_event in bus_ibus_impl_set_trigger before... X-Git-Tag: 1.4.0~141 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=44e94a3d0c7812fd24bd0548601682a1c0b043d7;p=platform%2Fupstream%2Fibus.git Call ibus_hotkey_profile_remove_hotkey_by_event in bus_ibus_impl_set_trigger before registering the fallback hotkey, just in case. Probably it's better to call the remove function in bus_ibus_impl_set_trigger just as bus_ibus_impl_set_hotkey already does, so that a wierd error message like 'IBUS-CRITICAL **: ...: file ibushotkey.c: line 381 (ibus_hotkey_profile_add_hotkey): should not be reached' will not be shown. The fallback hotkey could be registered twice, via bus_ibus_impl_init and _dbus_name_owner_changed_cb, if the --timeout parameter is too small to talk to the configuration daemon, for example. BUG=none TEST=ran ibus-daemon with --timeout=1 and verified that the IBUS-CRITICAL message above was not shown. Review URL: http://codereview.appspot.com/3796044 --- diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c index bffe429..891c661 100644 --- a/bus/ibusimpl.c +++ b/bus/ibusimpl.c @@ -310,6 +310,7 @@ bus_ibus_impl_set_trigger (BusIBusImpl *ibus, #ifndef OS_CHROMEOS else { /* set default trigger */ + ibus_hotkey_profile_remove_hotkey_by_event (ibus->hotkey_profile, hotkey); ibus_hotkey_profile_add_hotkey (ibus->hotkey_profile, IBUS_space, IBUS_CONTROL_MASK,