Update of /cvsroot/freevo/freevo/skins/dischi1
In directory sc8-pr-cvs1:/tmp/cvs-serv3298
Modified Files:
TODO area.py blue1_big.xml blue_round1.xml blue_round2.xml
grey1.xml listing_area.py skin_dischi1.py tvlisting_area.py
xml_skin.py
Added Files:
blue2.xml
Removed Files:
blue2_big.xml blue2_small.xml
Log Message:
Lots of changes:
o blue2_big and blue2_small are gone, it's only blue2 now
o Support for up/down arrows in the listing area
o a sutitle area for additional title information (see video menu in
blue2 for an example)
o some layout changes in blue2 (experimenting with the skin)
o the skin searches for images in current dir, skins/images and icon dir
o bugfixes
--- NEW FILE: blue2.xml ---
<?xml version="1.0" ?>
<freevo>
<skin include="blue1_small" geometry="800x600">
<!--
special settings for audio. The default style is an image based style
with an info area. By pressing DISPLAY this can be toggled to the default
view
-->
<menu type="audio">
<style image="audio menu with info"/>
<style text="normal text style"/>
</menu>
<menu type="video">
<style image="video menu with info"/>
<style text="normal text style"/>
</menu>
<menu type="image">
<style image="image menu with info"/>
<style text="normal text style"/>
</menu>
<!-- Now the "audio menu with info" used by audio-->
<menuset label="audio menu with info">
<screen layout="screen0" x="0" y="0" width="800" height="600"/>
<title layout="title0" x="10" y="10" width="780" height="60"/>
<subtitle layout="title1" x="40" y="100" width="470" height="40"/>
<listing layout="audio list" x="40" y="140" width="540" height="240">
<image label="uparrow" x="5" y="150" width="32" height="32"
filename="../icons/AquaFusion/up.png"/>
<image label="downarrow" x="5" y="348" width="32" height="32"
filename="../icons/AquaFusion/down.png"/>
</listing>
<view layout="view0" x="590" y="170" width="200" height="300"/>
<info layout="info" x="40" y="410" width="760" height="170"/>
</menuset>
<!-- The "video menu with info" is like the audio one, except a different -->
<!-- listing area label -->
<menuset label="video menu with info" inherits="audio menu with info">
<listing layout="video list" height="340">
<image label="downarrow" y="363"/>
</listing>
<view y="120"/>
<info y="430" height="160"/>
</menuset>
<menuset label="image menu with info" inherits="audio menu with info">
<subtitle visible="no"/>
<listing y="120" height="330" width="720" layout="image list">
<image label="uparrow" y="137"/>
<image label="downarrow" y="415"/>
</listing>
<view visible="no"/>
<info y="480" height="110"/>
</menuset>
<layout label="title1">
<content type="short item" font="title small" align="left"/>
</layout>
<font label="title small" name="Arial_Bold" size="22" color="0xffffff"/>
<!-- info area -->
<layout label="info">
<content x="0" y="0" type="text" spacing="20" font="default">
<item type="audio">
Title: [EMAIL PROTECTED]@
Artist: [EMAIL PROTECTED]@
Album: [EMAIL PROTECTED]@ (@year@)
Track: [EMAIL PROTECTED]@
</item>
<item type="video">
@tagline@
@plot@
</item>
<item type="image">
Title: [EMAIL PROTECTED]@
Geometry: [EMAIL PROTECTED]@[EMAIL PROTECTED]@
Date: [EMAIL PROTECTED]@
@description@
</item>
<item type="dir">
Directory: [EMAIL PROTECTED]@
</item>
</content>
</layout>
<!-- listing area for audio with images -->
<layout label="audio list">
<content x="0" y="0" type="image" spacing="-2" align="center" valign="center">
<item type="default" width="100" height="100"/>
<item type="selected" width="100" height="100">
<rectangle bgcolor="selection" size="0" x="-10" y="-10" width="max+20"
height="max+20"/>
</item>
</content>
</layout>
<!-- listing area for video with images -->
<layout label="video list">
<content type="image" spacing="-2" align="center" valign="center">
<item type="default" width="80" height="112"/>
<item type="selected" width="87" height="122">
<rectangle bgcolor="selection" size="0" x="-5" y="-5" width="max+10"
height="max+10"/>
</item>
</content>
</layout>
<!-- listing area for video with images -->
<layout label="image list">
<content type="image+text" spacing="-8" align="center" valign="center">
<item type="default" width="120" height="90" font="item"/>
<item type="selected" width="168" height="126" font="selected">
<rectangle bgcolor="selection" size="0" x="-5" y="-5" width="max+10"
height="max+10"/>
</item>
</content>
</layout>
</skin>
</freevo>
Index: TODO
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/TODO,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TODO 16 Mar 2003 19:46:04 -0000 1.3
--- TODO 22 Mar 2003 20:08:30 -0000 1.4
***************
*** 1,3 ****
! add indicators for tv items and UP/DOWN for more items than you see
DISPLAY should toggle between more than two styles
--- 1,3 ----
! add indicators for tv items
DISPLAY should toggle between more than two styles
***************
*** 16,19 ****
Finish integration of Robs new gui stuff
-
- fix the <mainmenu> stuff
--- 16,17 ----
Index: area.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/area.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** area.py 21 Mar 2003 19:44:44 -0000 1.29
--- area.py 22 Mar 2003 20:08:30 -0000 1.30
***************
*** 28,31 ****
--- 28,41 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.30 2003/03/22 20:08:30 dischi
+ # Lots of changes:
+ # o blue2_big and blue2_small are gone, it's only blue2 now
+ # o Support for up/down arrows in the listing area
+ # o a sutitle area for additional title information (see video menu in
+ # blue2 for an example)
+ # o some layout changes in blue2 (experimenting with the skin)
+ # o the skin searches for images in current dir, skins/images and icon dir
+ # o bugfixes
+ #
# Revision 1.29 2003/03/21 19:44:44 dischi
# only draw images when needed
***************
*** 579,583 ****
area = eval('area.%s' % self.area_name)
except AttributeError:
! area = xml_skin.XML_area()
area.visible = FALSE
--- 589,593 ----
area = eval('area.%s' % self.area_name)
except AttributeError:
! area = xml_skin.XML_area(self.area_name)
area.visible = FALSE
***************
*** 732,735 ****
--- 742,748 ----
in a variable. The real drawing is done inside draw()
"""
+ if isinstance(image, str):
+ image = pygame.transform.scale(osd.loadbitmap(image), (val.width,
val.height))
+
if isinstance(val, tuple):
self.screen.draw('content', ('image', image, val[0], val[1],
image.get_width(),
Index: blue1_big.xml
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/blue1_big.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** blue1_big.xml 21 Mar 2003 19:50:53 -0000 1.20
--- blue1_big.xml 22 Mar 2003 20:08:30 -0000 1.21
***************
*** 43,62 ****
<!-- 1. screen: the complete background area -->
! <screen layout="screen0" visible="yes"
! x="0" y="0" width="800" height="600"/>
<!-- 2. title: the area where the title of the menu (e.g. directory name -->
<!-- will be displayed -->
! <title layout="title0" visible="yes"
! x="10" y="10" width="780" height="60"/>
<!-- 3. view area: the cover image for audio/video, a thumbnail for image -->
! <view layout="view0" visible="yes"
! x="580" y="110" width="200" height="300"/>
<!-- 4. listing area: the list of all items -->
! <listing layout="list0" visible="yes"
! x="20" y="110" width="540" height="450"/>
!
<!-- 5. info area: additional info. This area is invisible in the default -->
<!-- menu, it's only visible in the extended menus -->
--- 43,62 ----
<!-- 1. screen: the complete background area -->
! <screen layout="screen0" x="0" y="0" width="800" height="600"/>
<!-- 2. title: the area where the title of the menu (e.g. directory name -->
<!-- will be displayed -->
! <title layout="title0" x="10" y="10" width="780" height="60"/>
<!-- 3. view area: the cover image for audio/video, a thumbnail for image -->
! <view layout="view0" x="580" y="110" width="200" height="300"/>
<!-- 4. listing area: the list of all items -->
! <listing layout="list0" x="45" y="110" width="515" height="470">
! <image x="10" y="110" width="32" height="32" label="uparrow"
! filename="up.png"/>
! <image x="10" y="544" width="32" height="32" label="downarrow"
! filename="down.png"/>
! </listing>
<!-- 5. info area: additional info. This area is invisible in the default -->
<!-- menu, it's only visible in the extended menus -->
***************
*** 67,74 ****
<!-- Now the main menu -->
<menuset label="main menu">
! <screen layout="screen0" visible="yes"
! x="0" y="0" width="800" height="600"/>
! <listing layout="list_main" visible="yes"
! x="230" y="120" width="380" height="390"/>
<!-- disables info, view and title area. -->
--- 67,72 ----
<!-- Now the main menu -->
<menuset label="main menu">
! <screen layout="screen0" x="0" y="0" width="800" height="600"/>
! <listing layout="list_main" x="230" y="120" width="380" height="390"/>
<!-- disables info, view and title area. -->
***************
*** 97,102 ****
<!-- an image with the label background will ignore OVERSCAN settings -->
<!-- in freevo to make sure the complete screen is filled -->
! <image filename="../images/aubin_bg2" x="0" y="0" label="background"/>
! <image filename="../images/logo.png" x="10" y="0" width="200" height="98"/>
</background>
</layout>
--- 95,100 ----
<!-- an image with the label background will ignore OVERSCAN settings -->
<!-- in freevo to make sure the complete screen is filled -->
! <image filename="aubin_bg2" x="0" y="0" label="background"/>
! <image filename="logo.png" x="10" y="0" width="200" height="98"/>
</background>
</layout>
***************
*** 204,214 ****
<player>
! <screen layout="player screen" visible="yes"
! x="0" y="0" width="800" height="600"/>
<title visible="no"/>
- <view layout="player view" visible="yes"
- x="430" y="200" width="420" height="360"/>
- <info layout="player info" visible="yes"
- x="-50" y="80" width="550" height="300"/>
</player>
--- 202,209 ----
<player>
! <screen layout="player screen" x="0" y="0" width="800" height="600"/>
! <view layout="player view" x="430" y="200" width="420" height="360"/>
! <info layout="player info" x="-50" y="80" width="550" height="300"/>
<title visible="no"/>
</player>
***************
*** 217,221 ****
<layout label="player screen">
<background>
! <image filename="../images/aubin_bg2" x="0" y="0" label="background"/>
</background>
</layout>
--- 212,216 ----
<layout label="player screen">
<background>
! <image filename="aubin_bg2" x="0" y="0" label="background"/>
</background>
</layout>
***************
*** 256,267 ****
<tv>
! <screen layout="tv screen" visible="yes"
! x="0" y="0" width="800" height="600"/>
<title visible="no"/>
- <view visible="no"/>
- <info layout="tv info" visible="yes"
- x="10" y="10" width="780" height="190"/>
- <listing layout="tv listing" visible="yes"
- x="10" y="220" width="780" height="370"/>
</tv>
--- 251,263 ----
<tv>
! <screen layout="tv screen" x="0" y="0" width="800" height="600"/>
! <info layout="tv info" x="10" y="10" width="780" height="190"/>
! <listing layout="tv listing" x="10" y="220" width="750" height="370">
! <image x="765" y="220" width="32" height="32" label="uparrow"
! filename="up.png"/>
! <image x="765" y="544" width="32" height="32" label="downarrow"
! filename="down.png"/>
! </listing>
<title visible="no"/>
</tv>
***************
*** 273,277 ****
<layout label="tv screen">
<background>
! <image filename="../images/aubin_bg2" x="0" y="0" label="background"/>
</background>
</layout>
--- 269,273 ----
<layout label="tv screen">
<background>
! <image filename="aubin_bg2" x="0" y="0" label="background"/>
</background>
</layout>
Index: blue_round1.xml
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/blue_round1.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** blue_round1.xml 16 Mar 2003 19:36:03 -0000 1.5
--- blue_round1.xml 22 Mar 2003 20:08:30 -0000 1.6
***************
*** 13,17 ****
<menuset label="normal text style">
<!-- screen0 is already defined in blue1_big -->
! <screen layout="screen0" visible="yes"/>
<!--
--- 13,17 ----
<menuset label="normal text style">
<!-- screen0 is already defined in blue1_big -->
! <screen layout="screen0"/>
<!--
***************
*** 19,28 ****
is a new definition of the font from the layout (white big)
-->
! <title layout="title0" visible="yes"
! x="10" y="10" width="780" height="60"/>
! <view layout="view0" visible="yes"
! x="545" y="90" width="245" height="450"/>
! <listing layout="transparent listing" visible="yes"
! x="10" y="130" width="550" height="450"/>
<info visible="no"/>
</menuset>
--- 19,30 ----
is a new definition of the font from the layout (white big)
-->
! <title layout="title0" x="10" y="10" width="780" height="60"/>
! <view layout="view0" x="545" y="90" width="245" height="450"/>
! <listing layout="transparent listing" x="10" y="130" width="550" height="450">
! <image x="15" y="135" width="16" height="16" label="uparrow"
! filename="../icons/AquaFusion/up.png"/>
! <image x="15" y="560" width="16" height="16" label="downarrow"
! filename="../icons/AquaFusion/down.png"/>
! </listing>
<info visible="no"/>
</menuset>
***************
*** 51,55 ****
<rectangle size="0" bgcolor="0x80000000" radius="10" width="max"/>
</background>
! <content x="20" y="20" width="max-40" height="max-40" type="text"
spacing="-1">
<item type="default" font="white shadow1"/>
--- 53,57 ----
<rectangle size="0" bgcolor="0x80000000" radius="10" width="max"/>
</background>
! <content x="20" y="25" width="max-40" height="max-50" type="text"
spacing="-1">
<item type="default" font="white shadow1"/>
Index: blue_round2.xml
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/blue_round2.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** blue_round2.xml 21 Mar 2003 19:50:53 -0000 1.8
--- blue_round2.xml 22 Mar 2003 20:08:30 -0000 1.9
***************
*** 28,32 ****
<title visible="no"/>
<view x="20" y="100" width="300" height="300"/>
! <listing layout="listing" x="330" y="110" width="460" height="450"/>
</menuset>
--- 28,35 ----
<title visible="no"/>
<view x="20" y="100" width="300" height="300"/>
! <listing layout="listing" x="330" y="110" width="460" height="450">
! <image label="uparrow" x="290" y="110"/>
! <image label="downarrow" x="290" y="520"/>
! </listing>
</menuset>
***************
*** 79,83 ****
<layout label="screen0">
<background>
! <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/>
</background>
</layout>
--- 82,86 ----
<layout label="screen0">
<background>
! <image filename="aubin/blurr.jpg" x="0" y="0" label="background"/>
</background>
</layout>
***************
*** 85,89 ****
<layout label="screen watermark">
<background>
! <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/>
<image x="435" y="230" width="370" height="380" label="watermark"/>
</background>
--- 88,92 ----
<layout label="screen watermark">
<background>
! <image filename="aubin/blurr.jpg" x="0" y="0" label="background"/>
<image x="435" y="230" width="370" height="380" label="watermark"/>
</background>
***************
*** 92,96 ****
<layout label="video screen">
<background>
! <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/>
<image filename="movie_watermark.png" x="435" y="230" width="370"
height="380"/>
--- 95,99 ----
<layout label="video screen">
<background>
! <image filename="aubin/blurr.jpg" x="0" y="0" label="background"/>
<image filename="movie_watermark.png" x="435" y="230" width="370"
height="380"/>
***************
*** 100,104 ****
<layout label="audio screen">
<background>
! <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/>
<image filename="music_watermark.png" x="435" y="230" width="370"
height="380"/>
--- 103,107 ----
<layout label="audio screen">
<background>
! <image filename="aubin/blurr.jpg" x="0" y="0" label="background"/>
<image filename="music_watermark.png" x="435" y="230" width="370"
height="380"/>
***************
*** 108,112 ****
<layout label="image screen">
<background>
! <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/>
<image filename="image_watermark.png" x="435" y="230" width="370"
height="380"/>
--- 111,115 ----
<layout label="image screen">
<background>
! <image filename="aubin/blurr.jpg" x="0" y="0" label="background"/>
<image filename="image_watermark.png" x="435" y="230" width="370"
height="380"/>
***************
*** 165,169 ****
<layout label="player screen">
<background>
! <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/>
</background>
</layout>
--- 168,172 ----
<layout label="player screen">
<background>
! <image filename="aubin/blurr.jpg" x="0" y="0" label="background"/>
</background>
</layout>
***************
*** 174,178 ****
<layout label="tv screen">
<background>
! <image filename="../images/aubin/blurr.jpg" x="0" y="0" label="background"/>
</background>
</layout>
--- 177,181 ----
<layout label="tv screen">
<background>
! <image filename="aubin/blurr.jpg" x="0" y="0" label="background"/>
</background>
</layout>
Index: grey1.xml
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/grey1.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** grey1.xml 16 Mar 2003 19:36:04 -0000 1.1
--- grey1.xml 22 Mar 2003 20:08:30 -0000 1.2
***************
*** 4,7 ****
--- 4,14 ----
<skin include="blue1_big" geometry="800x600">
+ <menuset label="normal text style">
+ <listing height="400">
+ <image label="downarrow" x="10" y="544"/>
+ <image label="uparrow" x="50" y="544"/>
+ </listing>
+ </menuset>
+
<layout label="screen0">
<background>
Index: listing_area.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/listing_area.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** listing_area.py 21 Mar 2003 19:32:51 -0000 1.12
--- listing_area.py 22 Mar 2003 20:08:30 -0000 1.13
***************
*** 10,13 ****
--- 10,23 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/03/22 20:08:30 dischi
+ # Lots of changes:
+ # o blue2_big and blue2_small are gone, it's only blue2 now
+ # o Support for up/down arrows in the listing area
+ # o a sutitle area for additional title information (see video menu in
+ # blue2 for an example)
+ # o some layout changes in blue2 (experimenting with the skin)
+ # o the skin searches for images in current dir, skins/images and icon dir
+ # o bugfixes
+ #
# Revision 1.12 2003/03/21 19:32:51 dischi
# small bugfix
***************
*** 227,232 ****
self.get_items_geometry(settings, menu, self.display_style)
! x0 = content.x
! y0 = content.y
current_col = 1
--- 237,242 ----
self.get_items_geometry(settings, menu, self.display_style)
! item_x0 = content.x
! item_y0 = content.y
current_col = 1
***************
*** 247,250 ****
--- 257,270 ----
else:
val = content.types['default']
+
+ if content.align == 'center':
+ x0 = item_x0 + (hspace - val.width) / 2
+ else:
+ x0 = item_x0
+
+ if content.valign == 'center':
+ y0 = item_y0 + (vspace - val.height) / 2
+ else:
+ y0 = item_y0
text = choice.name
***************
*** 310,314 ****
if content.valign == 'center' and i_h < val.height:
addy = (val.height - i_h) / 2
!
if content.valign == 'bottom' and i_h < val.height:
addy = val.height - i_h
--- 330,334 ----
if content.valign == 'center' and i_h < val.height:
addy = (val.height - i_h) / 2
!
if content.valign == 'bottom' and i_h < val.height:
addy = val.height - i_h
***************
*** 325,334 ****
if current_col == cols:
! x0 = content.x
! y0 += vspace
current_col = 1
else:
! x0 += hspace
current_col += 1
self.last_choices = (menu.selected, copy.copy(menuw.menu_items))
--- 345,359 ----
if current_col == cols:
! item_x0 = content.x
! item_y0 += vspace
current_col = 1
else:
! item_x0 += hspace
current_col += 1
+ # print arrow:
+ if menuw.menu_items[0] != menu.choices[0] and area.images['uparrow']:
+ self.draw_image(area.images['uparrow'].filename, area.images['uparrow'])
+ if menuw.menu_items[-1] != menu.choices[-1] and area.images['downarrow']:
+ self.draw_image(area.images['downarrow'].filename,
area.images['downarrow'])
self.last_choices = (menu.selected, copy.copy(menuw.menu_items))
Index: skin_dischi1.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/skin_dischi1.py,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** skin_dischi1.py 16 Mar 2003 19:36:06 -0000 1.38
--- skin_dischi1.py 22 Mar 2003 20:08:30 -0000 1.39
***************
*** 10,13 ****
--- 10,23 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.39 2003/03/22 20:08:30 dischi
+ # Lots of changes:
+ # o blue2_big and blue2_small are gone, it's only blue2 now
+ # o Support for up/down arrows in the listing area
+ # o a sutitle area for additional title information (see video menu in
+ # blue2 for an example)
+ # o some layout changes in blue2 (experimenting with the skin)
+ # o the skin searches for images in current dir, skins/images and icon dir
+ # o bugfixes
+ #
# Revision 1.38 2003/03/16 19:36:06 dischi
# Adjustments to the new xml_parser, added listing type 'image+text' to
***************
*** 210,213 ****
--- 220,229 ----
if content.type == 'menu':
text = menu.heading
+ elif content.type == 'short item':
+ if menu.selected.type == 'video' and menu.selected.tv_show:
+ sn = menu.selected.show_name
+ text = sn[1] + "x" + sn[2] + " - " + sn[3]
+ else:
+ text = menu.selected.name
else:
text = menu.selected.name
***************
*** 227,230 ****
--- 243,252 ----
if content.type == 'menu':
text = menu.heading
+ elif content.type == 'short item':
+ if menu.selected.type == 'video' and menu.selected.tv_show:
+ sn = menu.selected.show_name
+ text = sn[1] + "x" + sn[2] + " - " + sn[3]
+ else:
+ text = menu.selected.name
else:
text = menu.selected.name
***************
*** 234,237 ****
--- 256,267 ----
+ class Subtitle_Area(Title_Area):
+ """
+ in this area the subtitle of the menu is drawn
+ """
+ def __init__(self, parent, screen):
+ Skin_Area.__init__(self, 'subtitle', screen)
+ self.text = ''
+
###############################################################################
***************
*** 253,257 ****
self.last_draw = None
self.screen = Screen()
! self.area_names = ( 'screen', 'title', 'listing', 'view', 'info')
for a in self.area_names:
setattr(self, '%s_area' % a, eval('%s%s_Area(self, self.screen)' % \
--- 283,287 ----
self.last_draw = None
self.screen = Screen()
! self.area_names = ( 'screen', 'title', 'subtitle', 'listing', 'view', 'info')
for a in self.area_names:
setattr(self, '%s_area' % a, eval('%s%s_Area(self, self.screen)' % \
Index: tvlisting_area.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/tvlisting_area.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** tvlisting_area.py 20 Mar 2003 18:55:46 -0000 1.8
--- tvlisting_area.py 22 Mar 2003 20:08:31 -0000 1.9
***************
*** 10,13 ****
--- 10,23 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.9 2003/03/22 20:08:31 dischi
+ # Lots of changes:
+ # o blue2_big and blue2_small are gone, it's only blue2 now
+ # o Support for up/down arrows in the listing area
+ # o a sutitle area for additional title information (see video menu in
+ # blue2 for an example)
+ # o some layout changes in blue2 (experimenting with the skin)
+ # o the skin searches for images in current dir, skins/images and icon dir
+ # o bugfixes
+ #
# Revision 1.8 2003/03/20 18:55:46 dischi
# Correct the rectangle drawing
***************
*** 368,370 ****
i += 1
y0 += item_h - 1
! return
--- 378,386 ----
i += 1
y0 += item_h - 1
!
!
! # print arrow:
! if menuw.display_up_arrow and area.images['uparrow']:
! self.draw_image(area.images['uparrow'].filename, area.images['uparrow'])
! if menuw.display_down_arrow and area.images['downarrow']:
! self.draw_image(area.images['downarrow'].filename,
area.images['downarrow'])
Index: xml_skin.py
===================================================================
RCS file: /cvsroot/freevo/freevo/skins/dischi1/xml_skin.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** xml_skin.py 21 Mar 2003 19:50:54 -0000 1.27
--- xml_skin.py 22 Mar 2003 20:08:31 -0000 1.28
***************
*** 10,13 ****
--- 10,23 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.28 2003/03/22 20:08:31 dischi
+ # Lots of changes:
+ # o blue2_big and blue2_small are gone, it's only blue2 now
+ # o Support for up/down arrows in the listing area
+ # o a sutitle area for additional title information (see video menu in
+ # blue2 for an example)
+ # o some layout changes in blue2 (experimenting with the skin)
+ # o the skin searches for images in current dir, skins/images and icon dir
+ # o bugfixes
+ #
# Revision 1.27 2003/03/21 19:50:54 dischi
# moved some main menu settings from skin to freevo_config.py
***************
*** 180,212 ****
- def attr_file(node, attr, default, c_dir, guessing=TRUE):
- """
- return the attribute as filename. This functions searches for alternative
- image filenames based on the string
- """
- if node.attrs.has_key(('', attr)):
- file = node.attrs[('', attr)].encode('latin-1')
- if file and guessing:
- dfile=os.path.join(c_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
- return file
- return default
-
-
def attr_font(node, attr, default):
"""
--- 190,193 ----
***************
*** 289,293 ****
'align' : ('str', 0),
'valign' : ('str', 0),
! 'filename' : ('file', 0),
'name' : ('font', 0),
'visible' : ('visible', 0)
--- 270,274 ----
'align' : ('str', 0),
'valign' : ('str', 0),
! 'filename' : ('str', 0),
'name' : ('font', 0),
'visible' : ('visible', 0)
***************
*** 328,333 ****
if this_scale:
e = 'attr_int(node, "%s", self.%s, %s)' % (c, c, this_scale)
- elif XML_types[c][0] == 'file':
- e = 'attr_file(node, "%s", self.%s, "%s")' % (c, c, current_dir)
else:
e = 'attr_%s(node, "%s", self.%s)' % (XML_types[c][0], c, c)
--- 309,312 ----
***************
*** 375,384 ****
class XML_menuset:
"""
! the complete menu with the areas screen, title, view, listing and info in it
"""
def __init__(self):
! self.content = ( 'screen', 'title', 'view', 'listing', 'info' )
for c in self.content:
! setattr(self, c, XML_area())
--- 354,363 ----
class XML_menuset:
"""
! the complete menu with the areas screen, title, subtitle, view, listing and info
in it
"""
def __init__(self):
! self.content = ( 'screen', 'title', 'subtitle', 'view', 'listing', 'info' )
for c in self.content:
! setattr(self, c, XML_area(c))
***************
*** 400,409 ****
area class (inside menu)
"""
! def __init__(self):
XML_data.__init__(self, ('visible', 'layout', 'x', 'y', 'width', 'height'))
self.x = -1
self.y = -1
def parse(self, node, scale, current_dir):
x = self.x
y = self.y
--- 379,395 ----
area class (inside menu)
"""
! def __init__(self, name):
XML_data.__init__(self, ('visible', 'layout', 'x', 'y', 'width', 'height'))
+ self.name = name
+ if name == 'listing':
+ self.images = {}
self.x = -1
self.y = -1
+ self.visible = FALSE
def parse(self, node, scale, current_dir):
+ if self.x == -1:
+ self.visible = TRUE
+
x = self.x
y = self.y
***************
*** 413,416 ****
--- 399,414 ----
if y != self.y:
self.y += config.OVERSCAN_Y
+ for subnode in node.children:
+ if subnode.name == u'image' and self.name == 'listing':
+ label = attr_str(subnode, 'label', '')
+ if label:
+ if not label in self.images:
+ self.images[label] = XML_image()
+ x,y = self.images[label].x, self.images[label].y
+ self.images[label].parse(subnode, scale, current_dir)
+ if x != self.images[label].x:
+ self.images[label].x += config.OVERSCAN_X
+ if y != self.images[label].y:
+ self.images[label].y += config.OVERSCAN_Y
def prepare(self, layout):
***************
*** 456,463 ****
self.content.parse(subnode, scale, current_dir)
! def prepare(self, font, color):
self.content.prepare(font, color)
for b in self.background:
! b.prepare(color)
def __cmp__(self, other):
--- 454,461 ----
self.content.parse(subnode, scale, current_dir)
! def prepare(self, font, color, search_dirs):
self.content.prepare(font, color)
for b in self.background:
! b.prepare(color, search_dirs)
def __cmp__(self, other):
***************
*** 502,506 ****
def prepare(self, font, color):
if self.font:
! self.font = font[self.font]
else:
self.font = None
--- 500,508 ----
def prepare(self, font, color):
if self.font:
! try:
! self.font = font[self.font]
! except:
! print 'can\'t find font %s' % self.font
! print font
else:
self.font = None
***************
*** 526,531 ****
XML_data.__init__(self, ('x', 'y', 'width', 'height', 'filename', 'label'))
! def prepare(self, color):
! pass
--- 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)
***************
*** 539,543 ****
'bgcolor', 'size', 'radius' ))
! def prepare(self, color):
if color.has_key(self.color):
self.color = color[seld.color]
--- 568,572 ----
'bgcolor', 'size', 'radius' ))
! def prepare(self, color, search_dirs=None):
if color.has_key(self.color):
self.color = color[seld.color]
***************
*** 563,567 ****
self.shadow.parse(subnode, scale, current_dir)
! def prepare(self, color):
if color.has_key(self.color):
self.color = color[self.color]
--- 592,596 ----
self.shadow.parse(subnode, scale, current_dir)
! def prepare(self, color, search_dirs=None):
if color.has_key(self.color):
self.color = color[self.color]
***************
*** 585,591 ****
"""
def __init__(self):
! self.content = ( 'screen', 'title', 'view', 'info' )
for c in self.content:
! setattr(self, c, XML_area())
--- 614,620 ----
"""
def __init__(self):
! self.content = ( 'screen', 'title', 'subtitle', 'view', 'info' )
for c in self.content:
! setattr(self, c, XML_area(c))
***************
*** 608,614 ****
"""
def __init__(self):
! self.content = ( 'screen', 'title', 'view', 'info', 'listing' )
for c in self.content:
! setattr(self, c, XML_area())
--- 637,643 ----
"""
def __init__(self):
! self.content = ( 'screen', 'title', 'subtitle', 'view', 'info', 'listing' )
for c in self.content:
! setattr(self, c, XML_area(c))
***************
*** 688,692 ****
self._font[label] = XML_font(label)
self._font[label].parse(node, scale, c_dir)
-
if node.name == u'color':
--- 717,720 ----
***************
*** 744,750 ****
float(config.CONF.height-2*config.OVERSCAN_Y)/float(h))
! include = attr_file(freevo_type, "include", "", \
! os.path.dirname(file), guessing = FALSE)
! if include:
self.load(include, copy_content, prepare = FALSE)
--- 772,786 ----
float(config.CONF.height-2*config.OVERSCAN_Y)/float(h))
! 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)
***************
*** 761,775 ****
layout = copy.deepcopy(self._layout)
for f in font:
font[f].prepare(self._color)
for l in layout:
! layout[l].prepare(font, self._color)
!
for menu in self.menu:
self.menu[menu].prepare(self._menuset, layout)
self.player.prepare(layout)
self.tv.prepare(layout)
self.popup = layout[self._popup]
--- 797,822 ----
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)
for l in layout:
! layout[l].prepare(font, self._color, search_dirs)
for menu in self.menu:
self.menu[menu].prepare(self._menuset, layout)
+ # prepare listing area images
+ for s in self.menu[menu].style:
+ for i in range(2):
+ if s[i] and hasattr(s[i], 'listing'):
+ for image in s[i].listing.images:
+ s[i].listing.images[image].prepare(None, search_dirs)
+
+
self.player.prepare(layout)
self.tv.prepare(layout)
+ # prepare listing area images
+ for image in self.tv.listing.images:
+ self.tv.listing.images[image].prepare(None, search_dirs)
self.popup = layout[self._popup]
--- blue2_big.xml DELETED ---
--- blue2_small.xml 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