summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-08-20 15:08:18 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-08-20 15:08:18 +0800
commitff2602cfc356474d23e4aadde00ea71e482d4731 (patch)
treebb3c2889b01e4708b90d3c3d2c1cd195e6a3018a
parent1ea2187d6c06f5a277149d9a6e53aa3f9c83ba2d (diff)
downloadibus-ff2602cfc356474d23e4aadde00ea71e482d4731.tar.gz
ibus-ff2602cfc356474d23e4aadde00ea71e482d4731.tar.xz
ibus-ff2602cfc356474d23e4aadde00ea71e482d4731.zip
Add add_shortcut method
-rw-r--r--setup/keyboardshortcut.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup/keyboardshortcut.py b/setup/keyboardshortcut.py
index 7a914d4..d794324 100644
--- a/setup/keyboardshortcut.py
+++ b/setup/keyboardshortcut.py
@@ -177,7 +177,6 @@ class KeyboardShortcutSelection(gtk.VBox):
del model[path[0]]
def __shortcut_view_cursor_changed_cb(self, treeview):
- print "cursor changed"
shortcut = self.__get_selected_shortcut()
self.__set_shortcut_to_buttons(shortcut)
@@ -240,6 +239,9 @@ class KeyboardShortcutSelectionDialog(gtk.Dialog):
def set_shortcuts(self, shotrcuts = None):
self.__selection_view.set_shortcuts(shotrcuts)
+ def add_shortcut(self, shotrcut):
+ self.__selection_view.add_shortcut(shotrcut)
+
def get_shortcuts(self):
return self.__selection_view.get_shortcuts()
@@ -249,7 +251,7 @@ if __name__ == "__main__":
dlg = KeyboardShortcutSelectionDialog(
title = "Select test",
buttons = (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK))
- dlg.set_shortcuts(["Ctrl+Shift+space"])
+ dlg.add_shortcut("Ctrl+Shift+space")
print dlg.run()
print dlg.get_shortcuts()