Rockbox

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

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11777 - enhancement for rockbox_browse()

Attached to Project: Rockbox
Opened by Teruaki Kawashima (teru) - Saturday, 27 November 2010, 13:23 GMT+2
Last edited by Teruaki Kawashima (teru) - Wednesday, 15 December 2010, 14:03 GMT+2
Task Type Patches
Category User Interface
Status Closed
Assigned To No-one
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This patch makes it easier to use rockbox_browse().
- add struct browse_context to be passed to rockbox_browse.
- show proper title when selecting e.g. .wps file or .sbs file from the settings menu.
- use rockbox_browse() to view playlist catalog (see also  FS#11678 ).

*Known issue
browser is messed up if rockbox_browse() is called recursively.
to reproduce:
highlight audio file or playlist in browser -> context menu -> Playlist Catalog -> View Catalog -> context menu -> Playlist Catalog -> Add to Playlist -> go back to browser.

future idea maight be to make rockbox_browse() available for generic purpose to select file.
e.g. use it to select file to save configure or playlist, to select .bmp file in rockpaint.
   browse.patch (25 KiB)
 apps/radio/presets.c    |    8 +
 apps/tree.c             |  138 ++++++++++-------------------
 apps/tree.h             |   23 ++++
 apps/settings.h         |    2 
 apps/menus/theme_menu.c |   81 ++++++++++++++++-
 apps/filetree.c         |    3 
 apps/root_menu.c        |   28 +++--
 apps/playlist_catalog.c |  226 ++++--------------------------------------------
 8 files changed, 200 insertions(+), 309 deletions(-)

This task depends upon

Closed by  Teruaki Kawashima (teru)
Wednesday, 15 December 2010, 14:03 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  committed in 28831 & 28836
Comment by Teruaki Kawashima (teru) - Sunday, 28 November 2010, 13:25 GMT+2
* separate playlist catalog stuff.
* add struct browse_context to struct tree_context so that it doesn't need to be passed through and possibly it can be used in other place (e.g. ft_load).
   browse.patch (14.4 KiB)
 apps/radio/presets.c    |    8 ++-
 apps/tree.c             |  126 +++++++++++++++++-------------------------------
 apps/tree.h             |   24 ++++++++-
 apps/menus/theme_menu.c |   81 +++++++++++++++++++++++++++++-
 apps/root_menu.c        |   28 ++++++----
 5 files changed, 171 insertions(+), 96 deletions(-)

   browse-playlist_catalog.patch (9.1 KiB)
 apps/settings.h         |    2 
 apps/filetree.c         |    3 
 apps/playlist_catalog.c |  226 ++++--------------------------------------------
 3 files changed, 26 insertions(+), 205 deletions(-)

Comment by Teruaki Kawashima (teru) - Tuesday, 07 December 2010, 13:41 GMT+2
update patch.
* increase number of backups in rockbox_browse so that it can be called recursively bit more.
fixed issue described in the original post.
I set to 3 because currently max nest is 3.
* add callback_show_item member to customize what item will be shown in browser.
* removed BROWSE_ONEDIR as it doesn't seem to work well.
   browse.patch (17.1 KiB)
 apps/radio/presets.c               |    8 +-
 apps/tree.c                        |  148 +++++++++++++++----------------------
 apps/plugins/rockpaint.c           |    2 
 apps/plugins/text_viewer/tv_menu.c |    1 
 apps/tree.h                        |   28 ++++++-
 apps/menus/theme_menu.c            |   78 +++++++++++++++++++
 apps/filetree.c                    |    7 +
 apps/root_menu.c                   |   21 +++--
 8 files changed, 196 insertions(+), 97 deletions(-)

   browse-plcat.patch (9 KiB)
 apps/settings.h         |    2 
 apps/playlist_catalog.c |  225 ++++--------------------------------------------
 apps/filetree.c         |    1 
 3 files changed, 24 insertions(+), 204 deletions(-)

Comment by Teruaki Kawashima (teru) - Tuesday, 14 December 2010, 14:47 GMT+2
I commited browse.patch.

I'll commit browse-plcat.patch tomorrow.
Comment by Jonathan Gordon (jdgordon) - Tuesday, 14 December 2010, 21:53 GMT+2
please dont commit browse-plcat.patch, I'm doing the same thing in  FS#11808  and it will already have merge conflicts
Comment by Teruaki Kawashima (teru) - Wednesday, 15 December 2010, 05:07 GMT+2
imo, chaging playlist catalog to use rockbox_browse() should be a separate commit.
Comment by Teruaki Kawashima (teru) - Wednesday, 15 December 2010, 06:56 GMT+2
make playlist_catalog.c similar in the one in  FS#11808 , so there will be less conflicts.
   browse-plcat.2.patch (10.3 KiB)
 apps/tree.c             |    4 
 apps/tree.h             |    1 
 apps/settings.h         |    2 
 apps/filetree.c         |    1 
 apps/playlist_catalog.c |  222 +++++++-----------------------------------------
 5 files changed, 37 insertions(+), 193 deletions(-)

Loading...