Update of /cvsroot/freevo/freevo/src/skins/main
In directory sc8-pr-cvs1:/tmp/cvs-serv10715

Modified Files:
        xml_skin.py 
Log Message:
cleanup

Index: xml_skin.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/skins/main/xml_skin.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** xml_skin.py 5 Jan 2004 18:03:43 -0000       1.26
--- xml_skin.py 10 Jan 2004 13:21:19 -0000      1.27
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.27  2004/01/10 13:21:19  dischi
+ # cleanup
+ #
  # Revision 1.26  2004/01/05 18:03:43  dischi
  # support for extra fxd files for plugins
***************
*** 22,59 ****
  # store version information and list of depending files
  #
- # Revision 1.22  2003/12/14 17:39:52  dischi
- # Change TRUE and FALSE to True and False; vfs fixes
- #
- # Revision 1.21  2003/12/06 13:43:03  dischi
- # more cleanup
- #
- # Revision 1.20  2003/12/05 18:07:55  dischi
- # renaming of XML_xxx variables to Xxx
- #
- # Revision 1.19  2003/12/03 21:50:44  dischi
- # rework of the loading/selecting
- # o all objects that need a skin need to register what they areas they need
- # o remove all 'player' and 'tv' stuff to make it more generic
- # o renamed some skin function names
- #
- # Revision 1.18  2003/11/28 20:08:58  dischi
- # renamed some config variables
- #
- # Revision 1.17  2003/11/23 19:01:39  dischi
- # support for new fxd parser
- #
- # Revision 1.16  2003/10/22 18:23:56  dischi
- # speedup and less debug
- #
- # Revision 1.15  2003/10/21 23:46:22  gsbarbieri
- # Info_Area now support images as
- #    <img src="file" x="1" y="2" width="123" height="456" />
- # x and y are optional and will be set to "pen position" when not specified.
- # width and height are also optional and defaults to the image size.
- # file is the filename.
- #
- # <img> will define FLOAT images, not inline ones. You can simulate inline
- # images with <goto_pos>... Maybe someday, if needed, someone can implement it.
- #
  # -----------------------------------------------------------------------
  # Freevo - A Home Theater PC framework
--- 25,28 ----
***************
*** 218,222 ****
                                      '.TTF').encode(config.LOCALE)
          if not font:
!             print "can find font >%s<" % font
              font = config.OSD_DEFAULT_FONTNAME
          return font
--- 187,191 ----
                                      '.TTF').encode(config.LOCALE)
          if not font:
!             print "skin error: can find font >%s<" % font
              font = config.OSD_DEFAULT_FONTNAME
          return font
***************
*** 237,241 ****
              return vfs.abspath("%s.jpg" % dfile)
  
!     _debug_('can\'t find image %s' % file)
      return ''
  
--- 206,215 ----
              return vfs.abspath("%s.jpg" % dfile)
  
!     print 'skin error: can\'t find image %s' % file
!     if config.DEBUG:
!         print 'image search path is:'
!         for s in search_dirs:
!             print s
!     print
      return ''
  
***************
*** 365,372 ****
                  else:
                      p = plugin.getbyname(self.visible)
!                 try:
                      p = p.visible
-                 except:
-                     pass
                  if len(self.visible) > 4 and self.visible[:4] == 'not ':
                      self.visible = not p
--- 339,344 ----
                  else:
                      p = plugin.getbyname(self.visible)
!                 if hasattr(p, 'visible'):
                      p = p.visible
                  if len(self.visible) > 4 and self.visible[:4] == 'not ':
                      self.visible = not p
***************
*** 420,430 ****
              for c in self.content:
                  if subnode.name == c:
!                     eval('self.%s.parse(subnode, scale, current_dir)' % c)
  
  
      def prepare(self, layout):
          for c in self.content:
!             eval('self.%s.prepare(layout)' % c)
! 
  
  
--- 392,401 ----
              for c in self.content:
                  if subnode.name == c:
!                     getattr(self, c).parse(subnode, scale, current_dir)
  
  
      def prepare(self, layout):
          for c in self.content:
!             getattr(self, c).prepare(layout)
  
  
***************
*** 514,521 ****
                  self.background = []
                  for bg in subnode.children:
!                     if bg.name in ( 'image', 'rectangle' ):
!                         b = eval(bg.name.capitalize()+'()')
!                         b.parse(bg, scale, current_dir)
!                         self.background += [ b ]
              if subnode.name == u'content':
                  self.content.parse(subnode, scale, current_dir)
--- 485,497 ----
                  self.background = []
                  for bg in subnode.children:
!                     if bg.name == 'image':
!                         b = Image()
!                     elif bg.name == 'rectangle':
!                         b = Rectangle()
!                     else:
!                         continue
!                     b.parse(bg, scale, current_dir)
!                     self.background += [ b ]
! 
              if subnode.name == u'content':
                  self.content.parse(subnode, scale, current_dir)
***************
*** 589,596 ****
          XML_data.prepare(self)
          if self.font:
!             try:
                  self.font = font[self.font]
!             except:
!                 print 'can\'t find font %s' % self.font
                  print font
                  self.font = font['default']
--- 565,572 ----
          XML_data.prepare(self)
          if self.font:
!             if font.has_key(self.font):
                  self.font = font[self.font]
!             else:
!                 print 'skin error: can\'t find font %s' % self.font
                  print font
                  self.font = font['default']
***************
*** 650,657 ****
      def prepare(self, font, color, search_dirs):
          if self.font:
!             try:
                  self.font = font[self.font]
!             except:
!                 print 'can\'t find font %s' % self.font
                  self.font = font['default']
          else:
--- 626,633 ----
      def prepare(self, font, color, search_dirs):
          if self.font:
!             if font.has_key(self.font):
                  self.font = font[self.font]
!             else:
!                 print 'skin error: can\'t find font %s' % self.font
                  self.font = font['default']
          else:
***************
*** 754,762 ****
          XML_data.prepare(self)
          if self.image:
!             try:
                  self.filename = image_names[self.image]
!             except KeyError:
!                 print 'can\'t find image definition %s' % self.image
!                 pass
  
          if self.filename:
--- 730,737 ----
          XML_data.prepare(self)
          if self.image:
!             if image_names.has_key(self.image):
                  self.filename = image_names[self.image]
!             else:
!                 print 'skin error: can\'t find image definition %s' % self.image
  
          if self.filename:




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to