platform/upstream/ibus.git
13 years agoSend the new capabilities to ibus-daemon in ibus_im_context_set_use_preedit.
Yusuke Sato [Wed, 1 Jun 2011 14:37:14 +0000 (23:37 +0900)]
Send the new capabilities to ibus-daemon in ibus_im_context_set_use_preedit.

BUG=none
TEST=none

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

13 years agoUpdate translations.
fujiwarat [Mon, 16 May 2011 05:51:45 +0000 (14:51 +0900)]
Update translations.

Update da.po ja.po nl.po pl.po te.po uk.po zh_CN.po

13 years agoFix build warnings with gcc 4.6
Peng Huang [Wed, 11 May 2011 01:59:15 +0000 (21:59 -0400)]
Fix build warnings with gcc 4.6

BUG=crosbug.com/15039
TEST=Linux desktop

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

13 years agoUpdate name
Julien Humbert [Thu, 7 Apr 2011 22:45:46 +0000 (00:45 +0200)]
Update name

13 years agoAdded British English translation.
Espreon [Sat, 30 Apr 2011 05:20:06 +0000 (01:20 -0400)]
Added British English translation.

13 years agoFix make dpkg errors, and add gtk3 support for debian
Peng Huang [Tue, 3 May 2011 13:55:39 +0000 (09:55 -0400)]
Fix make dpkg errors, and add gtk3 support for debian

BUG=None
TEST=Linux desktop

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

13 years agoFix the zombie process of ibus-gconf when ibus-daemon restarts.
Takao Fujiwara [Wed, 27 Apr 2011 11:48:50 +0000 (07:48 -0400)]
Fix the zombie process of ibus-gconf when ibus-daemon restarts.

- Fix the typo in bus_dbus_impl_destroy() (dbusimpl.c)
- Modify bus_server_run() and _ibus_exit() (ibusimpl.c, server.c)
  bus_ibus_impl_destroy() needs to be called so that waitpid()
  prevents processes from becoming zombie.
- Change the declaration of bus_server_quit(). (server.h)

BUG=redhat#697471
TEST=Linux desktop

Review URL: http://codereview.appspot.com/4440059
Patch from Takao Fujiwara <takao.fujiwara1@gmail.com>.

13 years agoFix SEGV in im-ibus.so on Chromium OS
Yusuke Sato [Fri, 22 Apr 2011 11:17:14 +0000 (20:17 +0900)]
Fix SEGV in im-ibus.so on Chromium OS

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

13 years agoAdd org.freedesktop.IBus.InputContext.ProcessHandWritingEvent and CancelHandWriting...
Yusuke Sato [Fri, 22 Apr 2011 11:07:43 +0000 (20:07 +0900)]
Add org.freedesktop.IBus.InputContext.ProcessHandWritingEvent and CancelHandWriting to support a handwriting engine.

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

13 years agoExport input context surrounding-text API to Python.
Daiki Ueno [Mon, 18 Apr 2011 21:09:10 +0000 (17:09 -0400)]
Export input context surrounding-text API to Python.

BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/4442059
Patch from Daiki Ueno <daiki.ueno@gmail.com>.

13 years agoUse g_initable_new to create BusFactoryProxy.
Peng Huang [Mon, 18 Apr 2011 15:18:27 +0000 (11:18 -0400)]
Use g_initable_new to create BusFactoryProxy.

BUG=none
TEST=Linux desktop

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

13 years agoRevert "Change default values of some config."
Peng Huang [Sat, 9 Apr 2011 03:29:23 +0000 (23:29 -0400)]
Revert "Change default values of some config."

This change was commited by mistake.

This reverts commit ed4775b5fec355c1ccb13947d03dcac0aaaeb47f.

13 years agoFix problem in creating IBusPoxy in synchronous mode.
Peng Huang [Fri, 8 Apr 2011 13:45:18 +0000 (09:45 -0400)]
Fix problem in creating IBusPoxy in synchronous mode.

13 years agoRefine RequestName code and fix make dpkg errors.
Peng Huang [Fri, 8 Apr 2011 13:49:20 +0000 (09:49 -0400)]
Refine RequestName code and fix make dpkg errors.

BUG=none
TEST=Linux Desktop

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

13 years agoFix focus issue when reconnect to ibus-daemon
Peng Huang [Fri, 8 Apr 2011 13:19:13 +0000 (09:19 -0400)]
Fix focus issue when reconnect to ibus-daemon

BUG=none
TEST=Linux desktop

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

