Esempio n. 1
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)
Esempio n. 2
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)
Esempio n. 3
0
 def threadFinished(self):
     self.btn_close.setEnabled(True)
     #release inhibit suspend
     if self.config.inhibitCookie:
         self.config.inhibitCookie = tools.unInhibitSuspend(
             *self.config.inhibitCookie)
Esempio n. 4
0
 def threadFinished(self):
     self.btn_close.setEnabled(True)
     # release inhibit suspend
     if self.config.inhibitCookie:
         self.config.inhibitCookie = tools.unInhibitSuspend(*self.config.inhibitCookie)