Update of /cvsroot/freevo/freevo/skins/dischi1
In directory sc8-pr-cvs1:/tmp/cvs-serv13517
Modified Files:
TODO skin_dischi1.py xml_skin.py
Removed Files:
blue1_big.png blue1_big.xml blue1_small.png blue1_small.xml
blue2.xml blue_round1.png blue_round1.xml blue_round2.png
blue_round2.xml grey1.xml image_watermark.png
movie_watermark.png music_watermark.png shutdown_watermark.png
tv_watermark.png
Log Message:
Moved skin xml files to skins/xml/type1 and all stuff for blue_round2 to
skins/xml/blue_round2
Index: TODO
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/TODO,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TODO 22 Mar 2003 22:21:41 -0000 1.5
--- TODO 23 Mar 2003 19:57:07 -0000 1.6
***************
*** 14,15 ****
--- 14,17 ----
Finish integration of Robs new gui stuff
+
+ Add force-to-style and begin-with style in some way
Index: skin_dischi1.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/skin_dischi1.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** skin_dischi1.py 22 Mar 2003 22:21:41 -0000 1.40
--- skin_dischi1.py 23 Mar 2003 19:57:11 -0000 1.41
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.41 2003/03/23 19:57:11 dischi
+ # Moved skin xml files to skins/xml/type1 and all stuff for blue_round2 to
+ # skins/xml/blue_round2
+ #
# Revision 1.40 2003/03/22 22:21:41 dischi
# DISPLAY can now toggle between more than two styles. The video menu
***************
*** 283,287 ****
def __init__(self):
- self.XML_SKIN_DIRECTORY = 'skins/dischi1'
self.display_style = 0
self.force_redraw = TRUE
--- 287,290 ----
***************
*** 302,306 ****
if not self.settings.load(config.SKIN_XML_FILE):
print "skin not found, using fallback skin"
! self.settings.load("%s/blue1_big.xml" % self.XML_SKIN_DIRECTORY)
for dir in config.cfgfilepath:
--- 305,309 ----
if not self.settings.load(config.SKIN_XML_FILE):
print "skin not found, using fallback skin"
! self.settings.load("skins/xml/type1/blue1_big.fxd")
for dir in config.cfgfilepath:
***************
*** 338,344 ****
"""
ret = []
! for skin in util.match_files(self.XML_SKIN_DIRECTORY, ['xml']):
name = os.path.splitext(os.path.basename(skin))[0]
! if '%s.png' % os.path.splitext(skin)[0]:
image = '%s.png' % os.path.splitext(skin)[0]
else:
--- 341,353 ----
"""
ret = []
! skin_files = util.match_files('skins/xml/type1', ['fxd'])
! for d in util.getdirnames('skins/xml'):
! skin = os.path.join(d, os.path.basename(d)+'.fxd')
! if os.path.isfile(skin):
! skin_files += [ skin ]
!
! for skin in skin_files:
name = os.path.splitext(os.path.basename(skin))[0]
! if os.path.isfile('%s.png' % os.path.splitext(skin)[0]):
image = '%s.png' % os.path.splitext(skin)[0]
else:
Index: xml_skin.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/xml_skin.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** xml_skin.py 22 Mar 2003 20:08:31 -0000 1.28
--- xml_skin.py 23 Mar 2003 19:57:11 -0000 1.29
***************
*** 10,13 ****
--- 10,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.29 2003/03/23 19:57:11 dischi
+ # Moved skin xml files to skins/xml/type1 and all stuff for blue_round2 to
+ # skins/xml/blue_round2
+ #
# Revision 1.28 2003/03/22 20:08:31 dischi
# Lots of changes:
***************
*** 214,217 ****
--- 218,247 ----
+ def search_file(file, search_dirs):
+ for s_dir in search_dirs:
+ dfile=os.path.join(s_dir, file)
+
+ if os.path.isfile(dfile):
+ return dfile
+ if os.path.isfile("%s_%sx%s.png" % (dfile, config.CONF.width,
+ config.CONF.height)):
+ return "%s_%sx%s.png" % (dfile, config.CONF.width, config.CONF.height)
+ if os.path.isfile("%s_%sx%s.jpg" % (dfile, config.CONF.width,
+ config.CONF.height)):
+ return "%s_%sx%s.jpg" % (dfile, config.CONF.width, config.CONF.height)
+ if config.CONF.width == 720 and os.path.isfile("%s_768x576.png" % dfile):
+ return "%s_768x576.png" % dfile
+ if config.CONF.width == 720 and os.path.isfile("%s_768x576.jpg" % dfile):
+ return "%s_768x576.jpg" % dfile
+ if os.path.isfile("%s.png" % dfile):
+ return "%s.png" % dfile
+ if os.path.isfile("%s.jpg" % dfile):
+ return "%s.jpg" % dfile
+
+ print 'can\'t find image %s' % file
+ return ''
+
+
+
# ======================================================================
***************
*** 236,239 ****
--- 266,273 ----
self.image = attr_str(node, "image", self.image)
+ def prepaire(self, search_dirs):
+ if self.image:
+ self.image = search_file(self.image, search_dirs)
+
# ======================================================================
***************
*** 250,253 ****
--- 284,290 ----
self.items[item.label] = item
+ def prepare(self, search_dirs):
+ for i in self.items:
+ self.items[i].prepaire(search_dirs)
# ======================================================================
***************
*** 528,560 ****
XML_data.__init__(self, ('x', 'y', 'width', 'height', 'filename', 'label'))
- def search_file(self, file, search_dirs):
- for s_dir in search_dirs:
- dfile=os.path.join(s_dir, file)
-
- if os.path.isfile(dfile):
- return dfile
- if os.path.isfile("%s_%sx%s.png" % (dfile, config.CONF.width,
- config.CONF.height)):
- return "%s_%sx%s.png" % (dfile, config.CONF.width,
config.CONF.height)
- if os.path.isfile("%s_%sx%s.jpg" % (dfile, config.CONF.width,
- config.CONF.height)):
- return "%s_%sx%s.jpg" % (dfile, config.CONF.width,
config.CONF.height)
- if config.CONF.width == 720 and os.path.isfile("%s_768x576.png" % dfile):
- return "%s_768x576.png" % dfile
- if config.CONF.width == 720 and os.path.isfile("%s_768x576.jpg" % dfile):
- return "%s_768x576.jpg" % dfile
- if os.path.isfile("%s.png" % dfile):
- return "%s.png" % dfile
- if os.path.isfile("%s.jpg" % dfile):
- return "%s.jpg" % dfile
-
- print 'can\'t find image %s' % file
- return ''
-
def prepare(self, color, search_dirs):
"""
try to guess the image localtion
"""
! self.filename = self.search_file(self.filename, search_dirs)
--- 565,574 ----
XML_data.__init__(self, ('x', 'y', 'width', 'height', 'filename', 'label'))
def prepare(self, color, search_dirs):
"""
try to guess the image localtion
"""
! if self.filename:
! self.filename = search_file(self.filename, search_dirs)
***************
*** 670,675 ****
self._player = XML_player()
self._tv = XML_tv()
!
! self.mainmenu = XML_mainmenu()
self.icon_dir = ""
--- 684,689 ----
self._player = XML_player()
self._tv = XML_tv()
! self._mainmenu = XML_mainmenu()
!
self.icon_dir = ""
***************
*** 678,682 ****
for node in freevo_type.children:
if node.name == u'main':
! self.mainmenu.parse(node, scale, c_dir)
if node.name == u'menu':
--- 692,696 ----
for node in freevo_type.children:
if node.name == u'main':
! self._mainmenu.parse(node, scale, c_dir)
if node.name == u'menu':
***************
*** 745,754 ****
if not os.path.isfile(file):
! if os.path.isfile(file+".xml"):
! file += ".xml"
else:
! file = "skins/dischi1/%s" % file
! if os.path.isfile(file+".xml"):
! file += ".xml"
if not os.path.isfile(file):
--- 759,770 ----
if not os.path.isfile(file):
! if os.path.isfile(file+".fxd"):
! file += ".fxd"
! elif os.path.isfile('skins/xml/%s/%s.fxd' % (file, file)):
! file = 'skins/xml/%s/%s.fxd' % (file, file)
else:
! file = "skins/xml/type1/%s" % file
! if os.path.isfile(file+".fxd"):
! file += ".fxd"
if not os.path.isfile(file):
***************
*** 774,786 ****
include = attr_str(freevo_type, 'include', '')
! if include and not os.path.isfile(include):
! include += '.xml'
!
! if include and not os.path.isfile(include):
! include = os.path.join(os.path.dirname(file), include)
! if not os.path.isfile(include):
! print 'can find include %s' % include
!
! if include and os.path.isfile(include):
self.load(include, copy_content, prepare = FALSE)
--- 790,794 ----
include = attr_str(freevo_type, 'include', '')
! if include:
self.load(include, copy_content, prepare = FALSE)
***************
*** 797,801 ****
layout = copy.deepcopy(self._layout)
! search_dirs = (os.path.dirname(file), 'skins/images', self.icon_dir)
for f in font:
font[f].prepare(self._color)
--- 805,809 ----
layout = copy.deepcopy(self._layout)
! search_dirs = (os.path.dirname(file), 'skins/images', self.icon_dir, '.')
for f in font:
font[f].prepare(self._color)
***************
*** 821,824 ****
--- 829,835 ----
self.popup = layout[self._popup]
+
+ self.mainmenu = copy.deepcopy(self._mainmenu)
+ self.mainmenu.prepare(search_dirs)
return 1
--- blue1_big.png DELETED ---
--- blue1_big.xml DELETED ---
--- blue1_small.png DELETED ---
--- blue1_small.xml DELETED ---
--- blue2.xml DELETED ---
--- blue_round1.png DELETED ---
--- blue_round1.xml DELETED ---
--- blue_round2.png DELETED ---
--- blue_round2.xml DELETED ---
--- grey1.xml DELETED ---
--- image_watermark.png DELETED ---
--- movie_watermark.png DELETED ---
--- music_watermark.png DELETED ---
--- shutdown_watermark.png DELETED ---
--- tv_watermark.png DELETED ---
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog