~ubuntu-branches/ubuntu/karmic/ibus/karmic-updates

« back to all changes in this revision

Viewing changes to setup/keyboardshortcut.py

  • Committer: Bazaar Package Importer
  • Author(s): LI Daobing
  • Date: 2009-07-23 20:22:09 UTC
  • mfrom: (1.1.4 upstream) (6.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090723202209-bmgqa80g1umg8l2p
Tags: 1.2.0.20090723-1
new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
            return
145
145
        if shortcut in self.get_shortcuts():
146
146
            return
147
 
        model.insert(-1, (shortcut,))
 
147
        iter = model.insert(-1, (shortcut,))
 
148
        self.__add_button.set_sensitive(False)
 
149
        path = model.get_path(iter)
 
150
        self.__shortcut_view.set_cursor(path)
148
151
 
149
152
    def __get_shortcut_from_buttons(self):
150
153
        modifiers = []
182
185
        model = self.__shortcut_view.get_model()
183
186
        path, column = self.__shortcut_view.get_cursor()
184
187
        model[path[0]][0] = shortcut
 
188
        self.__update_add_and_apply_buttons()
185
189
 
186
190
    def __del_selected_shortcut(self):
187
191
        model = self.__shortcut_view.get_model()
188
192
        path, column = self.__shortcut_view.get_cursor()
189
193
        del model[path[0]]
 
194
        self.__update_add_and_apply_buttons()
190
195
 
191
196
    def __shortcut_view_cursor_changed_cb(self, treeview):
192
197
        shortcut = self.__get_selected_shortcut()