Skip to content

Commit

Permalink
Update initial_input_mode on GSettings "changed"
Browse files Browse the repository at this point in the history
initial_input_mode value also need to be updated on GSettings
"changed" signal. When a new input context is opened, it will read
initial_input_mode. So we need to update it.

#40
  • Loading branch information
choehwanjin committed Jul 28, 2018
1 parent 79280e8 commit beb0032
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,13 @@ settings_changed (GSettings *settings,
} else if (strcmp (key, "off-keys") == 0) {
const gchar* str = g_variant_get_string(value, NULL);
hotkey_list_set_from_string(&off_keys, str);
} else if (strcmp (key, "initial-input-mode") == 0) {
const gchar* str = g_variant_get_string (value, NULL);
if (strcmp(str, "latin") == 0) {
initial_input_mode = INPUT_MODE_LATIN;
} else if (strcmp(str, "hangul") == 0) {
initial_input_mode = INPUT_MODE_HANGUL;
}
}
} else if (strcmp (schema_id, "org.freedesktop.ibus.panel") == 0) {
if (strcmp (key, "lookup-table-orientation") == 0) {
Expand Down

0 comments on commit beb0032

Please sign in to comment.