summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2014-10-28 11:28:46 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2014-10-28 11:28:46 +0900
commitbb818e438599f080a0cffb0b7573d9a646cf3b1a (patch)
treee02f9fc550c84a0c3465c64f6b628135a97133e6
parentab0be905a3c007b5ddec11ceada058879eca3b5c (diff)
downloadibus-bb818e438599f080a0cffb0b7573d9a646cf3b1a.tar.gz
Fix not to SEGV ibus-ui-gtk3 with wrong 'preload-engines' value.
Fedora internal patch could save engines from the result of 'setxkbmap -query' but they do not exist in simple.xml likes 'xkb:cn::chi' while now the current implementation converts those engines to 'xkb:us::eng'. BUG=https://code.google.com/p/ibus/issues/detail?id=1744 TEST=ui/gtk3 Review URL: https://codereview.appspot.com/158640043
-rw-r--r--ui/gtk3/panel.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
index 76cea238..7b99fdf5 100644
--- a/ui/gtk3/panel.vala
+++ b/ui/gtk3/panel.vala
@@ -790,6 +790,15 @@ class Panel : IBus.PanelService {
var engines = m_bus.get_engines_by_names(names);
+ /* Fedora internal patch could save engines not in simple.xml
+ * likes 'xkb:cn::chi'.
+ */
+ if (engines.length == 0) {
+ names = {"xkb:us::eng"};
+ m_settings_general.set_strv("preload-engines", names);
+ engines = m_bus.get_engines_by_names(names);
+ }
+
if (m_engines.length == 0) {
m_engines = engines;
switch_engine(0, true);