diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2010-10-21 11:31:13 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2010-10-21 11:31:13 +0900 |
commit | 91ddf1fe0a88a97bbc34d248ef675761c5ef2d2e (patch) | |
tree | db44c0ec356749a7eca6bec5ac8ac84dad5adbfd | |
parent | 9901e45ca39834a0c7066ca05c0d325f7869539f (diff) | |
download | ibus-anthy-91ddf1fe0a88a97bbc34d248ef675761c5ef2d2e.tar.gz |
Fixed Hiragana to Katakana with F7 key.
-rw-r--r-- | engine/kana.py | 2 | ||||
-rw-r--r-- | engine/romaji.py | 2 | ||||
-rw-r--r-- | engine/thumb.py | 16 |
3 files changed, 14 insertions, 6 deletions
diff --git a/engine/kana.py b/engine/kana.py index c7731bd..8f5f6c3 100644 --- a/engine/kana.py +++ b/engine/kana.py @@ -54,7 +54,7 @@ class KanaSegment(segment.Segment): section = self._kana_typing_rule_section if section != None: if enchars in prefs.keys(section): - value = prefs.get_value(section, enchars) + value = unicode(str(prefs.get_value(section, enchars))) if value == '': value = None if value == None: diff --git a/engine/romaji.py b/engine/romaji.py index 6db6e82..b3a54bd 100644 --- a/engine/romaji.py +++ b/engine/romaji.py @@ -57,7 +57,7 @@ class RomajiSegment(segment.Segment): section = self._romaji_typing_rule_section if section != None: if enchars in prefs.keys(section): - value = prefs.get_value(section, enchars) + value = unicode(str(prefs.get_value(section, enchars))) if value == '': value = None if value == None: diff --git a/engine/thumb.py b/engine/thumb.py index 98f95a9..1ea582a 100644 --- a/engine/thumb.py +++ b/engine/thumb.py @@ -257,9 +257,13 @@ class ThumbShiftKeyboard: prefs = self.__prefs for k in prefs.keys(section): value = prefs.get_value(section, k) - if len(value) == 3 and value[0] == '' and \ - value[1] == '' and value[2] == '': + if value == None or len(value) != 3 or \ + (str(value[0]) == '' and \ + str(value[1]) == '' and str(value[2]) == ''): continue + value = [unicode(str(value[0])), + unicode(str(value[1])), + unicode(str(value[2]))] self.__table[ord(k)] = value for c in value: self.__r_table[c] = k @@ -510,9 +514,13 @@ class ThumbShiftSegment(segment.Segment): prefs = cls._prefs for k in prefs.keys(section): value = prefs.get_value(section, k) - if len(value) == 3 and value[0] == '' and \ - value[1] == '' and value[2] == '': + if value == None or len(value) != 3 or \ + (str(value[0]) == '' and \ + str(value[1]) == '' and str(value[2]) == ''): continue + value = [unicode(str(value[0])), + unicode(str(value[1])), + unicode(str(value[2]))] for c in value: cls._r_table[c] = k else: |