13 years agoImplement APIs for another non-Python panel.
Takao Fujiwara [Fri, 8 Apr 2011 13:18:23 +0000 (09:18 -0400)]
Implement APIs for another non-Python panel.

1. Support icon and prop_list = null in ibus_property_new with GIR.
2. Add getter methods in IBusText and IBusProperty since GJS cannot access
   the members in C-Structure.
3. Add ibus_get_language_name() since GIR libxml2 does not provide the
   useful APIs.
4. Implement flags in ibus_bus_request_name() to follow DBus
   RequestName signal spec.
   http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-names
   This is needed to terminate the current IBus panel.
   E.g. IBus GTK panel is launched by ibus-daemon but another panel is
   launched by gnome-shell.
5. Support IBUS_BUS_NAME_FLAG_ALLOW_REPLACEMENT in ui/gtk/main.py
6. Fix bus_component_set_factory() not to call
   bus_component_factory_destroy_cb() twice.
7. Hide ibus_text_new_from_static_string() for GIR.
8. Add ibus_is_running_gnome_shell() for ibus-ui-gtk because
   gnome-shell runs earlier than ibus-ui-gtk.

Review URL: http://codereview.appspot.com/4279042
Patch from Takao Fujiwara <takao.fujiwara1@gmail.com>.

13 years agoExport surrounding-text API to Python.
Daiki Ueno [Fri, 8 Apr 2011 01:11:39 +0000 (10:11 +0900)]
Export surrounding-text API to Python.

BUG=none
TEST=manually with modified ibus-anthy https://github.com/ueno/ibus-anthy/commit/2303095f

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

13 years agoFix make dpkg errors.
Peng Huang [Tue, 5 Apr 2011 14:27:32 +0000 (10:27 -0400)]
Fix make dpkg errors.

BUG=none
TEST=make dpkg

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

13 years agoSupport surrounding-text retrieval.
Daiki Ueno [Tue, 5 Apr 2011 14:11:49 +0000 (10:11 -0400)]
Support surrounding-text retrieval.

Unlike the GtkIMContext API, IBus automatically retrieves
surrounding-text when certain events occurred to the
client ("before filter_keypress", for example).  This makes the
engine API simpler but causes periodical emission of D-Bus
signals for updating surrounding-text information, which is
unwanted for typical engines.

For this reason, the surrounding-text support is currently
disabled by default.  To enable it, pass
--enable-surrounding-text to configure.  Also, even
surrounding-text support is compiled in, IBus does not start
polling until an engine requests surrounding-text using
ibus_engine_get_surrounding_text().  To make the function work
for the first time, clients should retrieve
initial surrounding-text when the engine is enabled (see ibus_im_context_focus_in() and
_ibus_context_enabled_cb() in client/gtk2/ibusimcontext.c).

BUG=Issue#778
TEST=manual

Review URL: http://codereview.appspot.com/4276082
Patch from Daiki Ueno <daiki.ueno@gmail.com>.

13 years agoFix a crash during creating IBusProxy asynchronously
Peng Huang [Tue, 5 Apr 2011 14:08:34 +0000 (10:08 -0400)]
Fix a crash during creating IBusProxy asynchronously

BUG=chromium-os:13629
TEST=Linux desktop

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

13 years agoUpdate translations.
fujiwarat [Mon, 4 Apr 2011 10:33:47 +0000 (19:33 +0900)]
Update translations.

Update ar.po as.po da.po es.po fr.po gu.po hi.po kn.po mr.po nl.po
or.po pa.po pl.po pt_BR.po ta.po te.po uk.po zh_CN.po zh_TW.po
and LINGUAS.

13 years agoUse ibus panel icon from the desktop theme instead of ibus-keyboard.
fujiwarat [Thu, 31 Mar 2011 03:56:45 +0000 (12:56 +0900)]
Use ibus panel icon from the desktop theme instead of ibus-keyboard.

13 years agoChange default values of some config.
James Su [Wed, 12 May 2010 22:38:42 +0000 (15:38 -0700)]
Change default values of some config.

This CL changes the default value of use_global_engine, enable_by_default and use_sys_layout to TRUE. And also removes the default trigger key.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/2008016

13 years agoUse gtk_status_icon_set_name() only if it is available.
Daiki Ueno [Tue, 29 Mar 2011 13:39:44 +0000 (09:39 -0400)]
Use gtk_status_icon_set_name() only if it is available.

gtk_status_icon_set_name() is not exported to python through pygtk2 <= 2.17,
which is the version from Debian sid and Fedora 14.

>>> import gtk
>>> gtk.pygtk_version
(2, 17, 0)
>>> hasattr(gtk.StatusIcon, 'set_name')
False

