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

2050 Коммитов

Автор SHA1 Сообщение Дата
Peng Huang 14b7d1a071 Add git.mk from gtk+ project, Use it to update .gitignore
BUG=none
TEST=make

Review URL: http://codereview.appspot.com/4280050
2011-03-16 10:01:18 -04:00
Peng Huang 596680ba3c Update gtk-doc
BUG=
TEST=Linux documemt

Review URL: http://codereview.appspot.com/4277054
2011-03-15 13:32:55 -04:00
Zach Kuznia 71bcf46f2a 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>.
2011-03-14 15:42:32 +09:00
fujiwarat 26084822d7 Fix preedit_string = NULL in ibus-x11 _free_ic() 2011-03-11 10:44:04 -05:00
Peng Huang 5617ef1553 Fix make check error
BUG=none
TEST=make check

Review URL: http://codereview.appspot.com/4250077
2011-03-11 10:37:40 -05:00
Yusuke Sato 57eee844b6 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
2011-03-10 08:44:38 +09:00
Yusuke Sato 32367ad614 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.
2011-03-09 10:55:47 -05:00
James Su 2fbbf4312d 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
2011-03-08 10:14:15 -05:00
Yusuke Sato f4eae684f5 Remove -Wall warnings.
Review URL: http://codereview.appspot.com/4261056
2011-03-08 21:57:10 +09:00
Yusuke Sato 3980dd91d0 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
2011-03-08 00:55:36 +09:00
Peng Huang fbdd157b2a 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
2011-03-07 10:26:04 -05:00
Peng Huang 279ee5d5b3 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
2011-03-01 15:34:37 -05:00
Peng Huang 690be230c1 Unify async and sync function names.
BUG=none
TEST=Linux desktop

Review URL: http://codereview.appspot.com/4246042
2011-02-28 15:57:47 -05:00
Peng Huang 31b3b6a957 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
2011-02-28 10:25:54 -05:00
fujiwarat 8ebad5f07b Call gtk_key_snooper_remove when GTK IM client is switched. 2011-02-18 15:00:36 -05:00
Peng Huang fb153c2a95 Fix make dpkg errors.
BUG=none
TEST=make dpkg

Review URL: http://codereview.appspot.com/4184055
2011-02-18 10:59:49 -05:00
Peng Huang 0b02c819ee Add enable_conditional and disable_conditional in gconf schemas file
BUG=none
TEST=manual

Review URL: http://codereview.appspot.com/4183057
2011-02-18 10:59:06 -05:00
Peng Huang d68f26bd70 Fix crash when turn off "use global engine" option
BUG=none
TEST=Linux desktop

Review URL: http://codereview.appspot.com/4170061
2011-02-18 10:58:27 -05:00
Peng Huang ff5db2e177 Destroy IBusInputContext correctly in ibus-x11
BUG=none
TEST=Linux desktop

Review URL: http://codereview.appspot.com/4178062
2011-02-18 10:15:26 -05:00
fujiwarat 5bd623d697 s/LC_MESSAGES/LC_CTYPE/ in set_default_preload_engines. 2011-02-18 10:15:18 -05:00
Peng Huang 9edd399125 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
2011-02-16 15:49:09 -05:00
Yusuke Sato d0755b083d 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
2011-02-16 23:42:27 +09:00
Yusuke Sato d9f8ed3e18 Implement async version of ibus_config_set_value.
BUG=crosbug.com/11903

Review URL: http://codereview.appspot.com/4185041
2011-02-16 15:45:29 +09:00
Yusuke Sato 07877cf6f1 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
2011-02-15 16:44:05 +09:00
Yusuke Sato 661f1e860e 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
2011-02-15 10:27:03 +09:00
Yusuke Sato 5743b6da70 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
2011-02-15 10:24:20 +09:00
Yusuke Sato c394fea787 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
2011-02-15 10:22:48 +09:00
Ahmad Sharif b2c7173b30 Fix compiler warnings in util/IMdkit/.
BUG=1201

Review URL: http://codereview.appspot.com/4171046
Patch from Ahmad Sharif <asharif@chromium.org>.
2011-02-12 23:38:35 +09:00
Yusuke Sato 7538358198 Ran 'make update-po' in po/.
BUG=1173

Review URL: http://codereview.appspot.com/4181044
2011-02-12 22:56:49 +09:00
Yusuke Sato b66b337e9a Reimplement ibus_bus_watch_dbus_signal for GDBus and export it.
BUG=crosbug.com/11479

Review URL: http://codereview.appspot.com/4186041
2011-02-11 23:53:34 +09:00
Yusuke Sato e3140b7206 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
2011-02-11 23:48:42 +09:00
phuang 377c06515e 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>.
2011-02-09 21:02:44 +09:00
fujiwarat 0501756a1e Add pkgdatadir in ibus-1.0.pc.in 2011-02-08 15:13:01 -05:00
fujiwarat 8199abcde4 Add GTK3 definitions. 2011-02-08 15:12:57 -05:00
fujiwarat 31d1e1c41c Fix typo. 2011-02-08 15:12:52 -05:00
Yusuke Sato 03c9e59143 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
2011-02-03 10:15:24 +09:00
Peng Huang 0e6fa20c25 Fix build debian package error.
BUG=
TEST=make dpkg

Review URL: http://codereview.appspot.com/4013046
2011-01-27 18:01:34 -05:00
Peng Huang af0c9bcf74 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
2011-01-27 11:18:21 -05:00
Peng Huang 8f3bd1b11d 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
2011-01-26 19:18:05 -05:00
fujiwarat ea3917659b Fix introspection definitions. 2011-01-26 00:10:35 -05:00
fujiwarat cc1d776aeb Set QT_IM_MODULE=xim in case of no ibus-qt. 2011-01-26 00:09:43 -05:00
fujiwarat 73135d06d2 Add signals in IBusPanelService for non-C classes. 2011-01-26 00:08:47 -05:00
fujiwarat f28d3e30cb Set GdkEventKey time for gdk_event_put with IBUS_FORWARD_MASK. 2011-01-24 09:32:21 -05:00
Yusuke Sato d26f418a3d 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
2011-01-24 10:56:05 +09:00
Peng Huang e1e72a2052 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
2011-01-21 10:57:54 -05:00
Yusuke Sato 683e301b68 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
2011-01-21 21:03:23 +09:00
Yusuke Sato b5382549a2 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
2011-01-19 10:55:16 +09:00
Yusuke Sato e194133baa 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
2011-01-19 10:18:13 +09:00
Yusuke Sato 302c85138b 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
2011-01-18 22:00:57 +09:00
Yusuke Sato 6b4874283c Handle GlobalEngineChanged signals from ibus-daemon.
BUG=http://crosbug.com/11011
TEST=manually

Review URL: http://codereview.appspot.com/4037042
2011-01-18 21:51:40 +09:00