| OLD | NEW |
| 1 /* vim:set et sts=4: */ | 1 /* vim:set et sts=4: */ |
| 2 /* ibus - The Input Bus | 2 /* ibus - The Input Bus |
| 3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> | 3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> |
| 4 * Copyright (C) 2008-2010 Red Hat, Inc. | 4 * Copyright (C) 2008-2010 Red Hat, Inc. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Lesser General Public | 7 * modify it under the terms of the GNU Lesser General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 180 } |
| 181 | 181 |
| 182 } | 182 } |
| 183 | 183 |
| 184 static void | 184 static void |
| 185 bus_ibus_impl_set_trigger (BusIBusImpl *ibus, | 185 bus_ibus_impl_set_trigger (BusIBusImpl *ibus, |
| 186 GValue *value) | 186 GValue *value) |
| 187 { | 187 { |
| 188 GQuark hotkey = g_quark_from_static_string ("trigger"); | 188 GQuark hotkey = g_quark_from_static_string ("trigger"); |
| 189 bus_ibus_impl_set_hotkey (ibus, hotkey, value); | 189 bus_ibus_impl_set_hotkey (ibus, hotkey, value); |
| 190 #if 0 |
| 191 /* Chromium-OS: We don't use trigger key. */ |
| 190 if (value == NULL) { | 192 if (value == NULL) { |
| 191 ibus_hotkey_profile_add_hotkey (ibus->hotkey_profile, | 193 ibus_hotkey_profile_add_hotkey (ibus->hotkey_profile, |
| 192 IBUS_space, | 194 IBUS_space, |
| 193 IBUS_CONTROL_MASK, | 195 IBUS_CONTROL_MASK, |
| 194 hotkey); | 196 hotkey); |
| 195 } | 197 } |
| 198 #endif |
| 196 } | 199 } |
| 197 | 200 |
| 198 static void | 201 static void |
| 199 bus_ibus_impl_set_next_engine_in_menu (BusIBusImpl *ibus, | 202 bus_ibus_impl_set_next_engine_in_menu (BusIBusImpl *ibus, |
| 200 GValue *value) | 203 GValue *value) |
| 201 { | 204 { |
| 202 GQuark hotkey = g_quark_from_static_string ("next-engine-in-menu"); | 205 GQuark hotkey = g_quark_from_static_string ("next-engine-in-menu"); |
| 203 bus_ibus_impl_set_hotkey (ibus, hotkey, value); | 206 bus_ibus_impl_set_hotkey (ibus, hotkey, value); |
| 204 } | 207 } |
| 205 | 208 |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 #ifdef G_THREADS_ENABLED | 603 #ifdef G_THREADS_ENABLED |
| 601 extern gint g_monitor_timeout; | 604 extern gint g_monitor_timeout; |
| 602 if (g_monitor_timeout != 0) { | 605 if (g_monitor_timeout != 0) { |
| 603 bus_registry_start_monitor_changes (ibus->registry); | 606 bus_registry_start_monitor_changes (ibus->registry); |
| 604 } | 607 } |
| 605 #endif | 608 #endif |
| 606 | 609 |
| 607 ibus->hotkey_profile = ibus_hotkey_profile_new (); | 610 ibus->hotkey_profile = ibus_hotkey_profile_new (); |
| 608 ibus->keymap = ibus_keymap_get ("us"); | 611 ibus->keymap = ibus_keymap_get ("us"); |
| 609 | 612 |
| 610 ibus->use_sys_layout = FALSE; | 613 ibus->use_sys_layout = TRUE; |
| 611 ibus->embed_preedit_text = TRUE; | 614 ibus->embed_preedit_text = TRUE; |
| 612 ibus->enable_by_default = FALSE; | 615 ibus->enable_by_default = TRUE; |
| 613 ibus->use_global_engine = FALSE; | 616 ibus->use_global_engine = TRUE; |
| 614 ibus->global_engine = NULL; | 617 ibus->global_engine = NULL; |
| 615 ibus->global_previous_engine_name = NULL; | 618 ibus->global_previous_engine_name = NULL; |
| 616 | 619 |
| 617 ibus->engines_hotkey_profile = NULL; | 620 ibus->engines_hotkey_profile = NULL; |
| 618 ibus->hotkey_to_engines_map = NULL; | 621 ibus->hotkey_to_engines_map = NULL; |
| 619 | 622 |
| 620 bus_ibus_impl_reload_config (ibus); | 623 bus_ibus_impl_reload_config (ibus); |
| 621 | 624 |
| 622 g_signal_connect (BUS_DEFAULT_DBUS, | 625 g_signal_connect (BUS_DEFAULT_DBUS, |
| 623 "name-owner-changed", | 626 "name-owner-changed", |
| (...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2028 g_hash_table_unref (ibus->hotkey_to_engines_map); | 2031 g_hash_table_unref (ibus->hotkey_to_engines_map); |
| 2029 } | 2032 } |
| 2030 | 2033 |
| 2031 ibus->engines_hotkey_profile = ibus_hotkey_profile_new(); | 2034 ibus->engines_hotkey_profile = ibus_hotkey_profile_new(); |
| 2032 ibus->hotkey_to_engines_map = | 2035 ibus->hotkey_to_engines_map = |
| 2033 g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) g_list_free); | 2036 g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) g_list_free); |
| 2034 | 2037 |
| 2035 g_list_foreach (ibus->register_engine_list, (GFunc) _add_engine_hotkey, ibus
); | 2038 g_list_foreach (ibus->register_engine_list, (GFunc) _add_engine_hotkey, ibus
); |
| 2036 g_list_foreach (ibus->engine_list, (GFunc) _add_engine_hotkey, ibus); | 2039 g_list_foreach (ibus->engine_list, (GFunc) _add_engine_hotkey, ibus); |
| 2037 } | 2040 } |
| OLD | NEW |