diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2009-03-02 13:29:32 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2009-03-02 13:29:32 +0800 |
commit | 9f58762089f0a4b5ec887cd972b4762e7e46455b (patch) | |
tree | 0fd507872e7858ad0441ed24e0aca38fbdc483dc | |
parent | 9c00f8f1d762db1cd61dd1a758e587df6c7dde96 (diff) | |
download | ibus-9f58762089f0a4b5ec887cd972b4762e7e46455b.tar.gz ibus-9f58762089f0a4b5ec887cd972b4762e7e46455b.tar.xz ibus-9f58762089f0a4b5ec887cd972b4762e7e46455b.zip |
Limit numeber of hotkey.
-rw-r--r-- | setup/keyboardshortcut.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/setup/keyboardshortcut.py b/setup/keyboardshortcut.py index c30dbcc..a9e2233 100644 --- a/setup/keyboardshortcut.py +++ b/setup/keyboardshortcut.py @@ -125,7 +125,6 @@ class KeyboardShortcutSelection(gtk.VBox): model.clear() for shortcut in shortcuts: model.insert(0, (shortcut,)) - # self.__shortcut_view.set_model(model) def get_shortcuts(self): model = self.__shortcut_view.get_model() @@ -133,6 +132,8 @@ class KeyboardShortcutSelection(gtk.VBox): def add_shortcut(self, shortcut): model = self.__shortcut_view.get_model() + if len(model) >= 6: + return model.insert(-1, (shortcut,)) def __get_shortcut_from_buttons(self): |