def run(self): #inhibit suspend/hibernate during delete self.config.inhibitCookie = tools.inhibitSuspend(toplevel_xid = self.config.xWindowId, reason = 'deleting files') for item in self.items: self.snapshots.deletePath(item.snapshotID(), self.parent.path) try: item.setHidden(True) except RuntimeError: #item has been deleted #probably because user refreshed treeview pass #release inhibit suspend if self.config.inhibitCookie: self.config.inhibitCookie = tools.unInhibitSuspend(*self.config.inhibitCookie)
def run(self): #inhibit suspend/hibernate during delete self.config.inhibitCookie = tools.inhibitSuspend(toplevel_xid = self.config.xWindowId, reason = 'deleting files') for item in self.items: self.snapshots.delete_path(item.snapshotID(), self.parent.path) try: item.setHidden(True) except RuntimeError: #item has been deleted #probably because user refreshed treeview pass #release inhibit suspend if self.config.inhibitCookie: self.config.inhibitCookie = tools.unInhibitSuspend(*self.config.inhibitCookie)
def threadFinished(self): self.btn_close.setEnabled(True) #release inhibit suspend if self.config.inhibitCookie: self.config.inhibitCookie = tools.unInhibitSuspend( *self.config.inhibitCookie)
def threadFinished(self): self.btn_close.setEnabled(True) # release inhibit suspend if self.config.inhibitCookie: self.config.inhibitCookie = tools.unInhibitSuspend(*self.config.inhibitCookie)