This patch checks the availability.

BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/4327042
Patch from Daiki Ueno <daiki.ueno@gmail.com>.

13 years agoSet WM_CLASS name instead of main.py
fujiwarat [Fri, 25 Mar 2011 04:57:31 +0000 (13:57 +0900)]
Set WM_CLASS name instead of main.py

13 years agoAdd "in" keymap which maps Alt_R to AltGr.
Daiki Ueno [Fri, 25 Mar 2011 15:16:18 +0000 (11:16 -0400)]
Add "in" keymap which maps Alt_R to AltGr.

BUG=none
TEST=manually with ibus-m17n

Review URL: http://codereview.appspot.com/4273109
Patch from Daiki Ueno <daiki.ueno@gmail.com>.

13 years agoVerify global engine after changing preload_engines
Peng Huang [Fri, 25 Mar 2011 15:07:38 +0000 (11:07 -0400)]
Verify global engine after changing preload_engines

BUG=http://crosbug.com/13406
TEST=Linux desktop

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

13 years agoFix make debian package errors.
Peng Huang [Wed, 23 Mar 2011 13:44:20 +0000 (09:44 -0400)]
Fix make debian package errors.

BUG=none
TEST=make dpkg

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

13 years agoFix typos in IBusInputContext document
Peng Huang [Wed, 23 Mar 2011 13:44:06 +0000 (09:44 -0400)]
Fix typos in IBusInputContext document

BUG=none
TEST=Linux desktop

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

13 years agoUse $(SED) to replace sed
Peng Huang [Wed, 23 Mar 2011 13:43:43 +0000 (09:43 -0400)]
Use $(SED) to replace sed

BUG=none
TEST=Linux desktop

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

13 years agoLink appropriate libraries to ibus-scan.
Yusuke Sato [Tue, 22 Mar 2011 13:36:52 +0000 (22:36 +0900)]
Link appropriate libraries to ibus-scan.

TEST=git clone the clean tree, ran ./autogen.sh --enable-gtk-doc, then ran make.

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

13 years agoAdd asynchronous InputContext.IsEnabled and InputContext.GetEngine APIs.
Yusuke Sato [Tue, 22 Mar 2011 05:09:34 +0000 (14:09 +0900)]
Add asynchronous InputContext.IsEnabled and InputContext.GetEngine APIs.

* Added asynchronous InputContext.IsEnabled and InputContext.GetEngine APIs. Now
all InputContext IPCs can be async.
* Added comments to src/ibusinputcontext.h.
* Moved input context tests from ibus-bus.c to ibus-inputcontext.c (new file),
and fixed flaky tests.
* Fixed typos in bus/.

BUG=http://code.google.com/p/ibus/issues/detail?id=1215
TEST=ran the new test

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

13 years agoCreate a separate test case for ibus_bus_create_input_context_async().
Peng Huang [Fri, 18 Mar 2011 13:24:18 +0000 (09:24 -0400)]
Create a separate test case for ibus_bus_create_input_context_async().

