diff options
author | Kevin Ferrare <kevin@rockbox.org> | 2005-11-18 02:07:02 +0000 |
---|---|---|
committer | Kevin Ferrare <kevin@rockbox.org> | 2005-11-18 02:07:02 +0000 |
commit | 8719f0913a0f2d8a90e9ecbc7c0e5336369af6be (patch) | |
tree | b336928b98e48a15d0d1c176105fa21ac557b7c9 /apps/tree.c | |
parent | ec0a8a749bbc3aa25bf4c136352725bd9d2532b5 (diff) | |
download | rockbox-8719f0913a0f2d8a90e9ecbc7c0e5336369af6be.tar.gz rockbox-8719f0913a0f2d8a90e9ecbc7c0e5336369af6be.zip |
generic multi-screen support for yes/no screens (like the one when reseting settings or when firmware has changed)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7951 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 41 |
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 ) { |