summaryrefslogtreecommitdiff
path: root/apps/plugins/random_folder_advance_config.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-06-29 02:39:09 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-06-29 02:39:09 +0000
commit47b67ba6f60b0f4b04f2583f35a553619bcf3ca1 (patch)
tree91b649c17164bb1cef24705498bfb2c8874b6736 /apps/plugins/random_folder_advance_config.c
parentfa366af4b8caf9c5c12030af5b013c9e54ebbbc0 (diff)
downloadrockbox-47b67ba6f60b0f4b04f2583f35a553619bcf3ca1.tar.gz
rockbox-47b67ba6f60b0f4b04f2583f35a553619bcf3ca1.zip
fix FS#9120 by actually quiting random folder advance config after choosing "ignore changes and quit"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17864 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/random_folder_advance_config.c')
-rw-r--r--apps/plugins/random_folder_advance_config.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c
index e1aa469473..c03a794e73 100644
--- a/apps/plugins/random_folder_advance_config.c
+++ b/apps/plugins/random_folder_advance_config.c
@@ -285,18 +285,18 @@ int save_list(void)
285 return 1; 285 return 1;
286} 286}
287 287
288void edit_list(void) 288int edit_list(void)
289{ 289{
290 struct gui_synclist lists; 290 struct gui_synclist lists;
291 bool exit = false; 291 bool exit = false;
292 int button,i; 292 int button,i;
293 int selection; 293 int selection, ret = 0;
294 294
295 /* load the dat file if not already done */ 295 /* load the dat file if not already done */
296 if ((list == NULL || list->count == 0) && (i = load_list()) != 0) 296 if ((list == NULL || list->count == 0) && (i = load_list()) != 0)
297 { 297 {
298 rb->splash(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i); 298 rb->splash(HZ*2, "Could not load %s, rv = %d", RFA_FILE, i);
299 return; 299 return -1;
300 } 300 }
301 301
302 dirs_count = list->count; 302 dirs_count = list->count;
@@ -371,12 +371,14 @@ void edit_list(void)
371 save_list(); 371 save_list();
372 case 1: 372 case 1:
373 exit = true; 373 exit = true;
374 ret = -2;
374 } 375 }
375 menu_exit(m); 376 menu_exit(m);
376 } 377 }
377 break; 378 break;
378 } 379 }
379 } 380 }
381 return ret;
380} 382}
381 383
382int export_list_to_file_text(void) 384int export_list_to_file_text(void)
@@ -474,6 +476,7 @@ int import_list_from_file_text(void)
474int main_menu(void) 476int main_menu(void)
475{ 477{
476 int m; 478 int m;
479 bool exit = false;
477 static const struct menu_item items[] = { 480 static const struct menu_item items[] = {
478 { "Generate Folder List", NULL }, 481 { "Generate Folder List", NULL },
479 { "Edit Folder List", NULL }, 482 { "Edit Folder List", NULL },
@@ -503,7 +506,8 @@ int main_menu(void)
503#ifdef HAVE_ADJUSTABLE_CPU_FREQ 506#ifdef HAVE_ADJUSTABLE_CPU_FREQ
504 rb->cpu_boost(true); 507 rb->cpu_boost(true);
505#endif 508#endif
506 edit_list(); 509 if (edit_list() < 0)
510 exit = true;
507#ifdef HAVE_ADJUSTABLE_CPU_FREQ 511#ifdef HAVE_ADJUSTABLE_CPU_FREQ
508 rb->cpu_boost(false); 512 rb->cpu_boost(false);
509#endif 513#endif
@@ -543,7 +547,7 @@ int main_menu(void)
543 return 1; 547 return 1;
544 } 548 }
545 menu_exit(m); 549 menu_exit(m);
546 return 0; 550 return exit?1:0;
547} 551}
548 552
549enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 553enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)