summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-05-08 15:21:53 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-05-08 15:21:53 +0000
commit517eb7efa21635e97241200c5c9d4e46aaa9028e (patch)
tree02601280d47da16761894a90a08178aa0c35f8ad
parentfda0d43172255536aa4cbb61ea1f262cbac1bdb4 (diff)
downloadrockbox-517eb7efa21635e97241200c5c9d4e46aaa9028e.tar.gz
rockbox-517eb7efa21635e97241200c5c9d4e46aaa9028e.zip
Canceling edit support.
todo: insert, delete git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6434 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/databox/databox.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/databox/databox.c b/apps/plugins/databox/databox.c
index 811b97e222..fe4886f513 100644
--- a/apps/plugins/databox/databox.c
+++ b/apps/plugins/databox/databox.c
@@ -242,7 +242,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
editing.currentselection=(editing.currentselection+
1) %editing.selectionmax;
}
- if(button&BUTTON_RIGHT
+ else if(button&BUTTON_RIGHT
#if CONFIG_KEYPAD == IRIVER_H100_PAD
||button&BUTTON_UP
#endif
@@ -250,7 +250,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
editing.currentselection=(editing.currentselection +
editing.selectionmax-1) % editing.selectionmax;
}
- if(button&BUTTON_SELECT) {
+ else if(button&BUTTON_OFF) {
+ rb->memcpy(&editor.token[editor.currentindex],&editing.old_token,sizeof(struct token));
+ editing.selecting=0;
+ }
+ else if(button&BUTTON_SELECT) {
buildtoken(editing.selection_candidates[editing.currentselection],&editor.token[editor.currentindex]);
editing.selecting=0;
if(editor.token[editor.currentindex].kind==TOKEN_EOF)