summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2018-06-29 17:51:57 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2018-06-29 17:51:57 +0900
commit7b05bfff103e78f648b9b0c9e2e117619d169b66 (patch)
treeafc3b93173471ceeb253649d084e16e81436086a
parentcb4b5458b3b021786d9ee9ebc5e065d7eeda359e (diff)
downloadibus-anthy-7b05bfff103e78f648b9b0c9e2e117619d169b66.tar.gz
engine: input mode should be changed even if the mode is hidden
BUS=https://github.com/ibus/ibus/issues/2018
-rw-r--r--engine/python2/engine.py11
-rw-r--r--engine/python3/engine.py11
-rw-r--r--setup/python2/setup.ui4
-rw-r--r--setup/python3/setup.ui4
4 files changed, 16 insertions, 14 deletions
diff --git a/engine/python2/engine.py b/engine/python2/engine.py
index 344ccce..733382a 100644
--- a/engine/python2/engine.py
+++ b/engine/python2/engine.py
@@ -865,9 +865,6 @@ class Engine(IBus.EngineSimple):
IBus.PropState.CHECKED)
def __input_mode_activate(self, prop_name, state):
- if u'InputMode' not in self.__prop_dict.keys():
- # Disable to show input mode with ibus-set-anthy
- return
input_modes = {
u'InputMode.Hiragana' : (INPUT_MODE_HIRAGANA, 'あ'),
u'InputMode.Katakana' : (INPUT_MODE_KATAKANA, 'ア'),
@@ -879,11 +876,15 @@ class Engine(IBus.EngineSimple):
if prop_name not in input_modes:
printerr('Unknown prop_name = %s' % prop_name)
return
+ mode, symbol = input_modes[prop_name]
+ if u'InputMode' not in self.__prop_dict.keys():
+ # Disable to show input mode with ibus-set-anthy
+ Engine.__input_mode = mode
+ return
+
self.__prop_dict[prop_name].set_state(state)
self.update_property(self.__prop_dict[prop_name])
- mode, symbol = input_modes[prop_name]
-
label = _("%(description)s (%(symbol)s)") % \
{ 'description' : _("Input mode"), 'symbol' : symbol }
Engine.__input_mode = mode
diff --git a/engine/python3/engine.py b/engine/python3/engine.py
index 443cda8..1779e3f 100644
--- a/engine/python3/engine.py
+++ b/engine/python3/engine.py
@@ -860,9 +860,6 @@ class Engine(IBus.EngineSimple):
IBus.PropState.CHECKED)
def __input_mode_activate(self, prop_name, state):
- if 'InputMode' not in self.__prop_dict.keys():
- # Disable to show input mode with ibus-set-anthy
- return
input_modes = {
'InputMode.Hiragana' : (INPUT_MODE_HIRAGANA, 'あ'),
'InputMode.Katakana' : (INPUT_MODE_KATAKANA, 'ア'),
@@ -874,11 +871,15 @@ class Engine(IBus.EngineSimple):
if prop_name not in input_modes:
printerr('Unknown prop_name = %s' % prop_name)
return
+ mode, symbol = input_modes[prop_name]
+ if 'InputMode' not in self.__prop_dict.keys():
+ # Disable to show input mode with ibus-set-anthy
+ Engine.__input_mode = mode
+ return
+
self.__prop_dict[prop_name].set_state(state)
self.update_property(self.__prop_dict[prop_name])
- mode, symbol = input_modes[prop_name]
-
label = _("%(description)s (%(symbol)s)") % \
{ 'description' : _("Input mode"), 'symbol' : symbol }
Engine.__input_mode = mode
diff --git a/setup/python2/setup.ui b/setup/python2/setup.ui
index 61d9325..88b19b8 100644
--- a/setup/python2/setup.ui
+++ b/setup/python2/setup.ui
@@ -2710,8 +2710,8 @@
<property name="program-name">IBus-Anthy</property>
<property name="copyright">Copyright © 2007–2008 Peng Huang
Copyright © 2009 Hideaki ABE
-Copyright © 2009–2017 Takao Fujiwara
-Copyright © 2007–2017 Red Hat, Inc.</property>
+Copyright © 2009–2018 Takao Fujiwara
+Copyright © 2007–2018 Red Hat, Inc.</property>
<property name="comments" translatable="yes">The Anthy engine for the IBus input platform</property>
<property name="license">GPL</property>
<property name="website">https://github.com/ibus/ibus/wiki</property>
diff --git a/setup/python3/setup.ui b/setup/python3/setup.ui
index 61d9325..88b19b8 100644
--- a/setup/python3/setup.ui
+++ b/setup/python3/setup.ui
@@ -2710,8 +2710,8 @@
<property name="program-name">IBus-Anthy</property>
<property name="copyright">Copyright © 2007–2008 Peng Huang
Copyright © 2009 Hideaki ABE
-Copyright © 2009–2017 Takao Fujiwara
-Copyright © 2007–2017 Red Hat, Inc.</property>
+Copyright © 2009–2018 Takao Fujiwara
+Copyright © 2007–2018 Red Hat, Inc.</property>
<property name="comments" translatable="yes">The Anthy engine for the IBus input platform</property>
<property name="license">GPL</property>
<property name="website">https://github.com/ibus/ibus/wiki</property>