Support and General Use > Theming and Appearance Customization

ready to commit conditional viewports... breaks %P and %pb in current .wps'

(1/7) > >>

JdGordon:
Hey all,
So, I've got a few patches almost ready to go which affect pretty much every .wps around so I'm putting this warning up to give everyone plenty of time to fix their wps'. The two patches which need your attention is http://www.rockbox.org/tracker/task/9051 and http://www.rockbox.org/tracker/task/9027.
9051 removes the ability to set the lcd x/y margins (i.e %m).
9027 allows you to conditionally display viewports. You should be able to do anything you could with %m with this patch. The big issue with this patch is that it breaks the progressbar tags. %P needs to be removed, so to specify a filename for the progress bar bmp you need to add it to the end of the %pb tag, which means you have to specify all 4 number values also.

I have no intention of committing either of these before they are definitely bug free, and without sending out another warning email, but I'm sending this out now so no one complains that they didn't hear about this change coming.

So, summary of changes:
New tags:
%Vl|<tag>|<regular %V syntax>| - tag is a single a-zA-Z letter (like images...) this tag is used to say that a viewport is conditionally displayed
%Vd|<tag>| - display a viewport (otherwise not shown on the redraw). CAVEAT: you need to enable the viewport before its definition or it wont be drawn...
Removed tags:
%m
%P
Modified tags:
%pb|filename|x|y|width|height|

This is mostly waiting for 9051 to have its bugs removed which I don't think will take too long, but 9027 needs more testing...
I'd like to say these will both go in by the end of June (maybe even devcon weekend..)

So, please test the patches and let me know of bugs (preferably replying to the tracker task)

Thanks

karashata:
Thanks for the heads-up.  I'll keep an eye out for when all my themes go kaput and make sure I update them accordingly.

Just out of curiosity, is there a way to make the viewports use the foreground and background colours defined in the display settings rather than values specifically written in the WPS code?  If not, would there be a way to add that?  I made a theme set recently that could take advantage of something like that to let the user set his or her own colour scheme rather than predetermined colour schemes.

JdGordon:
<copy from the mailing lists again>

hey all,
Unless any news bugs popup in FS#9027 I plan on commiting it in 2 weekends time (sometime after june 20th...) This gives everyone plenty of time to fix their WPS's because this patch will break 99% of existing ones
changes:
%P is removed.
%pb is changed to be more consistant with the other tags (explianed below)
%Vl and %Vd introduced.

%pb can either be used without an params (i.e just "%pb") which will put a non bmp horizontal bar at the line position in the current viewport, or it is used like %pb|filename|x|y|width|height| where filename is the name of the bitmap to use (or - for the old style one), x,y are the offsets from the current viewport to position the bar at, width,heioght are the width and height of the bar. (those last 4 can be set with - to use defaults which are explained in the tracker)

%Vl is the same as %V except it requires a single letter as an extra param at the start (e.g %Vl|a|<usual %V params>|) it is used to create a viewport which by default is hidden.
%Vd is used to display a viewport... (%Vda enables the viewports with the letter 'a' as their identifier)

currently there is still a limit of 15 user viewports (+ the default vp) but this number may need to be increased...

One thing to note... if you use the %V (or %Vl) tags at all in a .wps, the default viewport will be parsed and conditionals checked, but it will not draw anything in that viewport (This is a work around for a problem where conditionals clear the line they are on, and because it is in the default viewport it may not be being updated by another one... so you may end up with random blank lines where you dont expect them). IMHO this is not a problem, but if there is really strong feelings against this we can work on a proper solution (if there is one).

Now, I also have FS#9051 ready for commit which removes the %m tag (its not needed ones conditional viewports is enabled), and seen as 9027 breaks 99% of existing WPS' I think its better to commit these together so there is only 1 break to compatibility.... There are others though which think there should be a gap between enabling conditional viewports and removeing %m... I guess its up to whoever yells loudest....

So, please thourghly test these 2 patches and work on your WPS' to make sure they can be converted reasonably easily... and let me know if there are any problems.

I'll be away from the computer untill tuesday night...

Jonathan

Zardoz:
what does/will your new commit improve?? I'm sorry for asking but what are viewports? I'm a bit dumb so have patience....

karashata:
Viewports are what allow a person making a WPS to define a certain section of a screen for displaying text or images.  It allows for much more freedom with positioning things on the screen rather than being limited by the height of the text like it used to be.  Conditional viewports will allow different viewports to be defined and used given certain conditions, say for whether or not album art is present to be displayed.  The upcoming commit will also change how progress bars are managed to allow for a little more freedom (to allow multiple different progress bars rather than being limited to one) and to be more consistent with the rest of the code.

At least, that's what I take out of this.  If I'm missing anything important, I'm sure someone else will point it out.

Navigation

[0] Message Index

[#] Next page

Go to full version