summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 8635f98011..9b6ce06af0 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -71,7 +71,6 @@
71/* gui api */ 71/* gui api */
72#include "list.h" 72#include "list.h"
73#include "splash.h" 73#include "splash.h"
74#include "buttonbar.h"
75#include "quickscreen.h" 74#include "quickscreen.h"
76#include "appevents.h" 75#include "appevents.h"
77 76
@@ -84,9 +83,6 @@ struct gui_synclist tree_lists;
84 83
85/* I put it here because other files doesn't use it yet, 84/* I put it here because other files doesn't use it yet,
86 * but should be elsewhere since it will be used mostly everywhere */ 85 * but should be elsewhere since it will be used mostly everywhere */
87#ifdef HAVE_BUTTONBAR
88static struct gui_buttonbar tree_buttonbar;
89#endif
90static struct tree_context tc; 86static struct tree_context tc;
91 87
92char lastfile[MAX_PATH]; 88char lastfile[MAX_PATH];
@@ -307,11 +303,6 @@ void tree_gui_init(void)
307 FOR_NB_SCREENS(i) 303 FOR_NB_SCREENS(i)
308 screens[i].double_height(false); 304 screens[i].double_height(false);
309#endif 305#endif
310#ifdef HAVE_BUTTONBAR
311 gui_buttonbar_init(&tree_buttonbar);
312 /* since archos only have one screen, no need to create more than that */
313 gui_buttonbar_set_display(&tree_buttonbar, &(screens[SCREEN_MAIN]) );
314#endif
315 gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1, NULL); 306 gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1, NULL);
316 gui_synclist_set_voice_callback(&tree_lists, tree_voice_cb); 307 gui_synclist_set_voice_callback(&tree_lists, tree_voice_cb);
317 gui_synclist_set_icon_callback(&tree_lists, 308 gui_synclist_set_icon_callback(&tree_lists,
@@ -464,7 +455,7 @@ static int update_dir(void)
464 } 455 }
465#endif 456#endif
466 } 457 }
467 458
468 gui_synclist_set_nb_items(&tree_lists, tc.filesindir); 459 gui_synclist_set_nb_items(&tree_lists, tc.filesindir);
469 gui_synclist_set_icon_callback(&tree_lists, 460 gui_synclist_set_icon_callback(&tree_lists,
470 global_settings.show_icons?tree_get_fileicon:NULL); 461 global_settings.show_icons?tree_get_fileicon:NULL);
@@ -472,17 +463,6 @@ static int update_dir(void)
472 tc.selected_item=tc.filesindir-1; 463 tc.selected_item=tc.filesindir-1;
473 464
474 gui_synclist_select_item(&tree_lists, tc.selected_item); 465 gui_synclist_select_item(&tree_lists, tc.selected_item);
475#ifdef HAVE_BUTTONBAR
476 if (global_settings.buttonbar) {
477 if (*tc.dirfilter < NUM_FILTER_MODES)
478 gui_buttonbar_set(&tree_buttonbar, str(LANG_SYSFONT_DIRBROWSE_F1),
479 str(LANG_SYSFONT_DIRBROWSE_F2),
480 str(LANG_SYSFONT_DIRBROWSE_F3));
481 else
482 gui_buttonbar_set(&tree_buttonbar, "<<<", "", "");
483 gui_buttonbar_draw(&tree_buttonbar);
484 }
485#endif
486 gui_synclist_draw(&tree_lists); 466 gui_synclist_draw(&tree_lists);
487 gui_synclist_speak_item(&tree_lists); 467 gui_synclist_speak_item(&tree_lists);
488 return tc.filesindir; 468 return tc.filesindir;