diff options
author | Choe Hwanjin <choe.hwanjin@gmail.com> | 2014-08-08 00:56:22 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2014-08-08 00:56:22 +0900 |
commit | ec7fc8b351f894c409b839d8167dbfa63cf97b16 (patch) | |
tree | 36e8956284b969ad6803d064d37ab23b7ed40b9a | |
parent | a7b3bd9e261cb974b15bcf44bcbaba89f07bd54f (diff) | |
download | ibus-hangul-ec7fc8b351f894c409b839d8167dbfa63cf97b16.tar.gz |
Rename config item "hangul-keys" to "switch-keys"
-rw-r--r-- | setup/main.py | 6 | ||||
-rw-r--r-- | src/engine.c | 22 |
2 files changed, 14 insertions, 14 deletions
diff --git a/setup/main.py b/setup/main.py index 203a92b..6dff317 100644 --- a/setup/main.py +++ b/setup/main.py @@ -91,7 +91,7 @@ class Setup (): model = Gtk.ListStore(str) default = GLib.Variant.new_string("Hangul,Shift+space") - keylist_str = self.__read("hangul-keys", default).get_string() + keylist_str = self.__read("switch-keys", default).get_string() self.__hangul_key_list_str = keylist_str.split(',') for i in self.__hangul_key_list_str: model.append([i]) @@ -176,7 +176,7 @@ class Setup (): else: str += model.get_value(iter, 0) iter = model.iter_next(iter) - self.__write("hangul-keys", GLib.Variant.new_string(str)) + self.__write("switch-keys", GLib.Variant.new_string(str)) model = self.__hanja_key_list.get_model() str = "" @@ -256,7 +256,7 @@ class Setup (): if i[1] == value: self.__hangul_keyboard.set_active(i[2]) break - elif name == "hangul-keys": + elif name == "switch-keys": self.__hangul_key_list_str = value.split(',') elif name == "hanja-keys": self.__hanja_key_list_str = value.split(',') diff --git a/src/engine.c b/src/engine.c index 325387a..9bb90f7 100644 --- a/src/engine.c +++ b/src/engine.c @@ -198,8 +198,8 @@ static HanjaTable *hanja_table = NULL; static HanjaTable *symbol_table = NULL; static IBusConfig *config = NULL; static GString *hangul_keyboard = NULL; -static HotkeyList hangul_keys; static HotkeyList hanja_keys; +static HotkeyList switch_keys; static HotkeyList on_keys; static HotkeyList off_keys; static int lookup_table_orientation = 0; @@ -266,17 +266,17 @@ ibus_hangul_init (IBusBus *bus) g_variant_unref(value); } - hotkey_list_init(&hangul_keys); + hotkey_list_init(&switch_keys); value = ibus_config_get_value (config, "engine/hangul", - "hangul-keys"); + "switch-keys"); if (value != NULL) { const gchar* str = g_variant_get_string (value, NULL); - hotkey_list_set_from_string(&hangul_keys, str); + hotkey_list_set_from_string(&switch_keys, str); g_variant_unref(value); } else { - hotkey_list_append(&hangul_keys, IBUS_Hangul, 0); - hotkey_list_append(&hangul_keys, IBUS_space, IBUS_SHIFT_MASK); + hotkey_list_append(&switch_keys, IBUS_Hangul, 0); + hotkey_list_append(&switch_keys, IBUS_space, IBUS_SHIFT_MASK); } hotkey_list_init(&hanja_keys); @@ -351,7 +351,7 @@ ibus_hangul_exit (void) keymap = NULL; } - hotkey_list_fini (&hangul_keys); + hotkey_list_fini (&switch_keys); hotkey_list_fini (&hanja_keys); hotkey_list_fini (&on_keys); hotkey_list_fini (&off_keys); @@ -1042,10 +1042,10 @@ ibus_hangul_engine_process_key_event (IBusEngine *engine, // right hanja key event, we don't have preedit string to be changed // to hanja word. // See this bug: http://code.google.com/p/ibus/issues/detail?id=1036 - if (hotkey_list_has_modifier(&hangul_keys, keyval)) + if (hotkey_list_has_modifier(&switch_keys, keyval)) return FALSE; - if (hotkey_list_match(&hangul_keys, keyval, modifiers)) { + if (hotkey_list_match(&switch_keys, keyval, modifiers)) { ibus_hangul_engine_toggle_input_mode (hangul); return TRUE; } @@ -1477,9 +1477,9 @@ ibus_config_value_changed (IBusConfig *config, word_commit = g_variant_get_boolean (value); } else if (strcmp (name, "auto-reorder") == 0) { auto_reorder = g_variant_get_boolean (value); - } else if (strcmp (name, "hangul-keys") == 0) { + } else if (strcmp (name, "switch-keys") == 0) { const gchar* str = g_variant_get_string(value, NULL); - hotkey_list_set_from_string(&hangul_keys, str); + hotkey_list_set_from_string(&switch_keys, str); } } else if (strcmp(section, "panel") == 0) { if (strcmp(name, "lookup-table-orientation") == 0) { |