This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12277 - WPS tags for the list item number and the "divisible" operator
Attached to Project:
Rockbox
Opened by Alexander Levin (fml2) - Tuesday, 13 September 2011, 23:29 GMT+2
Opened by Alexander Levin (fml2) - Tuesday, 13 September 2011, 23:29 GMT+2
|
DetailsThe patch adds two new WPS tags:
1. %Ln yields the number of the list item currently being drawn 2. The operator "/?" (which can be used in the %if tag) yields the string "div" if the first operant is divisible by the second and NULL otherwise. With these two additions it should be possible to create themes where list items are coloured alternately (as an example). The whole work has been done by gevaerts on 2011-09-12 (and all the credits also go to him), I only placed the patch to the patch tracker, changed the operator from "/" to "/?", and changed the function name from "skinlist_get_item" to "skinlist_get_item_number". He posted the patch on the binpaste and it would be pity if it got lost. |
This task depends upon
This is something I want to do anyway becaus eI'd like to be able to put inline settings functionality into themes which probably needs something like this already.
If you want to have a go at this suggestion look at FS#8968, specifically the changes to add movement_size to the list struct. Then simply add another number param to the Lb() tag and you're set.
That leaves the divisibility patch to be discussed.