예제 #1
0
    def onButDelete(self):
        #logger.warning('onButDelete - Please use the "Single File" tab to delete file(s)', __name__)
        logger.debug('onButDelete', __name__)

        list_of_cmds = self.list_of_group_delete_cmds()

        if list_of_cmds == []:
            logger.info(
                '\nThe list of commands IS EMPTY ! Click on check-box of desired file(s).',
                __name__)
            return

        txt = '\nList of commands for tentetive file deletion:'
        for cmd in list_of_cmds:
            txt += '\n' + cmd
        logger.info(txt, __name__)

        msg = 'Approve commands \njust printed in the logger'
        if self.approveCommand(self.but_copy, msg):

            for cmd in list_of_cmds:
                os.system(cmd)
                fd.addHistoryRecordOnDelete(cmd, comment='group-file-manager')

            if cp.guistatus is not None: cp.guistatus.updateStatusInfo()
            if cp.guidirtree is not None: cp.guidirtree.update_dir_tree()
 def onButDelete(self):
     #logger.info('onButDelete', __name__)
     cmd = 'rm %s' % self.str_path()
     if self.approveCommand(self.but_delete, cmd) :
         os.system(cmd)
         fd.addHistoryRecordOnDelete(cmd, comment='single-file-manager')
         self.resetFieldsOnDelete()
         if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
예제 #3
0
 def onButDelete(self):
     #logger.info('onButDelete', __name__)
     cmd = 'rm %s' % self.str_path()
     if self.approveCommand(self.but_delete, cmd):
         os.system(cmd)
         fd.addHistoryRecordOnDelete(cmd, comment='single-file-manager')
         self.resetFieldsOnDelete()
         if cp.guistatus is not None: cp.guistatus.updateStatusInfo()
    def onButDelete(self):
        #logger.warning('onButDelete - Please use the "Single File" tab to delete file(s)', __name__)
        logger.debug('onButDelete', __name__)

        list_of_cmds = self.list_of_group_delete_cmds()

        if list_of_cmds == [] :
            logger.info('\nThe list of commands IS EMPTY ! Click on check-box of desired file(s).', __name__)
            return

        txt = '\nList of commands for tentetive file deletion:'
        for cmd in list_of_cmds :
            txt += '\n' + cmd
        logger.info(txt, __name__)

        msg = 'Approve commands \njust printed in the logger'
        if self.approveCommand(self.but_copy, msg) :

            for cmd in list_of_cmds :
                os.system(cmd)
                fd.addHistoryRecordOnDelete(cmd, comment='group-file-manager')

            if cp.guistatus is not None : cp.guistatus.updateStatusInfo()
            if cp.guidirtree is not None : cp.guidirtree.update_dir_tree()