From 2cda994431174ab809143761a3c72412acc54dc3 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 10 Jun 2007 10:41:27 +0000 Subject: [PATCH] Move the root_menu() call out of tree.c. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13609 a1c6a512-1295-4272-9138-f99709370657 --- apps/main.c | 7 ++++--- apps/tree.c | 7 +++---- apps/tree.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/main.c b/apps/main.c index e515c9ddd2..3dfab06280 100644 --- a/apps/main.c +++ b/apps/main.c @@ -122,7 +122,8 @@ static void app_main(void) #endif { init(); - browse_root(); + tree_gui_init(); + root_menu(); } static int init_dircache(bool preinit) @@ -272,7 +273,7 @@ static void init(void) init_tagcache(); #endif sleep(HZ/2); - tree_init(); + tree_mem_init(); filetype_init(); playlist_init(); @@ -503,7 +504,7 @@ static void init(void) #endif status_init(); playlist_init(); - tree_init(); + tree_mem_init(); filetype_init(); scrobbler_init(); cuesheet_init(); diff --git a/apps/tree.c b/apps/tree.c index 53aca47d49..1f76994968 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -202,7 +202,8 @@ bool check_rockboxdir(void) return true; } -void browse_root(void) +/* do this really late in the init sequence */ +void tree_gui_init(void) { gui_sync_wps_screen_init(); @@ -222,8 +223,6 @@ void browse_root(void) #endif gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1); gui_synclist_set_icon_callback(&tree_lists, &tree_get_fileicon); - /* not the best place for this call... but... */ - root_menu(); } @@ -1078,7 +1077,7 @@ int rockbox_browse(const char *root, int dirfilter) return ret_val; } -void tree_init(void) +void tree_mem_init(void) { /* We copy the settings value in case it is changed by the user. We can't use it until the next reboot. */ diff --git a/apps/tree.h b/apps/tree.h index 0d783b4b0e..96cb712a1a 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -67,8 +67,8 @@ struct tree_context { bool dirfull; }; -void tree_init(void); -void browse_root(void); +void tree_mem_init(void); +void tree_gui_init(void); void get_current_file(char* buffer, int buffer_len); int rockbox_browse(const char *root, int dirfilter); bool create_playlist(void);