Update of /cvsroot/freevo/freevo/src/games
In directory sc8-pr-cvs1:/tmp/cvs-serv20838/src/games

Modified Files:
        __init__.py 
Log Message:
warn user about old DIR_GAMES entry

Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/games/__init__.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** __init__.py 12 Sep 2003 22:25:00 -0000      1.6
--- __init__.py 16 Sep 2003 20:45:02 -0000      1.7
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.7  2003/09/16 20:45:02  mikeruelle
+ # warn user about old DIR_GAMES entry
+ #
  # Revision 1.6  2003/09/12 22:25:00  dischi
  # prevent a possible crash
***************
*** 44,48 ****
--- 47,53 ----
  import config
  import util
+ import types
  
+ import menu
  import mame_cache
  from mameitem import MameItem
***************
*** 50,54 ****
--- 55,61 ----
  from genesisitem import GenesisItem
  from genericitem import GenericItem
+ from gui.AlertBox import PopupBox
  
+ menuwidget = menu.get_singleton()
  
  def cwd(parent, files):
***************
*** 58,67 ****
      items = []
  
!     if not hasattr(parent, 'add_args'):
!         return []
!     
!     (type, cmd, args, imgpath, suffixlist) = parent.add_args[0]
!     if type == 'MAME':
!         print 'Type : %s' % type
          mame_files = util.find_matches(files, [ 'zip' ] )
          # This will only add real mame roms to the cache.
--- 65,75 ----
      items = []
  
!     if not hasattr(parent, 'add_args') or type(parent.add_args) is not 
types.TupleType: 
!       pop = PopupBox(text="please update DIR_GAMES in local_conf.py")
!       pop.show()
!         return [menu.MenuItem(_('please update DIR_GAMES in local_conf.py'), 
menuwidget.goto_prev_page, 0)]
! 
!     (gtype, cmd, args, imgpath, suffixlist) = parent.add_args[0]
!     if gtype == 'MAME':
          mame_files = util.find_matches(files, [ 'zip' ] )
          # This will only add real mame roms to the cache.
***************
*** 71,83 ****
          for ml in mame_list:
              items += [ MameItem(ml[0], ml[1], ml[2], cmd, args, imgpath, parent) ]
!     elif type == 'SNES':
          for file in util.find_matches(files, [ 'smc', 'fig' ]):
              items += [ SnesItem(file, cmd, args, imgpath, parent) ]
              files.remove(file)
!     elif type == 'GENESIS':
          for file in util.find_matches(files, [ 'smd', 'bin' ]):
              items += [ GenesisItem(file, cmd, args, imgpath, parent) ]
              files.remove(file)
!     elif type == 'GENERIC':
          for file in util.find_matches(files, suffixlist):
              items += [ GenericItem(file, cmd, args, imgpath, parent) ]
--- 79,91 ----
          for ml in mame_list:
              items += [ MameItem(ml[0], ml[1], ml[2], cmd, args, imgpath, parent) ]
!     elif gtype == 'SNES':
          for file in util.find_matches(files, [ 'smc', 'fig' ]):
              items += [ SnesItem(file, cmd, args, imgpath, parent) ]
              files.remove(file)
!     elif gtype == 'GENESIS':
          for file in util.find_matches(files, [ 'smd', 'bin' ]):
              items += [ GenesisItem(file, cmd, args, imgpath, parent) ]
              files.remove(file)
!     elif gtype == 'GENERIC':
          for file in util.find_matches(files, suffixlist):
              items += [ GenericItem(file, cmd, args, imgpath, parent) ]
***************
*** 94,99 ****
      """
  
!     (type, cmd, args, shots, suffixlist) = parent.add_args[0]
!     if type == 'MAME':
          for item in current_items:
              for file in util.find_matches(del_files, [ 'zip' ] ):
--- 102,107 ----
      """
  
!     (gtype, cmd, args, shots, suffixlist) = parent.add_args[0]
!     if gtype == 'MAME':
          for item in current_items:
              for file in util.find_matches(del_files, [ 'zip' ] ):
***************
*** 103,117 ****
                      del_items += [ item ]
                      del_files.remove(file)
!     elif type == 'SNES':
          for file in util.find_matches(del_files, [ 'smc', 'fig' ]):
              if item.type == 'snes' and item.filename == file:
                  del_items += [ item ]
                  del_files.remove(file)
!     elif type == 'GENESIS':
          for file in util.find_matches(del_files, suffixlist):
              if item.type == 'genesis' and item.filename == file:
                  del_items += [ item ]
                  del_files.remove(file)
!     elif type == 'GENERIC':
          for file in util.find_matches(del_files, suffixlist):
              if item.type == 'generic' and item.filename == file:
--- 111,125 ----
                      del_items += [ item ]
                      del_files.remove(file)
!     elif gtype == 'SNES':
          for file in util.find_matches(del_files, [ 'smc', 'fig' ]):
              if item.type == 'snes' and item.filename == file:
                  del_items += [ item ]
                  del_files.remove(file)
!     elif gtype == 'GENESIS':
          for file in util.find_matches(del_files, suffixlist):
              if item.type == 'genesis' and item.filename == file:
                  del_items += [ item ]
                  del_files.remove(file)
!     elif gtype == 'GENERIC':
          for file in util.find_matches(del_files, suffixlist):
              if item.type == 'generic' and item.filename == file:
***************
*** 120,121 ****
--- 128,131 ----
  
      new_items += cwd(parent, new_files)
+ 
+ 




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to