Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11925 - Add a proper "current screen" system

Attached to Project: Rockbox
Opened by Jonathan Gordon (jdgordon) - Friday, 11 February 2011, 01:10 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 01 June 2011, 16:42 GMT+2
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Release 3.7.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch makes adds a very simple system so themers can know exactly which screen it is in (to mangle the sbs as required).

This first patch is untested and only adds the browsers and quickscreen. others can be added if this is wanted/works.

All that is needed to do to add a new screen is add the screen to the enum at the bottom of misc.h, then when entering the screen call push_current_screen() and when exiting call pop_current_screen().
   current_screen.patch (4.6 KiB)
 apps/misc.h                        |   18 ++++++++++++++++++
 apps/gui/skin_engine/skin_tokens.c |   32 +-------------------------------
 apps/gui/quickscreen.c             |    4 ++++
 apps/root_menu.c                   |   10 +++++-----
 apps/root_menu.h                   |    2 --
 apps/misc.c                        |   16 ++++++++++++++++
 6 files changed, 44 insertions(+), 38 deletions(-)

This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Wednesday, 01 June 2011, 16:42 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  r29944
Comment by Michael Sevakis (MikeS) - Friday, 11 February 2011, 03:45 GMT+2
Add tester .sbs and this one compiles :)
   test.sbs (0.1 KiB)
   current-screen-compiles.patch (5.2 KiB)
 apps/misc.h                        |   18 ++++++++++++++++++
 apps/gui/skin_engine/skin_render.c |    2 +-
 apps/gui/skin_engine/skin_tokens.c |   32 +-------------------------------
 apps/gui/quickscreen.c             |    4 ++++
 apps/root_menu.c                   |   10 +++++-----
 apps/root_menu.h                   |    2 --
 apps/misc.c                        |   16 ++++++++++++++++
 7 files changed, 45 insertions(+), 39 deletions(-)

Comment by Jonathan Gordon (jdgordon) - Tuesday, 31 May 2011, 15:52 GMT+2
update to add a bunch more screens... want to commit soon... need a better enum prefix than SCREEN_
   changes.patch (7.7 KiB)
 b/apps/gui/option_select.c           |    2 ++
 b/apps/gui/quickscreen.c             |    4 ++++
 b/apps/gui/skin_engine/skin_render.c |    2 +-
 b/apps/gui/skin_engine/skin_tokens.c |   32 +-------------------------------
 b/apps/misc.c                        |   16 ++++++++++++++++
 b/apps/misc.h                        |   19 +++++++++++++++++++
 b/apps/radio/radio.c                 |    2 ++
 b/apps/recorder/recording.c          |    3 ++-
 b/apps/root_menu.c                   |   12 +++++++-----
 b/apps/root_menu.h                   |    2 --
 10 files changed, 54 insertions(+), 40 deletions(-)

Comment by Jonathan Gordon (jdgordon) - Wednesday, 01 June 2011, 06:53 GMT+2
fix the ordering so %cs tag doesnt change the order
   changes.patch (7.7 KiB)
 b/apps/gui/option_select.c           |    2 ++
 b/apps/gui/quickscreen.c             |    4 ++++
 b/apps/gui/skin_engine/skin_render.c |    2 +-
 b/apps/gui/skin_engine/skin_tokens.c |   32 +-------------------------------
 b/apps/misc.c                        |   16 ++++++++++++++++
 b/apps/misc.h                        |   19 +++++++++++++++++++
 b/apps/radio/radio.c                 |    2 ++
 b/apps/recorder/recording.c          |    3 ++-
 b/apps/root_menu.c                   |   12 +++++++-----
 b/apps/root_menu.h                   |    2 --
 10 files changed, 54 insertions(+), 40 deletions(-)

Loading...