summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-05-17 18:28:32 +0000
committerJens Arnold <amiconn@rockbox.org>2005-05-17 18:28:32 +0000
commit32be590e6db3e2c2bcdcc16d89bad22135bd9058 (patch)
tree4f4d0ace1f1821a12a712ce0626ca2e97ce8ef29
parentfa924f1b0564ecec8a7b48bcd2b2a88bcd0eedbd (diff)
downloadrockbox-32be590e6db3e2c2bcdcc16d89bad22135bd9058.tar.gz
rockbox-32be590e6db3e2c2bcdcc16d89bad22135bd9058.zip
Added the 'only return to root if current dir no longer exists' functionality to the plugin handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6487 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/dbtree.c2
-rw-r--r--apps/filetree.c13
-rw-r--r--apps/tree.c7
3 files changed, 9 insertions, 13 deletions
diff --git a/apps/dbtree.c b/apps/dbtree.c
index 0dc4112189..263abf4082 100644
--- a/apps/dbtree.c
+++ b/apps/dbtree.c
@@ -447,7 +447,7 @@ int db_enter(struct tree_context* c)
447 case searchsongs: 447 case searchsongs:
448 c->dirlevel--; 448 c->dirlevel--;
449 if (db_play_folder(c) >= 0) 449 if (db_play_folder(c) >= 0)
450 rc = 3; 450 rc = 2;
451 break; 451 break;
452 452
453 case search: 453 case search:
diff --git a/apps/filetree.c b/apps/filetree.c
index db60526548..60443a163c 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -310,7 +310,6 @@ int ft_enter(struct tree_context* c)
310 char buf[MAX_PATH]; 310 char buf[MAX_PATH];
311 struct entry *dircache = c->dircache; 311 struct entry *dircache = c->dircache;
312 struct entry* file = &dircache[c->dircursor + c->dirstart]; 312 struct entry* file = &dircache[c->dircursor + c->dirstart];
313 bool reload_root = false;
314 bool reload_dir = false; 313 bool reload_dir = false;
315 bool start_wps = false; 314 bool start_wps = false;
316 bool exit_func = false; 315 bool exit_func = false;
@@ -431,7 +430,7 @@ int ft_enter(struct tree_context* c)
431 otherwise might be confusing to the user */ 430 otherwise might be confusing to the user */
432 exit_func = true; 431 exit_func = true;
433 else 432 else
434 reload_root = true; 433 reload_dir = true;
435 } 434 }
436 break; 435 break;
437 436
@@ -441,7 +440,7 @@ int ft_enter(struct tree_context* c)
441 if (plugin) 440 if (plugin)
442 { 441 {
443 if (plugin_load(plugin,buf) == PLUGIN_USB_CONNECTED) 442 if (plugin_load(plugin,buf) == PLUGIN_USB_CONNECTED)
444 reload_root = true; 443 reload_dir = true;
445 } 444 }
446 break; 445 break;
447 } 446 }
@@ -470,12 +469,10 @@ int ft_enter(struct tree_context* c)
470 469
471 if (reload_dir) 470 if (reload_dir)
472 rc = 1; 471 rc = 1;
473 if (reload_root)
474 rc = 2;
475 if (start_wps) 472 if (start_wps)
476 rc = 3; 473 rc = 2;
477 if (exit_func) 474 if (exit_func)
478 rc = 4; 475 rc = 3;
479 476
480 return rc; 477 return rc;
481} 478}
@@ -518,7 +515,7 @@ int ft_exit(struct tree_context* c)
518 } 515 }
519 516
520 if (exit_func) 517 if (exit_func)
521 rc = 4; 518 rc = 3;
522 519
523 return rc; 520 return rc;
524} 521}
diff --git a/apps/tree.c b/apps/tree.c
index e52a3e5b68..c7ff7326fb 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -765,9 +765,8 @@ static bool dirbrowse(void)
765 switch (i) 765 switch (i)
766 { 766 {
767 case 1: reload_dir = true; break; 767 case 1: reload_dir = true; break;
768 case 2: reload_root = true; break; 768 case 2: start_wps = true; break;
769 case 3: start_wps = true; break; 769 case 3: exit_func = true; break;
770 case 4: exit_func = true; break;
771 default: break; 770 default: break;
772 } 771 }
773 772
@@ -801,7 +800,7 @@ static bool dirbrowse(void)
801 if (id3db) 800 if (id3db)
802 db_exit(&tc); 801 db_exit(&tc);
803 else 802 else
804 if (ft_exit(&tc) == 4) 803 if (ft_exit(&tc) == 3)
805 exit_func = true; 804 exit_func = true;
806 805
807 restore = true; 806 restore = true;