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

Modified Files:
        mediamenu.py 
Log Message:
make a config option HIDE_UNUSABLE_DISCS

Index: mediamenu.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/plugins/mediamenu.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** mediamenu.py        23 Aug 2003 12:51:42 -0000      1.13
--- mediamenu.py        23 Aug 2003 19:42:09 -0000      1.14
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.14  2003/08/23 19:42:09  dischi
+ # make a config option HIDE_UNUSABLE_DISCS
+ #
  # Revision 1.13  2003/08/23 12:51:42  dischi
  # removed some old CVS log messages
***************
*** 63,76 ****
  
  import plugin
! 
! import plugins
! # Types that will be displayed when in 'key' display_type
! # Use this to avoid displaying empty cdroms, audiocd in video menu, ...
! dir_types = {
!     'audio': [ 'dir', 'audiocd', None ],
!     'video': [ 'dir', 'video', 'vcd', 'dvd', None ],
!     'image': [ 'dir', None ],
!     'mame' : [ 'dir', None ],
!     }
  
  #
--- 66,70 ----
  
  import plugin
! import plugins.rom_drives
  
  #
***************
*** 121,124 ****
--- 115,131 ----
          items = copy.copy(self.normal_items)
  
+         if config.HIDE_UNUSABLE_DISCS:
+             dir_types = {
+                 'audio': [ 'dir', 'audiocd', 'audio' ],
+                 'video': [ 'dir', 'video', 'vcd', 'dvd' ],
+                 'image': [ 'dir', None ],
+                 'games': [ 'dir', None ],
+                 }
+         else:
+             dir_types = {}
+             for type in ('audio', 'video', 'image', 'games'):
+                 dir_types[type] = [ 'dir', 'audiocd', 'audio', 'video',
+                                     'vcd', 'dvd', None ]
+                 
          if self.display_type:
              plugins_list = plugin.get('mainmenu_%s' % self.display_type)
***************
*** 132,139 ****
              if isinstance( p, plugins.rom_drives.rom_items ):
                  # do not show media from other menus
!                 l = p.items( self )
!                 for i in l:
                      if i.type in dir_type:
!                         items += [ i ]
              else:
                  items += p.items( self )
--- 139,145 ----
              if isinstance( p, plugins.rom_drives.rom_items ):
                  # do not show media from other menus
!                 for i in p.items( self ):
                      if i.type in dir_type:
!                         items.append(i)
              else:
                  items += p.items( self )




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to