def moveEventToTrash(self, path): group, event = self.getObjsByPath(path) if not confirmEventTrash(event, parent=self): return ui.moveEventToTrash(group, event) self.trees.remove(self.trees.get_iter(path)) if core.eventTrashLastTop: self.insertEventRow(self.trashIter, 0, event) else: self.appendEventRow(self.trashIter, event)
def moveEventToTrash(self, path): try: gid = self.trees[path][0] eid = self.trees[path][1] except: return group = ui.eventGroups[gid] event = group[eid] if not confirmEventTrash(event): return ui.moveEventToTrash(group, event) ui.reloadTrash = True ui.eventDiff.add("-", event) self.trees.remove(self.trees.get_iter(path))