def cb_double_click(self, treeview): """ Handle double click on treeview. """ (model, iter_) = treeview.get_selection().get_selected() if not iter_: return (objclass, handle) = (model.get_value(iter_, 5), model.get_value(iter_, 4)) edit_object(self.dbstate, self.uistate, objclass, handle)
def cb_double_click(self, treeview): """ Handle double click on treeview. """ (model, iter_) = treeview.get_selection().get_selected() if not iter_: return (objclass, handle) = (model.get_value(iter_, 3), model.get_value(iter_, 2)) edit_object(self.dbstate, self.uistate, objclass, handle)
def button_press(self, _view, path, _column): """ Called when a right tree row is activated. Edit the object. """ iter_ = self.model_r.get_iter(path) (objclass, handle) = (self.model_r.get_value(iter_, 3), self.model_r.get_value(iter_, 2)) if objclass == 'Note': # the method below did not include notes!!! try: note = self.db.get_note_from_handle(handle) EditNote(self.dbstate, self.uistate, [], note) except WindowActiveError: pass else: edit_object(self.dbstate, self.uistate, objclass, handle)