m4_define([ibus_released], [1])
m4_define([ibus_major_version], [1])
m4_define([ibus_minor_version], [3])
-m4_define([ibus_micro_version], [1])
+m4_define([ibus_micro_version], [2])
m4_define(ibus_maybe_datestamp,
m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
# check ibus
PKG_CHECK_MODULES(IBUS, [
- ibus-1.0 >= 1.2.99
+ ibus-1.0 >= 1.3.99
])
# check libhangul
PKG_CHECK_MODULES(HANGUL, [
- libhangul >= 0.0.12
+ libhangul >= 0.1.0
])
# check env
void
ibus_hangul_init (IBusBus *bus)
{
- gboolean res;
- GValue value = { 0, };
+ GVariant* value;
hanja_table = hanja_table_load (NULL);
g_object_ref_sink (config);
hangul_keyboard = g_string_new_len ("2", 8);
- res = ibus_config_get_value (config, "engine/Hangul",
- "HangulKeyboard", &value);
- if (res) {
- const gchar* str = g_value_get_string (&value);
+ value = ibus_config_get_value (config, "engine/Hangul",
+ "HangulKeyboard");
+ if (value != NULL) {
+ const gchar* str = g_variant_get_string (value, NULL);
g_string_assign (hangul_keyboard, str);
- g_value_unset(&value);
+ g_variant_unref(value);
}
hanja_key_list_init(&hanja_keys);
- res = ibus_config_get_value (config, "engine/Hangul",
- "HanjaKeys", &value);
- if (res) {
- const gchar* str = g_value_get_string (&value);
+ value = ibus_config_get_value (config, "engine/Hangul",
+ "HanjaKeys");
+ if (value != NULL) {
+ const gchar* str = g_variant_get_string (value, NULL);
hanja_key_list_set_from_string(&hanja_keys, str);
- g_value_unset(&value);
+ g_variant_unref(value);
} else {
hanja_key_list_append(&hanja_keys, IBUS_Hangul_Hanja, 0);
hanja_key_list_append(&hanja_keys, IBUS_F9, 0);
// each key, not the character. We make the keyval from keycode
// as if the keyboard is US qwerty layout. Then we can assume the
// keyval represent the position of the each key.
- if (strcmp(hangul_keyboard->str, "ro") != 0) {
+ // But if the hic is in transliteration mode, then we should not
+ // normalize the keyval.
+ bool is_transliteration_mode =
+ hangul_ic_is_transliteration(hangul->context);
+ if (!is_transliteration_mode) {
if (keymap != NULL)
keyval = ibus_keymap_lookup_keysym(keymap, keycode, modifiers);
}