Beispiel #1
0
 def __keys_add_clicked(self, *_):
     dlg = KeyDialog(self.window)
     (res, key) = dlg.run('')
     dlg.destroy()
     if res == gtk.RESPONSE_OK:
         (model, it) = self.keys_selection.get_selected()
         it = model.insert_after(it)
         model.set_value(it, 0, key)
         self.keys_selection.select_iter(it)
Beispiel #2
0
 def __keys_edit_clicked(self, *_):
     (model, it) = self.keys_selection.get_selected()
     if it is None:
         return
     key = model.get_value(it, 0)
     dlg = KeyDialog(self.window)
     (res, key) = dlg.run(key)
     dlg.destroy()
     if res == gtk.RESPONSE_OK:
         model.set_value(it, 0, key)