Commit 047ae3c9 authored by Jinkyu Yi's avatar Jinkyu Yi Committed by Rui Matos
Browse files

region: obtain keyboard variant from IBus

This will fix unable to show keyboard variant from IBus through menu.

https://bugzilla.gnome.org/show_bug.cgi?id=735065
parent 008a6d50
...@@ -1339,7 +1339,7 @@ show_selected_layout (CcRegionPanel *self) ...@@ -1339,7 +1339,7 @@ show_selected_layout (CcRegionPanel *self)
if (engine_desc) { if (engine_desc) {
layout = ibus_engine_desc_get_layout (engine_desc); layout = ibus_engine_desc_get_layout (engine_desc);
variant = ""; variant = ibus_engine_desc_get_layout_variant (engine_desc);
} else { } else {
g_warning ("Couldn't find IBus input source '%s'", id); g_warning ("Couldn't find IBus input source '%s'", id);
return; return;
...@@ -1350,7 +1350,7 @@ show_selected_layout (CcRegionPanel *self) ...@@ -1350,7 +1350,7 @@ show_selected_layout (CcRegionPanel *self)
return; return;
} }
if (variant[0]) if (variant && variant[0])
commandline = g_strdup_printf ("gkbd-keyboard-display -l \"%s\t%s\"", commandline = g_strdup_printf ("gkbd-keyboard-display -l \"%s\t%s\"",
layout, variant); layout, variant);
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment