Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed Hiragana to Katakana with F7 key.

  • Loading branch information...
commit 91ddf1fe0a88a97bbc34d248ef675761c5ef2d2e 1 parent 9901e45
@fujiwarat fujiwarat authored
Showing with 14 additions and 6 deletions.
  1. +1 −1  engine/kana.py
  2. +1 −1  engine/romaji.py
  3. +12 −4 engine/thumb.py
View
2  engine/kana.py
@@ -54,7 +54,7 @@ def __get_kana_typing_rule(self, enchars, retval=None):
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:
View
2  engine/romaji.py
@@ -57,7 +57,7 @@ def __get_romaji_typing_rule(self, enchars, retval=None):
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:
View
16 engine/thumb.py
@@ -257,9 +257,13 @@ def __init_layout_table(self):
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 @@ def _init_layout_table(cls):
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:
Please sign in to comment.
Something went wrong with that request. Please try again.