def close(self, win): # 关闭父级目录 node = Item.getnode() route = node.route() fa = route[-2] if fa == self.root: return # 已经是root 了, 不可以关闭 fa._open() self.win.cursor = (fa.getlinenu(), 0)
def update_status(self): node = Item.getnode() if not node: return route = node.route() if not route: return try: ps = route[1:-1] path = '/'.join([r.name for r in ps]) except: path = route[1].name self.win.b.vars['frain_status_path'] = path
def delete(self, win): node = Item.getnode() if node: node.FREventEmit("delete")
def open(self, win): node = Item.getnode() if node: node._open()