From 1ad3051b149bbc5e916ec794f7638be7f5563e59 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Wed, 1 Jul 2009 12:32:08 +0800 Subject: [PATCH] Update buttons' states correctly --- setup/keyboardshortcut.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup/keyboardshortcut.py b/setup/keyboardshortcut.py index 14bcdbf..13ef6d3 100644 --- a/setup/keyboardshortcut.py +++ b/setup/keyboardshortcut.py @@ -144,8 +144,10 @@ class KeyboardShortcutSelection(gtk.VBox): return if shortcut in self.get_shortcuts(): return - model.insert(-1, (shortcut,)) - self.__update_add_and_apply_buttons() + iter = model.insert(-1, (shortcut,)) + self.__add_button.set_sensitive(False) + path = model.get_path(iter) + self.__shortcut_view.set_cursor(path) def __get_shortcut_from_buttons(self): modifiers = [] -- 2.7.4