def up(self): # ascent in old tree if self.__old is not None: if self.__old.sameDepth(self.__view): self.__old.up() # ascent in new tree if self.__new is not None: if self.__new.sameDepth(self.__view): self.__new.up() # ascent in view tree, update status of parent directory we are returning from in view tree status = self.__view.getTotalNodeStatus() name = self.__view.up() nid = Node.constructNid(name, True) node = self.__view.getNodeByNid(nid) if node is None: raise MyException('Tree inconsistency; that should never happen.', 3) if not (node.status == NodeStatus.Missing or node.status == NodeStatus.New): node.status = status self.__view.update(node)
def IndexToNid(self, index): name = self.list.GetItem(index, self.nameColumn).GetText() isdir = self.list.GetItem(index, self.dirMarkerColumn).GetText() == self.__dirMarkerString return Node.constructNid(name, isdir)