Граф коммитов

1998 Коммитов

Автор SHA1 Сообщение Дата
Yusuke Sato 990ff39206 Fix typo in the default configuration of the trigger hotkeys.
According to setup/keyboardshortcut.py, "Control" seems to be correct.

BUG=none
TEST=compile ibus with --enable-memconf, start ibus-daemon, start ibus-setup, click "..." button for the "Enable or disable" hotkey, then verify that the "Control" checkbox in the pop-up dialog is checked from the beginning.

Review URL: http://codereview.appspot.com/4017042
2011-01-16 11:35:09 +09:00
Yusuke Sato ee6abd76f7 Set correct g-flags to proxy objects.
This change is similar to 19247aac5a.

The flag can prevent unnecessary communications between ibus-daemon and e.g. engines like this:

$ . ~/.config/ibus/bus/*-unix-0 ; dbus-monitor --address $IBUS_ADDRESS 2>&1 | tee /tmp/ibus.log
...
method call sender=org.freedesktop.DBus -> dest=(null destination) serial=3 path=/org/freedesktop/IBus/Factory; interface=org.freedesktop.IBus.Factory; member=CreateEngine
   string "mozc-jp"
method return sender=:1.15 -> dest=org.freedesktop.DBus reply_serial=3
   object path "/org/freedesktop/IBus/Engine/1"
method call sender=org.freedesktop.DBus -> dest=(null destination) serial=4 path=/org/freedesktop/IBus/Engine/1; interface=org.freedesktop.DBus.Properties; member=GetAll
   string "org.freedesktop.IBus.Engine"
method return sender=:1.15 -> dest=org.freedesktop.DBus reply_serial=4
   array [
   ]

Calling an engine's org.freedesktop.DBus.Properties.GetAll method when the engine is created is unnecessary for ibus-daemon, while it's not harmful though.

BUG=none
TEST=verified using dbus-monitor that ibus-daemon does not call GetAll anymore.

Review URL: http://codereview.appspot.com/4036041
2011-01-16 11:34:34 +09:00
Yusuke Sato ca4909cc83 Fix a gcc warning seen in Chromium OS build.
Please note that gcc's warn_unused_result check is enforced on the build environment. Anyway, I believe it's good to check the return value in this case.

BUG=none
TEST=ran emerge-x86-generic ibus.

Review URL: http://codereview.appspot.com/3904044
2011-01-12 22:44:08 +09:00
Yusuke Sato 199f80396f Remove a gcc warning.
ibusxml.c: In function 'ibus_xml_parse_file':
ibusxml.c:213: error: 'retval' may be used uninitialized in this function

BUG=none
TEST=ran make CFLAGS="-Wall -O2"

Review URL: http://codereview.appspot.com/3858044
2011-01-12 22:43:16 +09:00
Yusuke Sato 1403dc6abe Fix typo in ibus_bus_exit.
BUG=none
TEST=ran make CFLAGS="-Wall -O2"

Review URL: http://codereview.appspot.com/3900045
2011-01-12 22:42:24 +09:00
Yusuke Sato 411d8c5f21 Fix the return value of ibus_bus_register_component so it returns TRUE on success.
Do the same for ibus_bus_set_global_engine as well. Currently it always returns TRUE regardless of the result of the method call.

BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3902043
2011-01-10 14:25:07 +09:00
Yusuke Sato 783905fd6e Change the return type of ibus_bus_exit to make it compatible with ibus-1.3 API.
BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3923042
2011-01-09 15:12:11 +09:00
Daiki Ueno d5bdf851d2 Set correct sender and interface when sending org.freedesktop.IBus signals.
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3775042
2011-01-07 10:42:44 +09:00
Yusuke Sato b24b403295 Set the "g-default-timeout" property for ibusconfig, ibusinputcontext, and ibusbus objects. The GDBus default timeout (25 seconds) seems to be too long for IBus.
BUG=none
TEST=manually, with IBUS_BUS_TIMEOUT=-3,-2,-1,0,1,1000,6000,abc,1abc,abc1

Review URL: http://codereview.appspot.com/3799049
2011-01-07 01:38:23 +09:00
Yusuke Sato 144272e3a8 Use the G_DBUS_CALL_FLAGS_NO_AUTO_START flag just in case.
BUG=none
TEST=manually on Chromium OS.

Review URL: http://codereview.appspot.com/3774043
2011-01-06 12:28:54 +09:00
Yusuke Sato dd4a4c1a7f Do not write empty string to "preload_engines" for safety.
Without the change, bus_ibus_impl_set_default_preload_engines() might erase an existing preload_engines config when --timeout option for ibus-daemon is too short for ibus_config_get() to success.

BUG=none
TEST=manually with 'ibus-daemon --timeout=1'

Review URL: http://codereview.appspot.com/3789046
2011-01-06 12:24:36 +09:00
Yusuke Sato 44e94a3d0c 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
2011-01-06 08:44:49 +09:00
Yusuke Sato af1460aea6 Replace g_return_if_fail with g_warning since the error message 'desc != NULL' seems confusing.
BUG=none
TEST=manually. removed all engines using ibus-setup and ran ibus-daemon, then press a trigger hot-key.

Review URL: http://codereview.appspot.com/3786047
2011-01-06 08:25:47 +09:00
Yusuke Sato c6e273c0ee Fix --timeout command line option of ibus-daemon.
On 1.3.99, currently the option is just ignored and '-1' (i.e. the default timeout of gdbus which is 25 seconds in glib-2.26.1) is always used. We should fix this since the default, 25 secs, is too long for some platforms like Chromium OS.

BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3784047
2011-01-06 08:22:38 +09:00
Yusuke Sato 2f0877decf Support hotkeys that use Super/Hyper modifiers.
BUG=1175
TEST=checked that Super+space and Hyper+space work as intended with and without the use_sys_layout option enabled.

Review URL: http://codereview.appspot.com/3856041
2011-01-01 17:34:37 +09:00
Peng Huang f407551971 Reply an error message to sender, if ibus-daemon can not forward method call message successfully.
BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3825042
2010-12-28 16:44:16 -07:00
Daiki Ueno 017077ceb9 Fix g_variant_get() call in DeleteSurroundingText signal handler.
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3820042
2010-12-28 12:46:25 +09:00
Yusuke Sato 61f0894c35 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
2010-12-27 07:58:29 +09:00
Yusuke Sato 19247aac5a Create an instance of GDBusProxy with G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag.
Without the flag, on_name_owner_changed() in glib-2.26.x/gio/gdbusproxy.c might invoke a remote method named GetAll in org.freedesktop.DBus.Properties interface, but the method is not implemented in ibus-daemon. Since ibus-daemon ignores the method call, the caller, which is UI thread of Chrome on Chromium OS, will block for 25 seconds (i.e. the default timeout of GDBus) waiting for a reply.

BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3836042
2010-12-27 07:57:09 +09:00
Peng Huang 7a8b3d722b Fix Alt+Shift hotkey issue for chrome os
BUG=chromium-os:6225
TEST=manual

Review URL: http://codereview.appspot.com/3741043
2010-12-25 22:05:13 -07:00
Yusuke Sato 911490b3f8 Fix hot-key handling in inputcontext.c.
Without the fix, some key combinations might not trigger a hot-key event.
For example, one of Chrome OS hot-keys, "press Shift, then press Alt, then release Alt", does not work without the fix.

BUG=none
TEST=manually checked using ChromeOS and IBus-1.4

Review URL: http://codereview.appspot.com/3828041
2010-12-22 23:03:03 +09:00
Yusuke Sato 2c3021469f Add comments to ibusproxy.[ch] and related functions.
BUG=none
TEST=none

Review URL: http://codereview.appspot.com/3802042
2010-12-21 01:04:49 +09:00
Yusuke Sato e4d8612776 Fix ibus_input_context_get_input_context() so IBus.Service.Destroy will not be called when the returned object is disposed.
BUG=none
TEST=verified that calling g_object_unref(the_returned_object) does not result in the remote method call.

Review URL: http://codereview.appspot.com/3803041
2010-12-21 01:04:05 +09:00
Daiki Ueno fb0aee6d9f Don't call nonexistent org.freedesktop.IBus.InputContext.Destroy.
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3800041
2010-12-20 18:19:04 +09:00
Yusuke Sato 7ca2d0f5b8 Fix typo in introspection_xml[] for InputContext.
ed778cd7cf was incomplete, sorry.

BUG=none
TEST=verified that properties can be changed via input context on Chrome OS.

Review URL: http://codereview.appspot.com/3795041
2010-12-20 15:02:20 +09:00
Daiki Ueno 6a8b35d0d0 Init GError before calling g_dbus_proxy_call*().
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3669041
2010-12-15 18:33:33 +09:00
Daiki Ueno c3c20f8e45 Fix gtk version check for deprecated keysyms.
From the git log of gtk3, they started adding _KEY from 2.91.0 not 2.90.0.

BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3670041
2010-12-15 18:32:17 +09:00
Peng Huang bd5ead57de Disconnect closed signal from GDBusConnection before creating a new connection.
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3668041
2010-12-15 17:04:43 +08:00
Yusuke Sato 4de438c3db Fix assertion failure in ibusbus.c.
The following code does not work since the underlying connection for IBus-1.4 is not a sub class of IBusObject.

        ibus_object_destroy ((IBusObject *)priv->connection);
        g_assert (priv->connection == NULL);

BUG=none
TEST=ran Chrome for Chrome OS.

Review URL: http://codereview.appspot.com/3658041
2010-12-15 15:13:00 +09:00
Yusuke Sato 872aec1105 Fix type mismatch in src/ibuspanelservice.c.
BUG=none
TEST=ran candidate_window for Chrome OS.

Review URL: http://codereview.appspot.com/3661041
2010-12-15 14:36:19 +09:00
Yusuke Sato ed778cd7cf Use unsigned for the parameter of the PropertyActivate message.
unsigned would be better since the Python binding and engine proxy use unsigned for this purpose.

BUG=none
TEST=ran Chrome for Chrome OS.

Review URL: http://codereview.appspot.com/3660041
2010-12-15 14:09:20 +09:00
Yusuke Sato 2ce1bd0530 Fix type mismatch in the PropertyActivate message.
src/ibusinputcontext.c sends the massage with "(si)" but the daemon use the massage as "(&su)". This triggers assertion failure on Chrome OS.

BUG=none
TEST=change ibus-mozc's property on Chrome OS via the IME menu.

Review URL: http://codereview.appspot.com/3636041
2010-12-15 11:55:16 +09:00
Peng Huang c2c4c6df3c Fix crash in im-ibus.so
BUG=chromium-os:9868
TEST=manual

Review URL: http://codereview.appspot.com/3401041
2010-12-14 10:20:46 +08:00
Peng Huang e0b882f5fb Focus out/in fake input context if the input window changed.
BUG=chromium-os:8855
TEST=manual

Review URL: http://codereview.appspot.com/3199042
2010-12-14 10:20:45 +08:00
Peng Huang 93ceb44131 Focus out the fake context in im-ibus.so, when a real context gets the focus.
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3561042
2010-12-14 10:16:32 +08:00
Peng Huang 856bd2ea70 Add fake context back in IBusIMContext.
The fake context is removed by mistake in ibus-1.4. It is necessary for Chrome OS.

BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3574042
2010-12-14 10:14:45 +08:00
Peng Huang ac1be736ab Fix typo and annotation.
Fix typo in IBusEngineDesc:rank doc and GI transfer mode for
ibus_component_get_engines().

BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3614041
2010-12-13 17:37:09 +08:00
Peng Huang 98419a4133 Fix GI transfer mode annotation in ibus_bus_list_*engines() comment.
See https://bugzilla.gnome.org/show_bug.cgi?id=635248.  Also, do not mark those
functions as "not implemented", since they are apparently implemented.

BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3274044
2010-12-08 16:37:42 +08:00
Yusuke Sato 9b0e04d311 Add #include <ibuspanelservice.h> to ibus.h.
Add #include <ibuspanelservice.h> to ibus.h so an external project (e.g. Chromium OS project) could implement its own panel component in C/C++.

Review URL: http://codereview.appspot.com/3411041
2010-12-03 00:42:45 +09:00
Yusuke Sato 036554a610 Remove unused header file, src/ibusconfigprivate.h
Review URL: http://codereview.appspot.com/3412041
2010-12-03 00:41:15 +09:00
Yusuke Sato 4f1f7e241e Fix compile errors on Chromium OS.
This is for the master branch of ibus.

BUG=crosbug.com/9685
TEST=ran emerge-x86-generic ibus.

Review URL: http://codereview.appspot.com/3368041
2010-12-01 22:00:44 +09:00
Yusuke Sato 50ceef3601 Do not call g_critical when ibus->config is NULL since it's not an error.
The change is originally for chromeos branch of ibus (http://codereview.appspot.com/3304043/) but I believe this is also good for the master branch of ibus.

BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3269043
2010-11-29 12:04:27 +09:00
Yusuke Sato cf2c930252 Add the "destroy" signal handler back following Peng's suggestion at http://codereview.appspot.com/3293042/.
BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3335041
2010-11-26 16:07:56 +09:00
Yusuke Sato 85b5e0e921 Add function comments to bus/panelproxy.[ch].
BUG=none
TEST=none

Review URL: http://codereview.appspot.com/3293042
2010-11-26 10:15:08 +09:00
Yusuke Sato ede7506ad1 Fix unexpected client capabilities in ibus-daemon.
BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3323041
2010-11-25 17:54:19 +09:00
Yusuke Sato a902bf42cb Change the order of engine method calls for consistency.
BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3304042
2010-11-25 17:40:43 +09:00
Yusuke Sato 9ff18b80fd Add function comments to bus/inputcontext.[ch] and bus/engineproxy.[ch].
Removed a temporary hack for PREEDIT_CONDITION by adding bus_ibus_impl_is_embed_preedit_text function to ibusimpl.c.

BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3321041
2010-11-25 16:55:04 +09:00
Yusuke Sato 21c14908e7 Re-enable the use_sys_layout feature.
Currently use_sys_layout cannot be disabled.

BUG=none
TEST=manually

Review URL: http://codereview.appspot.com/3306041
2010-11-24 18:50:57 +09:00
Peng Huang 5d4f22c81c Pass cancellable object to bus_factory_proxy_create_engine
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3304041
2010-11-24 17:46:12 +09:00
Peng Huang 5f1d5dd008 Clean up the code of focus switch logic, and fix a crash when focused context is destroyed.
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/3192042
2010-11-24 11:33:10 +09:00