summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-09-17 10:08:50 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-09-17 10:08:50 +0000
commitcf1cef5f573ca6961041c9ab53649ac52f6b1e93 (patch)
treef4be937b805d829c354e0ad723b4cf3b7089f29b /apps/tree.c
parent344f45165f4b1f76b95883895be3634225a10cbb (diff)
downloadrockbox-cf1cef5f573ca6961041c9ab53649ac52f6b1e93.zip
rockbox-cf1cef5f573ca6961041c9ab53649ac52f6b1e93.tar.gz
rockbox-cf1cef5f573ca6961041c9ab53649ac52f6b1e93.tar.bz2
rockbox-cf1cef5f573ca6961041c9ab53649ac52f6b1e93.tar.xz
minor update to gui_synclist_do_button() which will hopefully simplify things later.
Now returns true if the action was handled in that function instead of returning the handled action. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14733 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 5122f55..fb2ed8d 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -552,7 +552,7 @@ static int dirbrowse()
int numentries=0;
char buf[MAX_PATH];
int lasti = -1;
- unsigned button, returned_button;
+ unsigned button, oldbutton;
bool reload_root = false;
int lastfilter = *tc.dirfilter;
bool lastsortcase = global_settings.sort_case;
@@ -605,12 +605,8 @@ static int dirbrowse()
}
#endif
button = get_action(CONTEXT_TREE,HZ/5);
- returned_button = gui_synclist_do_button(&tree_lists, button,LIST_WRAP_UNLESS_HELD);
- if (returned_button)
- need_update = true;
- if (returned_button == ACTION_STD_CANCEL)
- button = ACTION_STD_CANCEL;
-
+ oldbutton = button;
+ need_update = gui_synclist_do_button(&tree_lists, &button,LIST_WRAP_UNLESS_HELD);
tc.selected_item = gui_synclist_get_sel_pos(&tree_lists);
switch ( button ) {
case ACTION_STD_OK:
@@ -640,9 +636,11 @@ static int dirbrowse()
if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) ||
((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/"))))
{
- if (returned_button == ACTION_STD_CANCEL)
+#ifdef HAVE_LCD_BITMAP /* charcell doesnt have ACTION_TREE_PGLEFT so this isnt needed */
+ if (oldbutton == ACTION_TREE_PGLEFT)
break;
else
+#endif
return GO_TO_ROOT;
}