diff options
author | Michiel Van Der Kolk <not.valid@email.address> | 2005-05-10 23:00:25 +0000 |
---|---|---|
committer | Michiel Van Der Kolk <not.valid@email.address> | 2005-05-10 23:00:25 +0000 |
commit | 09d82dbed8ebbefb2dfb248cd2d6191e917e9797 (patch) | |
tree | f7627468101fa06fb95325e579e8023ce95c3a4c | |
parent | 97599d3e47c3e1af574eb83fbbf4b5d7343c5798 (diff) |
gee, i thought i committed this o.o.
Proper aborting editing for databox...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6453 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/databox/databox.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/databox/databox.c b/apps/plugins/databox/databox.c index 243fd1fdc6..af2bdda927 100644 --- a/apps/plugins/databox/databox.c +++ b/apps/plugins/databox/databox.c @@ -214,7 +214,7 @@ int writetstream(char *filename,struct token *token) { /* this is the plugin entry point */ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { - int button,done=0; + int button,done=0,abort=0; char filename[100],buf[100]; /* this macro should be called as the first thing you do in the plugin. it test that the api version and model the plugin was compiled for @@ -332,7 +332,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) editing.selecting=0; } else - done=1; + abort=1; break; default: @@ -344,10 +344,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) } break; } - } while (!done); + } while (!done&&!abort); #ifdef HAVE_LCD_BITMAP rb->lcd_setfont(FONT_UI); #endif + if(abort) + return PLUGIN_OK; + if(editor.valid&&editor.tokencount>0) { if(writetstream(filename,editor.token)) { rb->splash(HZ*2,true,"Wrote file succesfully ^.^"); |