Support and General Use > Theming and Appearance Customization
gwps-common.c skip_conditional() strangeness
Lear:
--- Quote from: Massa on September 13, 2006, 04:57:11 PM ---I remember that I also found some weird behaviour in skip_conditionals when I had a look at it:
As far as I remember
- it does not take care of "%|" and does also count it as conditional separator (I'm not sure about that - it's been a while since I had a look at)
--- End quote ---
I'm pretty sure "%|" isn't counted...
--- Quote --- - it's not able to handle tags with parameters inside conditionals (they also use the '|' as separator).
--- End quote ---
True, but that is a problem with the tags that take parameters. "|" is a poor choice for a separator there.
--- Quote ---The second one is currently not relevant because there are no tags which are allowed inside conditionals which have parameters, but that may change in future (e.g. a tag for user ID3 tags).
--- End quote ---
So they'll need to use a different separator, or maybe support "%|" as a separator too.
CapnBry:
--- Quote from: Lear on September 14, 2006, 11:36:01 AM ---The above code may look a bit odd, but is in fact correct. Note that battery_level() returns a number between 0 and 100 (inclusive). In this case, enum is 5, so the highest value you can get from the "first" part is 4 * 100 / 100, which is 4. The lowest value is 0. 0, 1, 2, 3, 4 - that's five values, which is what you want.
--- End quote ---
Well it didn't seem right to me that if you give it 5 icons, there's one icon which is only used when the battery is at 100, and 4 for the remaining 100 levels. I was thinking that if I gave it 5 icons, it would quantize that down to 20% for each icon. The more I think about it now, the more I realize it doesn't make a lick of difference. If I want 20% per icon, I can just give it 5 + 1 + 1, one for unknown, and one for 100%.
Lear:
By the way, my change didn't add the "only show the highest value at 100%" behaviour. It has been like that since enum support for the battery level was added, about a year ago.
Navigation
[0] Message Index
[*] Previous page
Go to full version