def exec(self): # inhibit suspend/hibernate during restore self.config.inhibitCookie = tools.inhibitSuspend(toplevel_xid=self.config.xWindowId, reason="restoring") self.show() self.refreshTimer.start() self.thread.start() super(RestoreDialog, self).exec() self.refreshTimer.stop() self.thread.wait()
def exec(self): #inhibit suspend/hibernate during restore self.config.inhibitCookie = tools.inhibitSuspend( toplevel_xid=self.config.xWindowId, reason='restoring') self.show() self.refreshTimer.start() self.thread.start() super(RestoreDialog, self).exec() self.refreshTimer.stop() self.thread.wait()
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 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)