summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c41
1 files changed, 6 insertions, 35 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 39980b1b81..284fdcbdc7 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -61,6 +61,7 @@
61#include "recorder/recording.h" 61#include "recorder/recording.h"
62#include "rtc.h" 62#include "rtc.h"
63#include "dircache.h" 63#include "dircache.h"
64#include "yesno.h"
64 65
65/* gui api */ 66/* gui api */
66#include "list.h" 67#include "list.h"
@@ -561,47 +562,17 @@ static bool dirbrowse(void)
561 while(1) { 562 while(1) {
562 struct entry *dircache = tc.dircache; 563 struct entry *dircache = tc.dircache;
563 bool restore = false; 564 bool restore = false;
564
565 button = button_get_w_tmo(HZ/5);
566#ifdef BOOTFILE 565#ifdef BOOTFILE
567 if (boot_changed) { 566 if (boot_changed) {
568 bool stop = false; 567 char *lines[]={str(LANG_BOOT_CHANGED), str(LANG_REBOOT_NOW)};
569 unsigned int button; 568 struct text_message message={lines, 2};
570 int i; 569 if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES)
571 FOR_NB_SCREENS(i) 570 rolo_load("/" BOOTFILE);
572 {
573 gui_textarea_clear(&screens[i]);
574 screens[i].puts(0,0,str(LANG_BOOT_CHANGED));
575 screens[i].puts(0,1,str(LANG_REBOOT_NOW));
576#ifdef HAVE_LCD_BITMAP
577 screens[i].puts(0,3,str(LANG_CONFIRM_WITH_PLAY_RECORDER));
578 screens[i].puts(0,4,str(LANG_CANCEL_WITH_ANY_RECORDER));
579 gui_textarea_update(&screens[i]);
580#endif
581 }
582 while (!stop) {
583 button = button_get(true);
584 switch (button) {
585 case TREE_RUN:
586#ifdef TREE_RC_RUN
587 case TREE_RC_RUN:
588#endif
589 rolo_load("/" BOOTFILE);
590 stop = true;
591 break;
592
593 default:
594 if(default_event_handler(button) ||
595 (button & BUTTON_REL))
596 stop = true;
597 break;
598 }
599 }
600
601 restore = true; 571 restore = true;
602 boot_changed = false; 572 boot_changed = false;
603 } 573 }
604#endif 574#endif
575 button = button_get_w_tmo(HZ/5);
605 need_update = gui_synclist_do_button(&tree_lists, button); 576 need_update = gui_synclist_do_button(&tree_lists, button);
606 577
607 switch ( button ) { 578 switch ( button ) {