Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv13544

Modified Files:
        videoitem.py 
Log Message:
Inside the item menu added the option to delete the file.  This pops up
a confirm box to make sure.


Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** videoitem.py        30 Mar 2003 18:04:46 -0000      1.27
--- videoitem.py        31 Mar 2003 03:02:35 -0000      1.28
***************
*** 10,13 ****
--- 10,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.28  2003/03/31 03:02:35  rshortt
+ # Inside the item menu added the option to delete the file.  This pops up
+ # a confirm box to make sure.
+ #
  # Revision 1.27  2003/03/30 18:04:46  dischi
  # update to new gui interface
***************
*** 154,157 ****
--- 158,162 ----
  
  from gui.PopupBox import PopupBox
+ from gui.ConfirmBox import ConfirmBox
  from item import Item
  import configure
***************
*** 273,276 ****
--- 278,284 ----
          """
          items = [ (self.play, 'Play'), (self.settings, 'Change play settings') ]
+         if config.NEW_SKIN:
+             if self.filename:
+                 items += [ (self.confirm_delete, 'Delete file') ]
          if self.variants:
              items += [ (self.show_variants, 'Show variants') ]
***************
*** 297,300 ****
--- 305,322 ----
  
          return items
+ 
+ 
+     def confirm_delete(self, arg=None, menuw=None):
+         confirm = ConfirmBox(menuw,
+                              'Do you wish to delete %s?' % self.name,
+                              self.delete_file)
+         confirm.show()
+         self.menuw = menuw
+ 
+ 
+     def delete_file(self):
+         print 'Deleting %s' % self.filename
+         self.menuw.back_one_menu()
+         os.remove(self.filename)
  
  




-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to