diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-08-15 12:27:07 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-08-15 12:27:07 +0000 |
commit | 224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9 (patch) | |
tree | bae2154b272f786983cf8e6de28d33f98f327560 /apps/gui/yesno.c | |
parent | c0f8b187706364f5e4bda2ac26750d14454c901d (diff) | |
download | rockbox-224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9.tar.gz rockbox-224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9.zip |
Finally, the new button action system is here, thanks to Jonathan Gordon. Some button mappings have changed and other things may break. Comments should go to the forum, http://forums.rockbox.org/index.php?topic=5829.0 or the mailing list.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10582 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/yesno.c')
-rw-r--r-- | apps/gui/yesno.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/apps/gui/yesno.c b/apps/gui/yesno.c index 225f6d3f43..d567cf9ed4 100644 --- a/apps/gui/yesno.c +++ b/apps/gui/yesno.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include "kernel.h" | 3 | #include "kernel.h" |
4 | #include "misc.h" | 4 | #include "misc.h" |
5 | #include "lang.h" | 5 | #include "lang.h" |
6 | #include "action.h" | ||
6 | 7 | ||
7 | void gui_yesno_init(struct gui_yesno * yn, | 8 | void gui_yesno_init(struct gui_yesno * yn, |
8 | struct text_message * main_message, | 9 | struct text_message * main_message, |
@@ -54,7 +55,7 @@ bool gui_yesno_draw_result(struct gui_yesno * yn, enum yesno_res result) | |||
54 | gui_textarea_put_message(yn->display, message, 0); | 55 | gui_textarea_put_message(yn->display, message, 0); |
55 | return(true); | 56 | return(true); |
56 | } | 57 | } |
57 | 58 | #include "debug.h" | |
58 | enum yesno_res gui_syncyesno_run(struct text_message * main_message, | 59 | enum yesno_res gui_syncyesno_run(struct text_message * main_message, |
59 | struct text_message * yes_message, | 60 | struct text_message * yes_message, |
60 | struct text_message * no_message) | 61 | struct text_message * no_message) |
@@ -72,23 +73,21 @@ enum yesno_res gui_syncyesno_run(struct text_message * main_message, | |||
72 | } | 73 | } |
73 | while (result==-1) | 74 | while (result==-1) |
74 | { | 75 | { |
75 | button = button_get(true); | 76 | button = get_action(CONTEXT_YESNOSCREEN,TIMEOUT_BLOCK); |
77 | DEBUGF("button=%x\n",button); | ||
76 | switch (button) | 78 | switch (button) |
77 | { | 79 | { |
78 | case YESNO_OK: | 80 | case ACTION_YESNO_ACCEPT: |
79 | #ifdef YESNO_RC_OK | ||
80 | case YESNO_RC_OK: | ||
81 | #endif | ||
82 | result=YESNO_YES; | 81 | result=YESNO_YES; |
83 | break; | 82 | break; |
84 | 83 | ||
85 | default: | 84 | default: |
86 | if(default_event_handler(button) == SYS_USB_CONNECTED) | 85 | if(default_event_handler(button) == SYS_USB_CONNECTED) |
87 | return(YESNO_USB); | 86 | return(YESNO_USB); |
88 | if(!(button & BUTTON_REL)) | 87 | result = YESNO_NO; |
89 | result=YESNO_NO; | ||
90 | } | 88 | } |
91 | } | 89 | } |
90 | action_signalscreenchange(); | ||
92 | FOR_NB_SCREENS(i) | 91 | FOR_NB_SCREENS(i) |
93 | result_displayed=gui_yesno_draw_result(&(yn[i]), result); | 92 | result_displayed=gui_yesno_draw_result(&(yn[i]), result); |
94 | if(result_displayed) | 93 | if(result_displayed) |