Create a separate test case for ibus_bus_create_input_context_async(),
so we can use `ibus-bus -p /ibus/create-input-context' to test and debug
ibus_bus_create_input_context_async() only.

BUG=none
TEST=make check

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

13 years agoRefine document and coding style in ibusbus.[ch] and trim some private structs and...
Peng Huang [Thu, 17 Mar 2011 14:52:38 +0000 (10:52 -0400)]
Refine document and coding style in ibusbus.[ch] and trim some private structs and api from document

BUG=none
TEST=make

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

13 years agoDo not block UI in IBusIMContext anymore.
Peng Huang [Thu, 17 Mar 2011 14:49:03 +0000 (10:49 -0400)]
Do not block UI in IBusIMContext anymore.

Replace some block IPC calls with async IPC calls, and then IBusIMContext will
not block UI anymore.

BUG=http://crosbug.com/12310
TEST=Linux desktop

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

13 years agoFix issue of InputContext.SetEngine.
Peng Huang [Wed, 16 Mar 2011 14:02:47 +0000 (10:02 -0400)]
Fix issue of InputContext.SetEngine.

InputContext.SetEngine returns error sometimes, because "request-engine"
signal handler calls an async function to set the engine of the context.
So checking context->engine != NULL just after emiting "request-engine"
signal is not correct.

BUG=none
TEST=Linux desktop

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

13 years agoAdd git.mk from gtk+ project, Use it to update .gitignore
Peng Huang [Wed, 16 Mar 2011 14:01:18 +0000 (10:01 -0400)]
Add git.mk from gtk+ project, Use it to update .gitignore

BUG=none
TEST=make

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

13 years agoUpdate gtk-doc
Peng Huang [Tue, 15 Mar 2011 17:32:55 +0000 (13:32 -0400)]
Update gtk-doc

BUG=
TEST=Linux documemt

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

13 years agoThis can cause crashes on cleanup when multiple components are implemented in the...
Zach Kuznia [Mon, 14 Mar 2011 06:42:32 +0000 (15:42 +0900)]
This can cause crashes on cleanup when multiple components are implemented in the same process.

Review URL: http://codereview.appspot.com/4241058
Patch from Zach Kuznia <zork@chromium.org>.

13 years agoFix preedit_string = NULL in ibus-x11 _free_ic()
fujiwarat [Fri, 11 Mar 2011 06:53:53 +0000 (15:53 +0900)]
Fix preedit_string = NULL in ibus-x11 _free_ic()

13 years agoFix make check error
Peng Huang [Fri, 11 Mar 2011 15:37:40 +0000 (10:37 -0500)]
Fix make check error

BUG=none
TEST=make check

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

13 years agoUpdate symbols file.
Yusuke Sato [Wed, 9 Mar 2011 23:44:38 +0000 (08:44 +0900)]
Update symbols file.

./autogen.sh
./configure --enable-gtk-doc
make dpkg
cp ppa/ibus-1.3.99.20110309/debian/libibus-1.0-0/DEBIAN/symbols debian/libibus-1.0-0.symbols
vi debian/libibus-1.0-0.symbols  # remove "-1phuang1~maverick1"
make dpkg  # confirm that lintian does not report an error.

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

13 years agoFix issues of the "previous_engine" hotkey.
Yusuke Sato [Wed, 15 Sep 2010 03:25:17 +0000 (12:25 +0900)]
Fix issues of the "previous_engine" hotkey.

Check global_previous_engine_name when the previous engine is requested and rewrite it if necessary.
This change ensures that the "previous_engine" hotkey (Ctrl+space on Chrome OS) always works
whenever two or more engines are preloaded.

Currently, Ctrl+space could become NOP by the following scenarios (http://crosbug.com/6609):

(1)
1. preload engines A, B, C.
2. switch to A.
3. switch to B.
4. at this point, ctrl+space works fine. It selectes A and B alternately.
5. switch to A.
6. remove B from the preloaded engline list.
7. at this point, ctrl+space suddenly becomes NOP although C is still preloaded.
This is because the callback function of ctrl+space detects
global_previous_engine_name (i.e. B) is removed and automatically selects A (not
C) as a global_previous_engine_name.

(2)
1. preload engines A, B.
2. switch to A.
3. switch to B.
4. at this point, ctrl+space works fine. It selectes A and B alternately.
5. switch to A.
6. remove B from the preloaded engline list.
7. press ctrl+space several times, confirm that nothing happens (this is
expected since only one engine, A, is preloaded).
8. preload additional engine, C.
9. at this point, ctrl+space is still NOP although two engines, A and C, are
preloaded.

13 years agoIf the current engine is removed, then switch to another engine automatically.
James Su [Thu, 27 May 2010 05:31:06 +0000 (22:31 -0700)]
If the current engine is removed, then switch to another engine automatically.

BUG=http://crosbug.com/3577
TEST=manual test.

Review URL: http://codereview.chromium.org/2259004

13 years agoRemove -Wall warnings.
Yusuke Sato [Tue, 8 Mar 2011 12:57:10 +0000 (21:57 +0900)]
Remove -Wall warnings.

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

13 years agoAdd asynchronous APIs to ibusbus.h
Yusuke Sato [Mon, 7 Mar 2011 15:55:36 +0000 (00:55 +0900)]
Add asynchronous APIs to ibusbus.h

Modified src/tests/ibus-bus.c so that it could be compiled with ibus-1.3.99 as well.

BUG=chromium-os:12581
TEST=added async api tests to the src/tests/ibus-bus.c and ran it locally.

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

13 years agoMove gtk_key_snooper_remove from function object_fini to class_fini.
Peng Huang [Mon, 7 Mar 2011 15:26:04 +0000 (10:26 -0500)]
Move gtk_key_snooper_remove from function object_fini to class_fini.

BUG=http://crosbug.com/12803
TEST=Linux desktop

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

13 years agoOptimize focus_in to avoid call some UI blocking functions.
Peng Huang [Tue, 1 Mar 2011 20:34:37 +0000 (15:34 -0500)]
Optimize focus_in to avoid call some UI blocking functions.

focus_in calls some X blocking functions. It will block UI. This change delays the X blocking calls to idle callback, to avoid blocking UI.

BUG=http://crbug.com/74237
TEST=Linux desktop

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

13 years agoUnify async and sync function names.
Peng Huang [Mon, 28 Feb 2011 20:57:47 +0000 (15:57 -0500)]
Unify async and sync function names.

BUG=none
TEST=Linux desktop

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

13 years agoFix a race problem in SetGlobalEngine and add set_global_engine in python library
Peng Huang [Mon, 28 Feb 2011 15:25:54 +0000 (10:25 -0500)]
Fix a race problem in SetGlobalEngine and add set_global_engine in python library

The race problem:
 1. global engine == A
 2. call SetGlobalEngine(B) asynchronously
 3. call SetGlobalEngine(A) immediately
  3.1 Because step 2 is not finished, so the global engine is still A,
      and SetGlobalEngine(A) returns sucessfully.
 4. SetGlobalEngine(B) is completed and the global engine becomes B

BUG=http://crosbug.com/12414
TEST=Linux desktop

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

13 years agoCall gtk_key_snooper_remove when GTK IM client is switched.
fujiwarat [Fri, 18 Feb 2011 19:52:40 +0000 (04:52 +0900)]
Call gtk_key_snooper_remove when GTK IM client is switched.

13 years agoFix make dpkg errors.
Peng Huang [Fri, 18 Feb 2011 15:59:49 +0000 (10:59 -0500)]
Fix make dpkg errors.

BUG=none
TEST=make dpkg

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

13 years agoAdd enable_conditional and disable_conditional in gconf schemas file
Peng Huang [Fri, 18 Feb 2011 15:59:06 +0000 (10:59 -0500)]
Add enable_conditional and disable_conditional in gconf schemas file

BUG=none
TEST=manual

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

13 years agoFix crash when turn off "use global engine" option
Peng Huang [Fri, 18 Feb 2011 15:58:27 +0000 (10:58 -0500)]
Fix crash when turn off "use global engine" option

BUG=none
TEST=Linux desktop

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

13 years agoDestroy IBusInputContext correctly in ibus-x11
Peng Huang [Fri, 18 Feb 2011 14:08:41 +0000 (09:08 -0500)]
Destroy IBusInputContext correctly in ibus-x11

BUG=none
TEST=Linux desktop

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

13 years agos/LC_MESSAGES/LC_CTYPE/ in set_default_preload_engines.
fujiwarat [Thu, 17 Feb 2011 06:08:37 +0000 (15:08 +0900)]
s/LC_MESSAGES/LC_CTYPE/ in set_default_preload_engines.

13 years agoDo not create GSimpleAsyncResult in ibus_input_context_process_key_event
Peng Huang [Wed, 16 Feb 2011 20:49:09 +0000 (15:49 -0500)]
Do not create GSimpleAsyncResult in ibus_input_context_process_key_event

This change also fixes memory leak of simple result object

BUG=none
TEST=Linux desktop

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

13 years agoAdd async version of set_global_engine.
Yusuke Sato [Wed, 16 Feb 2011 14:42:27 +0000 (23:42 +0900)]
Add async version of set_global_engine.

Patch from Zach Kuznia <zork@chromium.org>, modified by Yusuke Sato <yusukes@chromium.org>.

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

13 years agoImplement async version of ibus_config_set_value.
Yusuke Sato [Wed, 16 Feb 2011 06:45:29 +0000 (15:45 +0900)]
Implement async version of ibus_config_set_value.

BUG=crosbug.com/11903

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

13 years agoAdd engine_name parameter to the global-engine-changed signal.
Yusuke Sato [Tue, 15 Feb 2011 07:44:05 +0000 (16:44 +0900)]
Add engine_name parameter to the global-engine-changed signal.

This makes it possible for a client to know the current global engine w/o issuing GetGlobalEngine reqeust.

BUG=chromium-os:11908

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

13 years agoUse LC_MESSAGES instead of LC_ALL in bus_ibus_impl_set_default_preload_engines.
Yusuke Sato [Tue, 15 Feb 2011 01:27:03 +0000 (10:27 +0900)]
Use LC_MESSAGES instead of LC_ALL in bus_ibus_impl_set_default_preload_engines.

This is a fix for https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/716314. Calling setlocale(LC_ALL, NULL); in the function seems not to be a good idea since the function could return a complex string like "LC_CTYPE=ja_JP.UTF-8;LC_NUMERIC=C;LC..." when two or more values are used for LC_xxx variables (e.g. ja_JP.UTF-8 and C.)

BUG=1204

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

13 years agoNever use ibus's US keymap in bus_input_context_filter_key, and use the keyval from...
Yusuke Sato [Tue, 15 Feb 2011 01:24:20 +0000 (10:24 +0900)]
Never use ibus's US keymap in bus_input_context_filter_key, and use the keyval from X as-is.
I think this is important for supporting non-US keyboards like a Japanese-106 keyboard correctly.

Currently, when use_sys_layout config is unchecked (the default), ibus-daemon discards a keyval being passed from X, and regenerates a keyval from a keycode assuming the US layout.

However, I believe this behavior is not good for non-US keyboard layout users (e.g. Japanese or Korean keyboard users.) For example, the Japanese 106 keyboard has a key called Zenkaku_Hankaku (全角_半角, whose keycode is 49) on the left hand of the '1' key, and most users want to use the key for toggling IME. But, even if a user set 'Zenkaku_Hankaku' as the toggle hotkey using ibus-setup, the user cannot toggle IME unless the 'Use system keyboard layout' option is explicitly turned on. This is because when use_sys_layout is unchecked, ibus-daemon treats the Zenkaku_Hankaku key press (keycode=49) as tilde (~) key press (remember that the tilde's keycode is also 49 in the US keyboard layout.) This is very inconvenient and confusing.

Please also note that the hotkey configuration tool in ibus-setup always respects a keyval from X, and never checks the use_sys_layout value.

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

13 years agoAlways call g_simple_async_result_complete in ibus_input_context_process_key_event_do...
Yusuke Sato [Tue, 15 Feb 2011 01:22:48 +0000 (10:22 +0900)]
Always call g_simple_async_result_complete in ibus_input_context_process_key_event_done in order to handle IPC errors correctly.

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

13 years agoFix compiler warnings in util/IMdkit/.
Ahmad Sharif [Sat, 12 Feb 2011 14:38:35 +0000 (23:38 +0900)]
Fix compiler warnings in util/IMdkit/.

BUG=1201

Review URL: http://codereview.appspot.com/4171046
Patch from Ahmad Sharif <asharif@chromium.org>.

13 years agoRan 'make update-po' in po/.
Yusuke Sato [Sat, 12 Feb 2011 13:56:49 +0000 (22:56 +0900)]
Ran 'make update-po' in po/.

BUG=1173

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

13 years agoReimplement ibus_bus_watch_dbus_signal for GDBus and export it.
Yusuke Sato [Fri, 11 Feb 2011 14:53:34 +0000 (23:53 +0900)]
Reimplement ibus_bus_watch_dbus_signal for GDBus and export it.

BUG=crosbug.com/11479

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

13 years agoSupport enable/disable hotkeys that enable or disable ibus unconditionally (i.e....
Yusuke Sato [Fri, 11 Feb 2011 14:48:42 +0000 (23:48 +0900)]
Support enable/disable hotkeys that enable or disable ibus unconditionally (i.e. not toggle.)

I'll update ibus/po/*po files if the change looks good to you.

BUG=http://code.google.com/p/ibus/issues/detail?id=1173
TEST=manually

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

13 years agoFix ibus-daemon deadlock in engineproxy.c.
phuang [Wed, 9 Feb 2011 12:02:44 +0000 (21:02 +0900)]
Fix ibus-daemon deadlock in engineproxy.c.

How to reproduce the deadlock on a desktop Linux like Ubuntu Maverick:

1. Add 20 seconds sleep in the beginning of the main() function of an engine (e.g. ibus-engine-mozc). See http://crosbug.com/11379#c16 .
2. Set preload_engines to "mozc" using ibus-setup.
3. Start ibus-daemon.
4. press the trigger hotkey twice within the 20 seconds.

Expected:
The second trigger hotkey press cancels the bus_engine_proxy_new operation started by the first one.

Actual:
ibus-daemon freezes. Stack trace: http://crosbug.com/11379#c20

BUG=http://crosbug.com/11379
TEST=see the steps above.

Review URL: http://codereview.appspot.com/4125053
Patch from phuang <shawn.p.huang@gmail.com>.

13 years agoAdd pkgdatadir in ibus-1.0.pc.in
fujiwarat [Tue, 8 Feb 2011 15:51:39 +0000 (00:51 +0900)]
Add pkgdatadir in ibus-1.0.pc.in

13 years agoAdd GTK3 definitions.
fujiwarat [Tue, 8 Feb 2011 15:50:44 +0000 (00:50 +0900)]
Add GTK3 definitions.

13 years agoFix typo.
fujiwarat [Tue, 8 Feb 2011 15:50:56 +0000 (00:50 +0900)]
Fix typo.

13 years agoOverwrite Gtk+'s default compose table to fix crosbug.com/11421.
Yusuke Sato [Thu, 3 Feb 2011 01:15:24 +0000 (10:15 +0900)]
Overwrite Gtk+'s default compose table to fix crosbug.com/11421.

BUG=chromium-os:11421
TEST=manually done on Chrome OS.

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

13 years agoFix build debian package error.
Peng Huang [Thu, 27 Jan 2011 23:01:34 +0000 (18:01 -0500)]
Fix build debian package error.

BUG=
TEST=make dpkg

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

13 years agoExport async version ibus_input_context_process_key_event.
Peng Huang [Thu, 27 Jan 2011 15:06:09 +0000 (10:06 -0500)]
Export async version ibus_input_context_process_key_event.

Some application may want to integrate with ibus directly, and want to
use async mode for processing key events. So I make
ibus_input_context_process_key_event to be an async function,
and also added ibus_input_context_process_key_event_sync.

Fix problem in introspection of Engine.

BUG=none
TEST=Tested in Ubuntu 10.10

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

13 years agoFix problem in introspection of Engine.
Peng Huang [Thu, 27 Jan 2011 00:18:05 +0000 (19:18 -0500)]
Fix problem in introspection of Engine.

BUG=http://code.google.com/p/ibus/issues/detail?id=1194
TEST=Tested in Ubuntu 10.10

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

13 years agoFix introspection definitions.
fujiwarat [Wed, 26 Jan 2011 04:15:08 +0000 (13:15 +0900)]
Fix introspection definitions.

13 years agoSet QT_IM_MODULE=xim in case of no ibus-qt.
fujiwarat [Wed, 26 Jan 2011 05:01:25 +0000 (14:01 +0900)]
Set QT_IM_MODULE=xim in case of no ibus-qt.

13 years agoAdd signals in IBusPanelService for non-C classes.
fujiwarat [Wed, 26 Jan 2011 05:01:17 +0000 (14:01 +0900)]
Add signals in IBusPanelService for non-C classes.

13 years agoSet GdkEventKey time for gdk_event_put with IBUS_FORWARD_MASK.
fujiwarat [Mon, 24 Jan 2011 03:25:48 +0000 (12:25 +0900)]
Set GdkEventKey time for gdk_event_put with IBUS_FORWARD_MASK.

13 years agoAdd <signal name='ValueChanged'> to introspection_xml in src/ibusconfigservice.c.
Yusuke Sato [Mon, 24 Jan 2011 01:56:05 +0000 (10:56 +0900)]
Add <signal name='ValueChanged'> to introspection_xml in src/ibusconfigservice.c.

I don't think that GDBus library in glib-2.26.[01] uses the information to filter out undefined signals, but just in case.

BUG=none
TEST=manually

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

13 years agoFix some race conditions during create engine, also fix dpkg build error.
Peng Huang [Fri, 21 Jan 2011 15:57:54 +0000 (10:57 -0500)]
Fix some race conditions during create engine, also fix dpkg build error.

BUG=chromium-os:10750
TEST=on Linux desktop

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

13 years agoEmit the connected signal after setting up the connection.
Yusuke Sato [Fri, 21 Jan 2011 12:03:23 +0000 (21:03 +0900)]
Emit the connected signal after setting up the connection.

Otherwise, we might miss the first a few DBus and IBus signals.

BUG=http://crosbug.com/11144
TEST=see the bug.

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

13 years agoFix race condition between ibus_bus_set_global_engine() and ibus_bus_get_global_engine().
Yusuke Sato [Wed, 19 Jan 2011 01:55:16 +0000 (10:55 +0900)]
Fix race condition between ibus_bus_set_global_engine() and ibus_bus_get_global_engine().

If focus moves between the two API calls, ibus_bus_get_global_engine() might return an unexpected engine name:

1. context A is focused, and the current global engine is "X".
2. ibus_bus_set_global_engine("Y") is called.
3. a user moves the focus from A to B. First, A's engine is set to NULL in bus_ibus_impl_set_focused_context(). Then, in the same function, B's engine is set to "X" (not "Y") since the _ibus_set_global_engine asynchronous call is not finished yet.
4. ibus_bus_set_global_engine("Y") async call successfully finishes. Context A's (not B's) engine is set to "Y", but context B, which has a focus, is not updated.
5. ibus_bus_get_global_engine() is called.

expected:
Y is returned.

actual:
X is returned. Since the context B has a focus, and B's engine is X.

BUG=http://crosbug.com/11031
TEST=see the bug

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

13 years agoDo not allow clients to destroy the server-side config service for safety.
Yusuke Sato [Wed, 19 Jan 2011 01:18:13 +0000 (10:18 +0900)]
Do not allow clients to destroy the server-side config service for safety.

Unset the own flag of priv->config so that the config proxy object never destroys the config service even if a client wrongly unref()s the priv->config object.

BUG=none
TEST=manually

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

13 years agoFix possible SEGV in ibus_bus_get_global_engine.
Yusuke Sato [Tue, 18 Jan 2011 13:00:57 +0000 (22:00 +0900)]
Fix possible SEGV in ibus_bus_get_global_engine.

The g_variant_get returns NULL when the IPC call times out.

BUG=none
TEST=none

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

13 years agoHandle GlobalEngineChanged signals from ibus-daemon.
Yusuke Sato [Tue, 18 Jan 2011 12:51:40 +0000 (21:51 +0900)]
Handle GlobalEngineChanged signals from ibus-daemon.

BUG=http://crosbug.com/11011
TEST=manually

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

13 years agoOn ChromeOS, we don't have to (and don't want to) set default preload engines.
Yusuke Sato [Tue, 18 Jan 2011 01:33:48 +0000 (10:33 +0900)]
On ChromeOS, we don't have to (and don't want to) set default preload engines.

BUG=none
TEST=manually

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

13 years agoSet nonzero serial number for RegistryChanged / EngineChanged signals.
Daiki Ueno [Mon, 17 Jan 2011 05:22:18 +0000 (14:22 +0900)]
Set nonzero serial number for RegistryChanged / EngineChanged signals.

libdbus expects each message serial is greater than 0.
https://code.google.com/p/ibus/issues/detail?id=1186

BUG=none
TEST=manual test described in the issue#1186

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

13 years agoFix typo in the default configuration of the trigger hotkeys.
Yusuke Sato [Sun, 16 Jan 2011 02:35:09 +0000 (11:35 +0900)]
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

13 years agoSet correct g-flags to proxy objects.
Yusuke Sato [Sun, 16 Jan 2011 02:34:34 +0000 (11:34 +0900)]
Set correct g-flags to proxy objects.

This change is similar to https://github.com/ibus/ibus/commit/19247aac5a348185a0e180f254ab3858c5f85703.

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

13 years agoFix a gcc warning seen in Chromium OS build.
Yusuke Sato [Wed, 12 Jan 2011 13:44:08 +0000 (22:44 +0900)]
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

13 years agoRemove a gcc warning.
Yusuke Sato [Wed, 12 Jan 2011 13:43:16 +0000 (22:43 +0900)]
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

13 years agoFix typo in ibus_bus_exit.
Yusuke Sato [Wed, 12 Jan 2011 13:42:24 +0000 (22:42 +0900)]
Fix typo in ibus_bus_exit.

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

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

13 years agoFix the return value of ibus_bus_register_component so it returns TRUE on success.
Yusuke Sato [Mon, 10 Jan 2011 05:25:07 +0000 (14:25 +0900)]
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

13 years agoChange the return type of ibus_bus_exit to make it compatible with ibus-1.3 API.
Yusuke Sato [Sun, 9 Jan 2011 06:12:11 +0000 (15:12 +0900)]
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

13 years agoSet correct sender and interface when sending org.freedesktop.IBus signals.
Daiki Ueno [Fri, 7 Jan 2011 01:42:44 +0000 (10:42 +0900)]
Set correct sender and interface when sending org.freedesktop.IBus signals.

BUG=none
TEST=manual

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

13 years agoSet the "g-default-timeout" property for ibusconfig, ibusinputcontext, and ibusbus...
Yusuke Sato [Thu, 6 Jan 2011 16:38:23 +0000 (01:38 +0900)]
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

13 years agoUse the G_DBUS_CALL_FLAGS_NO_AUTO_START flag just in case.
Yusuke Sato [Thu, 6 Jan 2011 03:28:54 +0000 (12:28 +0900)]
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

13 years agoDo not write empty string to "preload_engines" for safety.
Yusuke Sato [Thu, 6 Jan 2011 03:24:36 +0000 (12:24 +0900)]
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

13 years agoCall ibus_hotkey_profile_remove_hotkey_by_event in bus_ibus_impl_set_trigger before...
Yusuke Sato [Wed, 5 Jan 2011 23:44:49 +0000 (08:44 +0900)]
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