mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Fix the database browser not remembering its selected item
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12705 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a990ff2920
commit
fd30be5545
2 changed files with 4 additions and 2 deletions
|
@ -84,7 +84,7 @@ static int browser(void* param)
|
||||||
static char last_folder[MAX_PATH] = "/";
|
static char last_folder[MAX_PATH] = "/";
|
||||||
/* and stuff for the database browser */
|
/* and stuff for the database browser */
|
||||||
#ifdef HAVE_TAGCACHE
|
#ifdef HAVE_TAGCACHE
|
||||||
static int last_db_dirlevel = 0;
|
static int last_db_dirlevel = 0, last_db_selection = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch ((intptr_t)param)
|
switch ((intptr_t)param)
|
||||||
|
@ -166,6 +166,7 @@ static int browser(void* param)
|
||||||
return GO_TO_PREVIOUS;
|
return GO_TO_PREVIOUS;
|
||||||
filter = SHOW_ID3DB;
|
filter = SHOW_ID3DB;
|
||||||
tc->dirlevel = last_db_dirlevel;
|
tc->dirlevel = last_db_dirlevel;
|
||||||
|
tc->selected_item = last_db_selection;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case GO_TO_BROWSEPLUGINS:
|
case GO_TO_BROWSEPLUGINS:
|
||||||
|
@ -182,6 +183,7 @@ static int browser(void* param)
|
||||||
#ifdef HAVE_TAGCACHE
|
#ifdef HAVE_TAGCACHE
|
||||||
case GO_TO_DBBROWSER:
|
case GO_TO_DBBROWSER:
|
||||||
last_db_dirlevel = tc->dirlevel;
|
last_db_dirlevel = tc->dirlevel;
|
||||||
|
last_db_selection = tc->selected_item;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -632,6 +632,7 @@ int dirbrowse()
|
||||||
if (returned_button == ACTION_STD_CANCEL)
|
if (returned_button == ACTION_STD_CANCEL)
|
||||||
button = ACTION_STD_CANCEL;
|
button = ACTION_STD_CANCEL;
|
||||||
|
|
||||||
|
tc.selected_item = gui_synclist_get_sel_pos(&tree_lists);
|
||||||
switch ( button ) {
|
switch ( button ) {
|
||||||
case ACTION_STD_OK:
|
case ACTION_STD_OK:
|
||||||
/* nothing to do if no files to display */
|
/* nothing to do if no files to display */
|
||||||
|
@ -933,7 +934,6 @@ int dirbrowse()
|
||||||
}
|
}
|
||||||
|
|
||||||
if(need_update) {
|
if(need_update) {
|
||||||
tc.selected_item = gui_synclist_get_sel_pos(&tree_lists);
|
|
||||||
need_update=false;
|
need_update=false;
|
||||||
if ( numentries > 0 ) {
|
if ( numentries > 0 ) {
|
||||||
/* Voice the file if changed */
|
/* Voice the file if changed */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue