From 08af5d84044a7f18a619e1cb38cd183819be41b9 Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Tue, 14 Dec 2010 13:37:58 +0000 Subject: FS#11777: enhancement for 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. * Add select only mode to rockbox_browse(). when a file is selected, it's path is stored to buffer and the browser exits without 'playing' the file. this will allow to use the browser in more places to select file including plugins. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28831 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/rockpaint.c | 2 ++ apps/plugins/text_viewer/tv_menu.c | 1 + 2 files changed, 3 insertions(+) (limited to 'apps/plugins') diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c index 4ef139a526..fc4621a805 100644 --- a/apps/plugins/rockpaint.c +++ b/apps/plugins/rockpaint.c @@ -731,6 +731,7 @@ static bool browse( char *dst, int dst_size, const char *start ) } rb->strcpy( a+1, dc[tree->selected_item].name ); tree->dirfilter = &dirfilter; + tree->browse = NULL; while( 1 ) { if( reload ) @@ -880,6 +881,7 @@ static bool browse_fonts( char *dst, int dst_size ) } rb->strcpy( a+1, dc[tree->selected_item].name ); tree->dirfilter = &dirfilter; + tree->browse = NULL; rb->strcpy( bbuf, FONT_DIR "/" ); rb->set_current_file( bbuf ); diff --git a/apps/plugins/text_viewer/tv_menu.c b/apps/plugins/text_viewer/tv_menu.c index 1d1e07f3e8..5e79fd469a 100644 --- a/apps/plugins/text_viewer/tv_menu.c +++ b/apps/plugins/text_viewer/tv_menu.c @@ -234,6 +234,7 @@ static bool tv_font_setting(void) rb->strlcat(backup.currdir, "/", MAX_PATH); rb->strlcat(backup.currdir, dc[tree->selected_item].name, MAX_PATH); tree->dirfilter = &dirfilter; + tree->browse = NULL; rb->snprintf(font_path, MAX_PATH, "%s/", FONT_DIR); rb->set_current_file(font_path); count = tree->filesindir; -- cgit v1.2.3