Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9845 - Status bar is not drawn in the WPS

Attached to Project: Rockbox
Opened by Alexander Levin (fml2) - Wednesday, 28 January 2009, 22:16 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Sunday, 01 February 2009, 12:40 GMT+2
Task Type Bugs
Category Themes
Status Closed
Assigned To No-one
Player Type Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Sansa e280 with FM tuner, r19871

My settings are:
- status bar: no
- the WPS used is very simple, it does contain the %we tag to switch the status bar on

But the status bar is not shown in the WPS

Here is the WPS I use:
%we

%ac%s%?ia<%ia|%d2>
%ac%s%?it<%it|%fn>

%al%pc%ac%pp/%pe%ar-%pr
%pb

%ac%s%?It<%It|%Fn>
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Sunday, 01 February 2009, 12:40 GMT+2
Reason for closing:  Fixed
Additional comments about closing:  fixed in r19894.
Comment by Jonathan Gordon (jdgordon) - Thursday, 29 January 2009, 01:31 GMT+2
the statusbar has never been displayed in the WPS if the setting was set to no...
Comment by Alexander Levin (fml2) - Thursday, 29 January 2009, 20:21 GMT+2
Are you sure? I can't remember. But I admit that the tag description is a little bit unspecific. It says "enable" and "disable". I'd interpret this as "switch on" or "switch off". I.e. with "%we" I can be sure that the status bar is displayed -- regardless of the setting. And the same for %wd: with it, I can be sure that the status bar is not displayed even if it's set to ON in the settings.
Comment by Jonas Häggqvist (rasher) - Thursday, 29 January 2009, 20:28 GMT+2
I'm pretty sure the %we / %wd tag behaves (or should behave) as Alexander says, an override to the global setting - that's the entire reason they exist. This is definitely a bug.
Comment by Jonathan Gordon (jdgordon) - Friday, 30 January 2009, 01:26 GMT+2
I'll check the svn log later, but no, the statusbar checks global_settings before drawing (and im sure it has always done this)
Comment by Jonas Häggqvist (rasher) - Friday, 30 January 2009, 02:08 GMT+2
If it does that, what would the reason for the %we and %wd tag be? I remember when they were added, and the entire point was to allow the WPS to override the global setting.

See  FS#2677  - this behaviour has quite simply been broken, and that's a bug.
Comment by Jonathan Gordon (jdgordon) - Friday, 30 January 2009, 02:17 GMT+2
arg, I'm confused... the reason I thought this is because there is a hack in the radio code to temporarily enable the statusbar so it can draw.. but just checked and the wps bypasses the global_settings.statusbar check... this is indeed a bug.. one I'm not entirely sure how to fix. :(
Comment by Thomas Martitz (kugel.) - Saturday, 31 January 2009, 19:38 GMT+2
AFAIK %we and %wd are both to overrde global settings (so I'm with rasher and fml2).
To use settings, one should just omit both %we and %wd.
Comment by Alexander Levin (fml2) - Sunday, 01 February 2009, 00:44 GMT+2
I think the problem is in viewport.c:95. The status bar is only displayed if the global setting is set to YES. IMO we should make the function "viewportmanager_set_statusbar" only respect the passed parameter and not add its own "intelligence" by adding this condition. The callers of the function have more specific contexts and hence should be responsible for passing an appropriate value. The WPS code does it (gwps-common.c:85-86), but the code in viewport.c makes it wrong again. The radio screen could always use "true." And the menu code would use the value from the global settings.

I don't know the code and status bar concepts very well but I think I'm on the right path.
Comment by Jonathan Gordon (jdgordon) - Sunday, 01 February 2009, 00:47 GMT+2
yes, I've got a patch ready which fixes this but makes viewportmanager_set_statusbar more complicated... it will get commited today after a bit of commenting and cleaning up

Loading...