示例#1
0
 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()
示例#2
0
 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()
示例#3
0
    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)
示例#4
0
    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)