summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2014-12-02 14:16:26 +0800
committerPeng Wu <alexepico@gmail.com>2014-12-02 14:16:26 +0800
commit43beca819b9e4ab2f71b6cde4e085525df088719 (patch)
tree417d4316ae550fd18468dcca0da348b5f40e575d
parent795027d140d75c11b1476de4d36b7226a98c6e74 (diff)
downloadibus-libpinyin-43beca819b9e4ab2f71b6cde4e085525df088719.tar.gz
ibus-libpinyin-43beca819b9e4ab2f71b6cde4e085525df088719.tar.xz
ibus-libpinyin-43beca819b9e4ab2f71b6cde4e085525df088719.zip
update setup dialog
-rw-r--r--setup/shortcuteditor.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setup/shortcuteditor.py b/setup/shortcuteditor.py
index b56fbe4..a621e22 100644
--- a/setup/shortcuteditor.py
+++ b/setup/shortcuteditor.py
@@ -46,7 +46,7 @@ accelerators = \
(_("Switch Chinese/English"), "MainSwitch" , "<Shift>"),
(_("Full/Half Width Letter"), "LetterSwitch", ""),
(_("Full/Half Width Punct"), "PunctSwitch", "<Control>period"),
- (_("Switch Traditional/Simplfied Chinese"), "TradSwitch", "<Control><Shift>F")
+ (_("Switch Traditional/Simplfied Chinese"), "TradSwitch", "<Control><Shift>f")
)
class ShortcutTreeView(Gtk.TreeView):
@@ -88,6 +88,13 @@ class ShortcutTreeView(Gtk.TreeView):
self.append_column(column)
def set_shortcut_value(self, key, value):
+ # just clean shortcut
+ if value == "":
+ for row in self.__model:
+ if row[COLUMN_CONFIG_KEYNAME] == key:
+ row[COLUMN_ACCELERATOR] = value
+ return True
+
# check duplicate shortcut
for row in self.__model:
if row[COLUMN_CONFIG_KEYNAME] == key: