"Chris Griffiths" wrote:
> I had a feeling it wasn't going to be easy ...

It was easier than I thought.

> Your idea sounds good, although I dont know enough about the current
> setup to offer anything constructive.
>
> The main thing I guess is that there is no way to add a new "weather"
> section without serious rework - it may get too complicated to have it
> happen automagically as you've described, but even if the ammount of
> changes to the core code could be minimized it would be a start.

I just checked in some changes. There is no plugin fxd support in the
skin yet, you have to add your tags in the skin file right now. I
added areas for <splashscreen> and <headlines> in blue.fxd, I guess
you want something like:

<weather>
  <screen .../>
  <content .../>
</weather>

Screen is the area for the background. You may want to re-use existing
layouts. "screen0" is the background + logo (if you have no idlebar),
"blank screen" only the background. You may want to create your own
background, maybe like the Splashscreen: the background image + a
weather watermark. 

The name <content> is your choice. You don't need to name it content,
choose what you like. For that, you need to inherit from skin.Area
(look at Splashscreen in main.py). Make sure the name of the area
matches your tag name (Splashscreen chooses content).

class WeatherContent(skin.Area):
  def __init__(self, ...):
     skin.Area.__init__(self, 'content')

  def update_content(self):
     ....
     use self.layout to get the content informations
     (x,y,height,width). Again, take a look at Splashscreen


And the plugin needs to register this new setup:

skin.register('weather', ('screen', WeatherContent(), 'plugin'))

If you don't want plugins to draw on your skin (like the idlebar),
remove the 'plugin' in the list. 

To draw just call skin.draw(('weather', object)) and object is passed
to WeatherContent as self.infoitem. 


Notice:
o the Blankscreen is gone now, it was only a bad hack, so you need to
  use the new stuff now
o skin.draw(('weather', object)) will change to 
  skin.draw('weather', object) in the future. I don't know why there
  are two braces. 
o I don't think you can use the 'listing' area right now. But I guess
  you don't need it anyway



Let me know if it works and if you need something else.


Dischi

-- 
Having trouble in Windows? Reboot!
Having trouble in Linux? Be root!


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to