Author: duncan
Date: Thu Jun 14 20:25:08 2007
New Revision: 9694
Modified:
branches/rel-1/freevo/share/skins/main/blurr.fxd
branches/rel-1/freevo/src/plugins/buttonbar.py
branches/rel-1/freevo/src/skins/main/area.py
branches/rel-1/freevo/src/skins/main/main.py
branches/rel-1/freevo/src/skins/main/screen.py
branches/rel-1/freevo/src/skins/main/xml_skin.py
Log:
[ 1733061 ] Improved int attribute handling in xml skins
Patch from Adam Charrett applied
Modified: branches/rel-1/freevo/share/skins/main/blurr.fxd
==============================================================================
--- branches/rel-1/freevo/share/skins/main/blurr.fxd (original)
+++ branches/rel-1/freevo/share/skins/main/blurr.fxd Thu Jun 14 20:25:08 2007
@@ -1,20 +1,20 @@
<?xml version="1.0" ?>
<!DOCTYPE freevo-skin SYSTEM "../freevo-skin.dtd">
<freevo>
-
+
<skin include="basic" geometry="800x600">
-
- <!--
+
+ <!--
*******************************************************
** DEFAULT AND GENERAL SETTINGS
******************************************************* -->
<iconset theme="blurr"/>
-
+
<!-- Redefine of the type default -->
<menuset label="normal text style">
<view x="20" y="100" width="300" height="300"/>
-
+
<listing layout="listing" x="330" y="100" width="420" height="470
- (buttonbar * (buttonbar_height + 10))">
<image filename="up.png" label="uparrow" x="760" y="110"/>
<image filename="down.png" label="downarrow" x="760"
y="max-32"/>
@@ -26,13 +26,13 @@
<view visible="no"/>
<listing x="20" width="730"/>
</menuset>
-
+
<!-- default with description and image -->
<menuset label="default description" inherits="normal text style">
<listing height="350"/>
<info layout="description" visible="yes" x="20" y="460"
width="760" height="130 - buttonbar_height"/>
</menuset>
-
+
<!-- default with description without an image -->
<menuset label="default description no image" inherits="default
description">
<view visible="no"/>
@@ -48,7 +48,7 @@
</item>
</content>
</layout>
-
+
<!-- default listing area -->
<layout label="listing">
<background/>
@@ -60,7 +60,7 @@
</item>
</content>
</layout>
-
+
<!-- default info area -->
<layout label="description">
<background>
@@ -70,19 +70,19 @@
spacing="20" font="default">
<item type="default">
<if expression="description">
- <text font="info value" mode="soft" height="max"
+ <text font="info value" mode="soft" height="max"
expression="description"/>
</if>
</item>
-
+
</content>
</layout>
<image label="background" filename="blurrback.jpg"/>
<image label="logo" filename="gant/logo.png"/>
- <image label="scheduledtv" filename="gant/scheduledtv.png"/>
-
- <!--
+ <image label="scheduledtv" filename="gant/scheduledtv.png"/>
+
+ <!--
*******************************************************
** VIDEO MENU
******************************************************* -->
@@ -90,11 +90,11 @@
<menu type="video">
<style text="text with info style"/>
</menu>
-
+
<menuset label="video" inherits="normal text style">
<screen layout="video screen"/>
</menuset>
-
+
<menuset label="text with info style" inherits="normal text style">
<!-- 4. listing area: the list of all items -->
<screen layout="video screen" visible="yes"/>
@@ -105,7 +105,7 @@
</listing>
<info layout="video info" x="300" y="100" width="450"
height="300"/>
</menuset>
-
+
<layout label="video screen">
<background>
<image image="background" x="0" y="0" label="background"/>
@@ -115,7 +115,7 @@
height="380"/>
</background>
</layout>
-
+
<layout label="video info">
<content x="0" y="0" type="text" spacing="20" font="default">
@@ -141,7 +141,7 @@
</if>
<if expression="plot">
<goto_pos x="20" mode="relative"/>
- <text font="info plot" height="120" mode="soft"
+ <text font="info plot" height="120" mode="soft"
align="justified" expression="plot"/>
<newline/>
</if>
@@ -157,7 +157,7 @@
<newline/>
</if>
</item>
-
+
<item type="dir">
<text font="info tagline" width="max" expression="name"/>
<newline/>
@@ -168,12 +168,12 @@
</if>
<if expression="plot">
<goto_pos x="10" mode="relative"/>
- <text font="info plot" height="max" mode="soft"
+ <text font="info plot" height="max" mode="soft"
align="justified" expression="plot"/>
<newline/>
</if>
<if expression="content and not plot">
- <text font="info plot" height="max" mode="soft"
+ <text font="info plot" height="max" mode="soft"
align="justified" expression="content"/>
<newline/>
</if>
@@ -197,7 +197,7 @@
<newline/>
</if>
</item>
-
+
<item type="track">
<if expression="trackno">
<text font="info tagline">Track </text>
@@ -225,11 +225,11 @@
<newline/>
</if>
</item>
-
+
</content>
</layout>
-
- <!--
+
+ <!--
*******************************************************
** AUDIO MENU
******************************************************* -->
@@ -237,13 +237,13 @@
<menu type="audio">
<style text="audio"/>
</menu>
-
+
<menuset label="audio" inherits="normal text style">
<screen layout="audio screen"/>
<view layout="view" x="15" y="90" width="280" height="270"/>
<info layout="audio info" x="28" y="370" width="273" height="190 -
buttonbar_height"/>
</menuset>
-
+
<layout label="audio screen">
<background>
<image image="background" x="0" y="0" label="background"/>
@@ -253,7 +253,7 @@
width="290" height="475 - (buttonbar_height/2)"/>
</background>
</layout>
-
+
<layout label="audio info">
<content x="0" y="0" type="text" spacing="20" font="default">
<!-- audio dir -->
@@ -270,7 +270,7 @@
<text font="info tagline" expression="name"
mode="soft" />
<newline/>
</if>
-
+
<if expression="display_type == 'audio' and year">
<if expression="album or artist">
<text font="info value" expression="year"/>
@@ -287,7 +287,7 @@
<newline/>
</if>
</item>
-
+
<item type="audio">
<if expression="artist">
<text font="info tagline" expression="artist"/>
@@ -301,11 +301,11 @@
<text font="info tagline" expression="name"
mode="soft" />
<newline/>
<if expression="description"> <!-- e.g. webradio -->
- <text font="info value" expression="description"
+ <text font="info value" expression="description"
height="max" mode="soft"/>
</if>
</if>
-
+
<if expression="parent(audio_advanced_sort)">
<text font="info value">Track </text>
<text font="info value" expression="trackno"/>
@@ -325,7 +325,7 @@
<newline/>
</if>
</item>
-
+
<item type="audiocd">
<if expression="title">
<text font="info tagline" expression="title"/>
@@ -343,9 +343,9 @@
</item>
</content>
</layout>
-
-
- <!--
+
+
+ <!--
*******************************************************
** IMAGE MENU
******************************************************* -->
@@ -354,14 +354,14 @@
<style image="image" text="normal text style (image)"/>
<style text="normal text style (image)"/>
</menu>
-
+
<menuset label="image" inherits="normal text style">
<screen layout="image screen"/>
<listing y="80" x="60"
height="430-(buttonbar*(buttonbar_height+10))" width="700" layout="image list"/>
<info layout="image info" x="10"
y="510-(buttonbar*(buttonbar_height-10))" width="780" height="80"/>
<view visible="no"/>
</menuset>
-
+
<menuset label="normal text style (image)" inherits="normal text
style">
<screen layout="image screen" visible="yes"/>
</menuset>
@@ -373,7 +373,7 @@
height="380"/>
</background>
</layout>
-
+
<!-- listing area for image with images (preview) -->
<layout label="image list">
<content type="image" spacing="0">
@@ -389,7 +389,7 @@
</item>
</content>
</layout>
-
+
<layout label="image info">
<background>
<rectangle size="0" radius="10" bgcolor="0xaa000000"/>
@@ -403,7 +403,7 @@
<text font="info value"> Items</text>
<!-- other values are num_play_items and num_dir_items -->
</item>
-
+
<item type="playlist">
<text font="info tagline" width="max" expression="name"/>
<newline/>
@@ -411,7 +411,7 @@
<text font="info value"> Items</text>
<!-- other values are num_play_items and num_dir_items -->
</item>
-
+
<item type="image">
<text font="info tagline" expression="name"/>
<goto_pos x="50" mode="relative"/>
@@ -420,7 +420,7 @@
</if>
<newline/>
<if expression="description">
- <text font="info plot" height="max" mode="soft"
+ <text font="info plot" height="max" mode="soft"
expression="description"/>
<newline/>
</if>
@@ -438,9 +438,9 @@
</item>
</content>
</layout>
-
- <!--
+
+ <!--
*******************************************************
** MAIN MENU
******************************************************* -->
@@ -465,14 +465,14 @@
<listing layout="list_main" x="230" y="180" width="380"
height="390"/>
<view visible="no"/>
</menuset>
-
+
<layout label="screen watermark">
<background>
<image image="background" x="0" y="0" label="background"/>
<image x="435" y="230" width="370" height="380"
label="watermark"/>
</background>
</layout>
-
+
<!-- main menu listing area -->
<layout label="list_main">
<content align="center" type="text" spacing="10">
@@ -483,7 +483,7 @@
</item>
</content>
</layout>
-
+
<!-- redefine the main menu listing area -->
<layout label="main listing">
<content type="text" spacing="10">
@@ -494,21 +494,21 @@
</item>
</content>
</layout>
-
- <!--
+
+ <!--
*******************************************************
** TV DEFINITIONS
******************************************************* -->
-
+
<menu type="tv">
<style text="text with tv info style"/>
</menu>
-
+
<menu type="tv main menu">
<style text="text with tv info style (main)"/>
</menu>
-
+
<menu type="tv program menu">
<style text="text with program info style"/>
</menu>
@@ -528,14 +528,14 @@
<listing layout="tv listing" x="10" y="220" width="750"
height="350-(buttonbar*(buttonbar_height-30))">
<image x="765" y="220" width="32" height="32" label="uparrow"
filename="up.png"/>
- <image x="765" y="max-32" width="32" height="32"
label="downarrow"
+ <image x="765" y="max-32" width="32" height="32"
label="downarrow"
filename="down.png"/>
<image width="16" height="16" label="leftarrow"
filename="left.png"/>
<image width="16" height="16" label="rightarrow"
filename="right.png"/>
</listing>
</menuset>
-
- <menuset label="tv" inherits="normal text style">
+
+ <menuset label="tv" inherits="normal text style">
<view visible="no"/>
<listing x="100" width="680">
<image label="uparrow" x="290" y="110"/>
@@ -543,18 +543,18 @@
</listing>
<screen layout="tv menu screen"/>
</menuset>
-
+
<menuset label="text with tv info style" inherits="text with info
style">
<screen layout="tv screen" visible="yes"/>
</menuset>
-
+
<menuset label="text with tv info style (main)" inherits="text with
info style">
<screen layout="tv screen" visible="yes"/>
<info layout="tv extended info" x="30" y="100" width="740"
height="230"/>
<view visible="no"/>
</menuset>
-
- <menuset label="text with program info style"
+
+ <menuset label="text with program info style"
inherits="text with tv info style (main)">
<info layout="tv program info"/>
</menuset>
@@ -578,19 +578,19 @@
height="380"/>
</background>
</layout>
-
+
<layout label="tv extended info">
<content x="0" y="0" type="text" spacing="20" font="default">
<item type="default">
- <text font="info tagline" width="max" height="max"
+ <text font="info tagline" width="max" height="max"
expression="function:comingup" mode="soft"/>
</item>
</content>
</layout>
-
+
<layout label="tv program info">
<background>
- <image image="scheduledtv" x="-5" y="0" width="256"
+ <image image="scheduledtv" x="-5" y="0" width="256"
height="256" label="top"/>
</background>
<content x="260"/>
@@ -622,7 +622,7 @@
</item>
</content>
</layout>
-
+
<font label="tv" name="Arial_Bold" size="14" color="0xffffff"/>
<font label="tv selected" name="Arial_Bold" size="14" color="0x164668">
<shadow visible="no" color="0x000000" border="yes"/>
@@ -632,18 +632,18 @@
<font label="tv time" name="Arial_Bold" size="14" color="0xffffff"/>
<font label="tv title" name="Arial_Bold" size="16" color="0xffffff"/>
- <!--
+ <!--
*******************************************************
** AUDIO PLAYER DEFINITIONS
******************************************************* -->
-
+
<player>
<screen layout="player screen" x="0" y="0" width="800"
height="600"/>
<info layout="player info blurr" x="400" y="140" width="375"
height="330"/>
<view layout="player blurr" x="30" y="120" width="360"
height="350"/>
<title visible="no"/>
</player>
-
+
<layout label="player screen">
<background>
<image image="background" x="0" y="0" label="background"/>
@@ -652,11 +652,11 @@
<image filename="frame.png" x="5" y="100" width="max-10"
height="390"/>
</background>
</layout>
-
+
<layout label="player blurr">
<content align="center" valign="center"/>
</layout>
-
+
<layout label="player info blurr">
<content>
<item type="default">
@@ -736,18 +736,18 @@
</item>
</content>
</layout>
-
+
<font label="player" name="Arial_Bold" size="18" color="0xffffff">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
<font label="player title" name="Arial_Bold" size="18"
color="0xffffff"/>
<font label="player artist" name="Arial_Bold" size="16"
color="0xffffff"/>
<font label="player info" name="Arial_Bold" size="14"
color="0xffffff"/>
-
- <!--
+
+ <!--
*******************************************************
- ** ENCODING
+ ** ENCODING
*******************************************************
The main layout is in the basic skin, basic calls
'text with encoding info style' as shown here:
@@ -764,28 +764,28 @@
</menuset>
- <!--
+ <!--
*******************************************************
** Splashscreen
******************************************************* -->
-
+
<splashscreen>
<screen layout="screen"/>
<content layout="splashscreen" x="0" y="0" width="800"
height="600"/>
</splashscreen>
-
+
<layout label="splashscreen">
<background>
<image filename="blurrsplash.jpg"/>
</background>
<content x="30" y="400" width="740" font="splashscreen font"
spacing="10"/>
</layout>
-
+
<font label="splashscreen font" name="Arial_Bold" size="20"
color="0xffffff"/>
-
-
-
- <!--
+
+
+
+ <!--
*******************************************************
** POPUP DEFINITIONS
******************************************************* -->
@@ -793,25 +793,25 @@
<layout label="popup">
<background>
<rectangle x="5" y="5" size="0" bgcolor="0xa0000000"
radius="5"/>
- <rectangle width="max-5" height="max-5" color="0x000000"
size="2"
+ <rectangle width="max-5" height="max-5" color="0x000000"
size="2"
bgcolor="0xffffff" radius="5"/>
- <rectangle x="5" y="5" width="max-15" height="max-15"
color="0x000000"
+ <rectangle x="5" y="5" width="max-15" height="max-15"
color="0x000000"
size="2" bgcolor="widget background" radius="5"/>
</background>
<content x="8" y="8" width="max-21" height="max-21">
<!-- special button settings -->
<item type="button">
- <rectangle color="0x000000" bgcolor="widget item
background"
+ <rectangle color="0x000000" bgcolor="widget item
background"
size="2" radius="6"/>
</item>
- <!-- special settings for selected buttons -->
+ <!-- special settings for selected buttons -->
<item type="button selected">
- <rectangle color="0x000000" bgcolor="widget selected
background"
+ <rectangle color="0x000000" bgcolor="widget selected
background"
size="2" radius="6"/>
</item>
</content>
</layout>
-
+
<font label="widget" name="Arial_Bold" size="14">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
@@ -819,13 +819,13 @@
<font label="selected widget" name="Arial_Bold" size="14">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
-
- <!--
+
+ <!--
*******************************************************
** FONT DEFINITIONS
******************************************************* -->
-
+
<font label="default" name="Arial_Bold" size="16" color="0xffffff">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
@@ -857,13 +857,13 @@
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
-
+
<!-- info area -->
<font label="info plot" name="Arial_Bold" size="13"
color="0xffffff"/>
<font label="info tagline" name="Arial_Bold" size="16"
color="0xffffff"/>
<font label="info label" name="Arial_Bold" size="14"
color="0xffffff"/>
<font label="info value" name="Arial_Bold" size="14"
color="0xffffff"/>
-
+
<font label="detachbar" name="Arial_Bold" size="10" color="default0"/>
<!-- for some reason shadow doesn't work with the detachbar
<font label="detachbar" name="Arial_Bold" size="12" color="0xffffff">
@@ -872,9 +872,9 @@
-->
<font label="clock" name="Arial_Bold" size="16" color="0xffffff"/>
-
+
<!-- Basic Fonts -->
-
+
<font label="small0" name="Arial_Bold" size="12" color="default0">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
@@ -884,7 +884,7 @@
<font label="small2" name="Arial_Bold" size="12" color="default2">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
-
+
<font label="medium0" name="Arial_Bold" size="16" color="default0">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
@@ -894,7 +894,7 @@
<font label="medium2" name="Arial_Bold" size="16" color="default2">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
-
+
<font label="large0" name="Arial_Bold" size="20" color="default0">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
@@ -904,7 +904,7 @@
<font label="large2" name="Arial_Bold" size="20" color="default2">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
-
+
<font label="huge0" name="Arial_Bold" size="28" color="default0">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
@@ -914,11 +914,11 @@
<font label="huge2" name="Arial_Bold" size="28" color="default2">
<shadow visible="yes" color="0x000000" border="yes"/>
</font>
-
+
<color label="default0" value="0xffffff"/>
<color label="default1" value="0xffffaa"/>
<color label="default2" value="0xcccccc"/>
-
+
</skin>
</freevo>
<!-- Keep this comment at the end of the file
Modified: branches/rel-1/freevo/src/plugins/buttonbar.py
==============================================================================
--- branches/rel-1/freevo/src/plugins/buttonbar.py (original)
+++ branches/rel-1/freevo/src/plugins/buttonbar.py Thu Jun 14 20:25:08 2007
@@ -232,9 +232,7 @@
for index in range(0, len(self.colors)):
if actions[index] is not None:
self.draw_button(osd, x, y, buttonwidth, BUTTON_BAR_HEIGHT,
self.colors[index], actions[index])
- self.actions[index] = actions[index]
- else:
- self.actions[index] = None
+ self.actions[index] = actions[index]
x += buttonwidth
@@ -324,42 +322,40 @@
action.name = Unicode(time.strftime('%s %s' % (dateformat,
timeformat),
time.localtime(newtime)))
return self.tvguide_actions
- else:
- # Determine the available actions
- if hasattr(menu, 'is_submenu') or (not hasattr(menu, 'selected')):
- return None
-
- actions = menu.selected.actions()
- if not actions:
- actions = []
-
- plugins = plugin.get('item') + plugin.get('item_%s' %
menu.selected.type)
-
- if hasattr(menu.selected, 'display_type'):
- plugins += plugin.get('item_%s' % menu.selected.display_type)
-
- plugins.sort(lambda l, o: cmp(l._level, o._level))
-
- for p in plugins:
- for a in p.actions(menu.selected):
- if isinstance(a, MenuItem):
- actions.append(a)
- elif len(a) == 2 or a[2] != 'MENU_SUBMENU':
- actions.append(a[:2])
-
- if len(actions) <= 1:
- result = None
-
- if len(actions) > 1:
- result[0] = actions[0]
- if len(actions) >= 2:
- result[1] = actions[1]
- if len(actions) >= 3:
- result[2] = actions[2]
- if len(actions) == 4:
- result[3] = actions[3]
-
- # Special case for when there are more than 4 possible actions the
last button will 'Enter' the submenu
- if len(actions) > 4:
- result[3] = MenuItem(_("More Options"),
action=send_event_to_menu, arg= event.MENU_SUBMENU)
+
+ # Make sure this is a menu and not a submenu.
+ if hasattr(menu, 'is_submenu') or (not hasattr(menu, 'selected')):
+ return result
+
+ # Determine the available actions
+ actions = menu.selected.actions()
+ if not actions:
+ actions = []
+
+ plugins = plugin.get('item') + plugin.get('item_%s' %
menu.selected.type)
+
+ if hasattr(menu.selected, 'display_type'):
+ plugins += plugin.get('item_%s' % menu.selected.display_type)
+
+ plugins.sort(lambda l, o: cmp(l._level, o._level))
+
+ for p in plugins:
+ for a in p.actions(menu.selected):
+ if isinstance(a, MenuItem):
+ actions.append(a)
+ elif len(a) == 2 or a[2] != 'MENU_SUBMENU':
+ actions.append(a[:2])
+
+ if len(actions) > 1:
+ result[0] = actions[1]
+ if len(actions) > 2:
+ result[1] = actions[2]
+ if len(actions) > 3:
+ result[2] = actions[3]
+ if len(actions) > 4:
+ result[3] = actions[4]
+
+ # Special case for when there are more than 5 possible actions the
last button will 'Enter' the submenu
+ if len(actions) > 5:
+ result[3] = MenuItem(_("More Options"), action=send_event_to_menu,
arg= event.MENU_SUBMENU)
return result
Modified: branches/rel-1/freevo/src/skins/main/area.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/area.py (original)
+++ branches/rel-1/freevo/src/skins/main/area.py Thu Jun 14 20:25:08 2007
@@ -267,6 +267,15 @@
elif c_rect[0] < c_rect[2]:
self.screen.update('content', c_rect)
+ if config.SKIN_DEBUG:
+ if self.layout:
+ name = self.area_name + u':' + self.layout.label
+
+ content = self.calc_geometry(self.layout.content,
copy_object=1)
+ self.tmp_objects.skin_area = (content.x, content.y,
+ content.width, content.height,
+ name)
+
# save and exit
self.objects = self.tmp_objects
self.screen.draw(self.objects)
Modified: branches/rel-1/freevo/src/skins/main/main.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/main.py (original)
+++ branches/rel-1/freevo/src/skins/main/main.py Thu Jun 14 20:25:08 2007
@@ -79,8 +79,9 @@
from view_area import View_Area
from info_area import Info_Area
from default_areas import Screen_Area, Title_Area, Subtitle_Area,
Plugin_Area
+ from scrollabletext_area import Scrollabletext_Area
- for a in ( 'screen', 'title', 'subtitle', 'view', 'listing', 'info',
'plugin'):
+ for a in ( 'screen', 'title', 'subtitle', 'view', 'listing', 'info',
'plugin', 'scrollabletext'):
self.areas[a] = eval('%s_Area()' % a.capitalize())
self.areas['tvlisting'] = TVListing_Area()
Modified: branches/rel-1/freevo/src/skins/main/screen.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/screen.py (original)
+++ branches/rel-1/freevo/src/skins/main/screen.py Thu Jun 14 20:25:08 2007
@@ -50,6 +50,7 @@
self.rectangles = []
self.images = []
self.text = []
+ self.skin_area = None
class Screen:
@@ -83,6 +84,11 @@
self.drawlist.images += obj.images
self.drawlist.text += obj.text
+ if obj.skin_area:
+ if self.drawlist.skin_area is None:
+ self.drawlist.skin_area = []
+ self.drawlist.skin_area.append(obj.skin_area)
+
def update(self, layer, rect):
if layer == 'content':
@@ -191,6 +197,13 @@
align_v = align_v, mode=mode,
ellipses=ellipses, dim=dim,
layer=layer)
+ if self.drawlist.skin_area:
+ for area in self.drawlist.skin_area:
+ x,y,w,h,name = area
+ osd.drawbox(x,y,x + w, y +h, 1, osd.COL_WHITE, 0, layer)
+ osd.drawstring(name, x + 1, y + 1, fgcolor=osd.COL_WHITE,
bgcolor=osd.COL_BLUE, layer=layer)
+ update_area.append((x,y,x+w,y+h))
+
if not update_area:
return None
Modified: branches/rel-1/freevo/src/skins/main/xml_skin.py
==============================================================================
--- branches/rel-1/freevo/src/skins/main/xml_skin.py (original)
+++ branches/rel-1/freevo/src/skins/main/xml_skin.py Thu Jun 14 20:25:08 2007
@@ -417,7 +417,7 @@
def __init__(self, name):
XML_data.__init__(self, ('visible', 'layout', 'x', 'y', 'width',
'height'))
self.name = name
- if name == 'listing':
+ if name in ('listing', 'scrollabletext'):
self.images = {}
self.x = -1
self.y = -1
@@ -441,7 +441,7 @@
except TypeError:
pass
for subnode in node.children:
- if subnode.name == u'image' and self.name == 'listing':
+ if subnode.name == u'image' and self.name in ('listing',
'scrollabletext'):
label = attr_str(subnode, 'label', '')
if label:
if not label in self.images:
@@ -1016,6 +1016,11 @@
if isinstance(self.sets[s], AreaSet):
# prepare an areaset
self.sets[s].prepare(layout)
+ for area in self.sets[s].areas.values():
+ if hasattr(area, 'images'):
+ for image in area.images.values():
+ image.prepare(None, search_dirs, self._images)
+
else:
# prepare a menu
self.sets[s].prepare(self._menuset, layout)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog