summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-05-10 23:00:25 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-05-10 23:00:25 +0000
commit09d82dbed8ebbefb2dfb248cd2d6191e917e9797 (patch)
treef7627468101fa06fb95325e579e8023ce95c3a4c
parent97599d3e47c3e1af574eb83fbbf4b5d7343c5798 (diff)
downloadrockbox-09d82dbed8ebbefb2dfb248cd2d6191e917e9797.tar.gz
rockbox-09d82dbed8ebbefb2dfb248cd2d6191e917e9797.zip
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.c9
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) {
214/* this is the plugin entry point */ 214/* this is the plugin entry point */
215enum plugin_status plugin_start(struct plugin_api* api, void* parameter) 215enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
216{ 216{
217 int button,done=0; 217 int button,done=0,abort=0;
218 char filename[100],buf[100]; 218 char filename[100],buf[100];
219 /* this macro should be called as the first thing you do in the plugin. 219 /* this macro should be called as the first thing you do in the plugin.
220 it test that the api version and model the plugin was compiled for 220 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)
332 editing.selecting=0; 332 editing.selecting=0;
333 } 333 }
334 else 334 else
335 done=1; 335 abort=1;
336 break; 336 break;
337 337
338 default: 338 default:
@@ -344,10 +344,13 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
344 } 344 }
345 break; 345 break;
346 } 346 }
347 } while (!done); 347 } while (!done&&!abort);
348#ifdef HAVE_LCD_BITMAP 348#ifdef HAVE_LCD_BITMAP
349 rb->lcd_setfont(FONT_UI); 349 rb->lcd_setfont(FONT_UI);
350#endif 350#endif
351 if(abort)
352 return PLUGIN_OK;
353
351 if(editor.valid&&editor.tokencount>0) { 354 if(editor.valid&&editor.tokencount>0) {
352 if(writetstream(filename,editor.token)) { 355 if(writetstream(filename,editor.token)) {
353 rb->splash(HZ*2,true,"Wrote file succesfully ^.^"); 356 rb->splash(HZ*2,true,"Wrote file succesfully ^.^");