Update of /cvsroot/freevo/freevo/src/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv9434

Modified Files:
        file_ops.py 
Log Message:
add delete to directories

Index: file_ops.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugins/file_ops.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** file_ops.py 23 Oct 2003 23:05:24 -0000      1.10
--- file_ops.py 22 Nov 2003 12:24:39 -0000      1.11
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.11  2003/11/22 12:24:39  dischi
+ # add delete to directories
+ #
  # Revision 1.10  2003/10/23 23:05:24  outlyer
  # Remove some debug.
***************
*** 71,74 ****
--- 74,78 ----
  import config
  import plugin
+ import util
  
  from gui.ConfirmBox import ConfirmBox
***************
*** 90,93 ****
--- 94,100 ----
              if item.type == 'video' and hasattr(item, 'fxd_file'):
                  items.append((self.confirm_info_delete, _('Delete info'), 
'delete_info'))
+         if item.type == 'dir':
+             self.item = item
+             items.append((self.confirm_delete, _('Delete directory'), 'delete'))
          return items
  
***************
*** 127,137 ****
  
      def delete_file(self):
!         _debug_('Deleting %s' % self.item.filename)
  
!         self.delete_pictures()
!         self.delete_fxd()
  
!         if os.path.isfile(self.item.filename):
!             self.safe_unlink(self.item.filename)
  
          if self.menuw:
--- 134,151 ----
  
      def delete_file(self):
!         if self.item.type == 'dir':
!             _debug_('Deleting %s' % self.item.dir)
!             try:
!                 util.rmrf(self.item.dir)
!             except:
!                 print 'can\'t delete %s' % self.item.dir
!         else:
!             _debug_('Deleting %s' % self.item.filename)
  
!             self.delete_pictures()
!             self.delete_fxd()
  
!             if os.path.isfile(self.item.filename):
!                 self.safe_unlink(self.item.filename)
  
          if self.menuw:




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to