Index: apps/screens.c
===================================================================
--- apps/screens.c	(revision 12402)
+++ apps/screens.c	(working copy)
@@ -654,9 +654,6 @@
         [SHOW_SUPPORTED]={ STR(LANG_SYSFONT_FILTER_SUPPORTED) },
         [SHOW_MUSIC]={ STR(LANG_SYSFONT_FILTER_MUSIC) },
         [SHOW_PLAYLIST]={ STR(LANG_SYSFONT_FILTER_PLAYLIST) },
-#ifdef HAVE_TAGCACHE
-        [SHOW_ID3DB]={ STR(LANG_SYSFONT_FILTER_ID3DB) }
-#endif
     };
     static const struct opt_items right_items[] = {
         [REPEAT_OFF]={ STR(LANG_SYSFONT_OFF) },
Index: apps/main_menu.c
===================================================================
--- apps/main_menu.c	(revision 12402)
+++ apps/main_menu.c	(working copy)
@@ -128,9 +128,6 @@
     if(inside_menu) return false;
     inside_menu = true;
 
-    items[i].desc = ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS);
-    items[i++].function = bookmark_mrb_load;
-
     items[i].desc = ID2P(LANG_SOUND_SETTINGS);
     items[i++].function = sound_menu;
 
Index: apps/main_menu.h
===================================================================
--- apps/main_menu.h	(revision 12402)
+++ apps/main_menu.h	(working copy)
@@ -21,7 +21,7 @@
 
 #include "menu.h"
 
-extern bool main_menu(void);
+extern int main_menu(void);
 extern bool rec_menu(void);
 
 #endif
Index: apps/recorder/radio.c
===================================================================
--- apps/recorder/radio.c	(revision 12402)
+++ apps/recorder/radio.c	(working copy)
@@ -60,6 +60,7 @@
 #include "tree.h"
 #include "dir.h"
 #include "action.h"
+#include "root_menu.h"
 
 #if CONFIG_TUNER
 
@@ -365,11 +366,12 @@
 }
 
 
-bool radio_screen(void)
+int radio_screen(void)
 {
     char buf[MAX_PATH];
     bool done = false;
     int button, lastbutton = BUTTON_NONE;
+    int ret_val = GO_TO_ROOT;
 #ifdef FM_RECORD_DBLPRE
     unsigned long rec_lastclick = 0;
 #endif
@@ -582,7 +584,7 @@
 #endif
                 keep_playing = true;
                 done = true;
-                
+                ret_val = GO_TO_ROOT;
                 if(presets_changed)
                 {
                     if(yesno_pop(str(LANG_FM_SAVE_CHANGES)))
@@ -596,7 +598,7 @@
                 
                 /* Clear the preset list on exit. */
                 clear_preset_list();
-                    
+                
                 break;
 
             case ACTION_STD_PREV:
Index: apps/recorder/icons.h
===================================================================
--- apps/recorder/icons.h	(revision 12402)
+++ apps/recorder/icons.h	(working copy)
@@ -83,6 +83,7 @@
 #endif
 	Icon_file_view_menu,
 	Icon_EQ,
+    Icon_Rockbox,
     Icon6x8Last,
 };
 
Index: apps/recorder/radio.h
===================================================================
--- apps/recorder/radio.h	(revision 12402)
+++ apps/recorder/radio.h	(working copy)
@@ -26,7 +26,7 @@
 #if CONFIG_TUNER
 void radio_load_presets(char *filename);
 void radio_init(void);
-bool radio_screen(void);
+int radio_screen(void);
 void radio_start(void);
 void radio_pause(void);
 void radio_stop(void);
Index: apps/recorder/icons.c
===================================================================
--- apps/recorder/icons.c	(revision 12402)
+++ apps/recorder/icons.c	(working copy)
@@ -79,6 +79,7 @@
 #endif
 	{ 0x1f, 0x11, 0x7d, 0x46, 0x44, 0x78 }, /* File View Menu */
 	{ 0x06, 0x7f, 0x06, 0x18, 0x7f, 0x18 }, /* EQ menu */
+    { 0x20, 0x70, 0x70, 0x3f, 0x0a, 0x0a }, /* "rockbox" musical note */
 };
 
 const unsigned char bitmap_icons_7x8[][7] =
Index: apps/tree.c
===================================================================
--- apps/tree.c	(revision 12402)
+++ apps/tree.c	(working copy)
@@ -79,6 +79,7 @@
 #include "textarea.h"
 #include "action.h"
 
+#include "root_menu.h"
 
 #if LCD_DEPTH > 1
 #include "backdrop.h"
@@ -160,7 +161,7 @@
 static bool reload_dir = false;
 
 static bool start_wps = false;
-static bool dirbrowse(void);
+static int dirbrowse(void);
 static int curr_context = false;/* id3db or tree*/
 
 /*
@@ -272,13 +273,8 @@
     gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1);
     gui_synclist_set_icon_callback(&tree_lists,
                   global_settings.show_icons?&tree_get_fileicon:NULL);
-#ifndef SIMULATOR
-    dirbrowse();
-#else
-    if (!dirbrowse()) {
-        DEBUGF("No filesystem found. Have you forgotten to create it?\n");
-    }
-#endif
+    /* not the best place for this call... but... */
+    root_menu();
 }
 
 void tree_get_filetypes(const struct filetype** types, int* count)
@@ -478,54 +474,6 @@
     reload_dir = true;
 }
 
-static void start_resume(bool just_powered_on)
-{
-    bool do_resume = false;
-    if ( global_status.resume_index != -1 ) {
-        DEBUGF("Resume index %X offset %X\n",
-               global_status.resume_index,
-               global_status.resume_offset);
-
-#ifdef HAVE_ALARM_MOD
-        if ( rtc_check_alarm_started(true) ) {
-           rtc_enable_alarm(false);
-           do_resume = true;
-        }
-#endif
-
-        /* always resume? */
-        if ( global_settings.resume || ! just_powered_on)
-#ifdef HAVE_HEADPHONE_DETECTION
-        {
-            if ( just_powered_on )
-            {
-                if ( !global_settings.unplug_autoresume
-                    || headphones_inserted() )
-                    do_resume = true;
-            }
-            else
-                do_resume = true;
-        }
-#else
-             do_resume = true;
-#endif
-
-        if (! do_resume) return;
-
-        if (playlist_resume() != -1)
-        {
-            playlist_start(global_status.resume_index,
-                global_status.resume_offset);
-
-            start_wps = true;
-        }
-        else return;
-    }
-    else if (! just_powered_on) {
-        gui_syncsplash(HZ*2, true, str(LANG_NOTHING_TO_RESUME));
-    }
-}
-
 /* Selects a file and update tree context properly */
 void set_current_file(char *path)
 {
@@ -605,7 +553,7 @@
 #endif
 
 /* main loop, handles key events */
-static bool dirbrowse(void)
+static int dirbrowse(void)
 {
     int numentries=0;
     char buf[MAX_PATH];
@@ -617,6 +565,7 @@
     bool need_update = true;
     bool exit_func = false;
     long thumbnail_time = -1; /* for delaying a thumbnail */
+    long last_cancel = 0;
 
     char* currdir = tc.currdir; /* just a shortcut */
 #ifdef HAVE_TAGCACHE
@@ -628,7 +577,6 @@
 #endif
         curr_context=CONTEXT_TREE;
     tc.selected_item = 0;
-    tc.dirlevel=0;
 #ifdef HAVE_TAGCACHE
     tc.firstpos=0;
     lasttable = -1;
@@ -636,43 +584,22 @@
     lastfirstpos = 0;
 #endif
 
-    if (*tc.dirfilter < NUM_FILTER_MODES) {
-#ifdef HAVE_RECORDING
-#ifndef SIMULATOR
-        if (global_settings.rec_startup) {
-            /* We fake being in the menu structure by calling
-               the appropriate parent when we drop out of each screen */
-#if CONFIG_CODEC == SWCODEC
-            /* Put in a 1 sec pause to slow bootup or the recording codecs
-               won't initialize */
-            sleep(HZ);
-#endif
-            recording_screen(false);
-            rec_menu();
-            main_menu();
-        }
-        else
-#endif
-#endif
-        start_resume(true);
+    start_wps = false;
+    numentries = update_dir();
+    if (numentries == -1)
+        return false;  /* currdir is not a directory */
 
+    if (*tc.dirfilter > NUM_FILTER_MODES && numentries==0)
+    {
+        gui_syncsplash(HZ*2, true, str(LANG_NO_FILES));
+        return false;  /* No files found for rockbox_browser() */
     }
-    /* If we don't need to show the wps, draw the dir */
-    if (!start_wps) {
-        numentries = update_dir();
-        if (numentries == -1)
-            return false;  /* currdir is not a directory */
-
-        if (*tc.dirfilter > NUM_FILTER_MODES && numentries==0)
-        {
-            gui_syncsplash(HZ*2, true, str(LANG_NO_FILES));
-            return false;  /* No files found for rockbox_browser() */
-        }
-    }
-
+    
     while(1) {
         struct entry *dircache = tc.dircache;
         bool restore = false;
+        if (tc.dirlevel < 0)
+          tc.dirlevel = 0; /* shouldnt be needed.. this code needs work! */
 #ifdef BOOTFILE
         if (boot_changed) {
             char *lines[]={str(LANG_BOOT_CHANGED), str(LANG_REBOOT_NOW)};
@@ -715,10 +642,20 @@
                     exit_func = true;
                     break;
                 }
-                /* if we are in /, nothing to do */
-                if (tc.dirlevel == 0 && !strcmp(currdir,"/"))
-                    break;
-
+                if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) ||
+                    ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/"))))
+                {
+                    if (last_cancel && TIME_BEFORE(current_tick, last_cancel+HZ/2))
+                    {
+                        last_cancel = 0;
+                        action_signalscreenchange(); /* eat the cancel presses */
+                        break;
+                    }
+                    else
+                        return GO_TO_PREVIOUS;
+                }
+                last_cancel = current_tick;
+                
 #ifdef HAVE_TAGCACHE
                 if (id3db)
                     tagtree_exit(&tc);
@@ -772,37 +709,17 @@
                 /* don't enter menu from plugin browser */
                 if (*tc.dirfilter < NUM_FILTER_MODES)
                 {
-                    int i;
-                    FOR_NB_SCREENS(i)
-                        screens[i].stop_scroll();
-                    action_signalscreenchange();
-                    if (main_menu())
-                        reload_dir = true;
-                    restore = true;
-
-#ifdef HAVE_TAGCACHE
-                    id3db = check_changed_id3mode(id3db);
-                    if(id3db)
-                        reload_dir = true;
-#endif
+                    return GO_TO_ROOT;
                 }
                 else /* use it as a quick exit instead */
-                    exit_func = true;
+                    return GO_TO_PREVIOUS;
                 break;
 
             case ACTION_TREE_WPS:
                 /* don't enter wps from plugin browser etc */
                 if (*tc.dirfilter < NUM_FILTER_MODES)
                 {
-                    if (audio_status() & AUDIO_STATUS_PLAY)
-                    {
-                        start_wps=true;
-                    }
-                    else
-                    {
-                        start_resume(false);
-                        restore = true;
-                    }
+                    return GO_TO_PREVIOUS_MUSIC;
                 }
                 break;
 #ifdef HAVE_QUICKSCREEN
@@ -878,7 +795,7 @@
                         break;
 
                     case ONPLAY_START_PLAY:
-                        start_wps = true;
+                        return GO_TO_WPS;
                         break;
                 }
                 break;
@@ -952,38 +869,14 @@
                 }
                 break;
         }
-
+        if (start_wps)
+            return GO_TO_WPS;
         if ( button )
         {
             ata_spin();
         }
 
-        if (start_wps && audio_status() )
-        {
-            int i;
 
-            FOR_NB_SCREENS(i)
-                screens[i].stop_scroll();
-
-            if (gui_wps_show() == SYS_USB_CONNECTED)
-                reload_dir = true;
-#ifdef HAVE_HOTSWAP
-            else
-#ifdef HAVE_TAGCACHE
-                if (!id3db) /* Try reload to catch 'no longer valid' case. */
-#endif
-                    reload_dir = true;
-#endif
-#if LCD_DEPTH > 1
-            show_main_backdrop();
-#endif
-#ifdef HAVE_TAGCACHE
-            id3db = check_changed_id3mode(id3db);
-#endif
-            restore = true;
-            start_wps=false;
-        }
-
     check_rescan:
         /* do we need to rescan dir? */
         if (reload_dir || reload_root ||
@@ -1016,7 +909,7 @@
         }
 
         if (exit_func)
-            break;
+            return GO_TO_PREVIOUS;
 
         if (restore || reload_dir) {
             /* restore display */
@@ -1252,24 +1145,40 @@
     return true;
 }
 
-bool rockbox_browse(const char *root, int dirfilter)
+int rockbox_browse(const char *root, int dirfilter)
 {
-    static struct tree_context backup;
-    int last_context;
-    
-    backup = tc;
+    int ret_val = 0;
     reload_dir = true;
-    memcpy(tc.currdir, root, sizeof(tc.currdir));
-    start_wps = false;
-    tc.dirfilter = &dirfilter;
-    last_context = curr_context;
+    if (dirfilter >= NUM_FILTER_MODES)
+    {
+        static struct tree_context backup;
+        int last_context;
+        
+        backup = tc;
+        memcpy(tc.currdir, root, sizeof(tc.currdir));
+        start_wps = false;
+        tc.dirfilter = &dirfilter;
+        last_context = curr_context;
+        
+        ret_val = dirbrowse();
     
-    dirbrowse();
-
-    tc = backup;
-    curr_context = last_context;
-    
-    return false;
+        tc = backup;
+        curr_context = last_context;
+    }
+    else if (dirfilter == SHOW_ID3DB)
+    {
+        *tc.dirfilter = dirfilter;
+        ret_val = dirbrowse();
+    }
+    else
+    {
+        static char buf[MAX_PATH];
+        strcpy(buf,root);
+        *tc.dirfilter = dirfilter;
+        set_current_file(buf);
+        ret_val = dirbrowse();
+    }
+    return ret_val;
 }
 
 void tree_init(void)
Index: apps/lang/english.lang
===================================================================
--- apps/lang/english.lang	(revision 12402)
+++ apps/lang/english.lang	(working copy)
@@ -328,13 +328,13 @@
   desc: in the main menu
   user:
   <source>
-    *: "Browse Plugins"
+    *: "Plugins"
   </source>
   <dest>
-    *: "Browse Plugins"
+    *: "Plugins"
   </dest>
   <voice>
-    *: "Browse Plugins"
+    *: "Plugins"
   </voice>
 </phrase>
 <phrase>
@@ -342,13 +342,13 @@
   desc: in the main menu
   user:
   <source>
-    *: "Info"
+    *: "System"
   </source>
   <dest>
-    *: "Info"
+    *: "System"
   </dest>
   <voice>
-    *: "Info"
+    *: "System"
   </voice>
 </phrase>
 <phrase>
@@ -1008,13 +1008,13 @@
   desc: in the recording sub menu
   user:
   <source>
-    *: "Recording Screen"
+    *: "Recording"
   </source>
   <dest>
-    *: "Recording Screen"
+    *: "Recording"
   </dest>
   <voice>
-    *: "Recording Screen"
+    *: "Recording"
   </voice>
 </phrase>
 <phrase>
@@ -10543,3 +10543,101 @@
     *: "Cuesheet Support"
   </voice>
 </phrase>
+<phrase>
+  id: LANG_DIR_BROWSER
+  desc: in root menu
+  user:
+  <source>
+    *: "Files"
+  </source>
+  <dest>
+    *: "Files"
+  </dest>
+  <voice>
+    *: "Files"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_SETTINGS_MENU
+  desc: in root menu
+  user:
+  <source>
+    *: "Settings"
+  </source>
+  <dest>
+    *: "Settings"
+  </dest>
+  <voice>
+    *: "Settings"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_NOW_PLAYING
+  desc: in root menu
+  user:
+  <source>
+    *: "Now Playing"
+  </source>
+  <dest>
+    *: "Now Playing"
+  </dest>
+  <voice>
+    *: "Now Playing"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_RESUME_PLAYBACK
+  desc: in root menu
+  user:
+  <source>
+    *: "Resume Playback"
+  </source>
+  <dest>
+    *: "Resume Playback"
+  </dest>
+  <voice>
+    *: "Resume Playback"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_START_SCREEN
+  desc: in root menu setting
+  user:
+  <source>
+    *: "Start Screen"
+  </source>
+  <dest>
+    *: "Start Screen"
+  </dest>
+  <voice>
+    *: "Start Screen"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_ROCKBOX_TITLE
+  desc: in root menu
+  user:
+  <source>
+    *: "Rockbox"
+  </source>
+  <dest>
+    *: "Rockbox"
+  </dest>
+  <voice>
+    *: "Rockbox"
+  </voice>
+</phrase>
+<phrase>
+  id: LANG_MAIN_MENU
+  desc: in root menu setting
+  user:
+  <source>
+    *: "Main Menu"
+  </source>
+  <dest>
+    *: "Main Menu"
+  </dest>
+  <voice>
+    *: "Main Menu"
+  </voice>
+</phrase>
Index: apps/gui/gwps.c
===================================================================
--- apps/gui/gwps.c	(revision 12402)
+++ apps/gui/gwps.c	(working copy)
@@ -59,6 +59,7 @@
 #include "backdrop.h"
 #endif
 #include "ata_idle_notify.h"
+#include "root_menu.h"
 
 #define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps"
 #define RWPS_DEFAULTCFG WPS_DIR "/rockbox_default.rwps"
@@ -264,7 +265,7 @@
                     wps_state.current_track_path[0] != '\0')
                     set_current_file(wps_state.current_track_path);
                 action_signalscreenchange();
-                return 0;
+                return GO_TO_PREVIOUS_BROWSER;
                 break;
 
                 /* play/pause */
@@ -497,23 +498,7 @@
             case ACTION_WPS_MENU:
                 FOR_NB_SCREENS(i)
                     gui_wps[i].display->stop_scroll();
-
-#if LCD_DEPTH > 1
-                show_main_backdrop();
-#endif
-                action_signalscreenchange();
-                if (main_menu())
-                    return true;
-#if LCD_DEPTH > 1
-                show_wps_backdrop();
-#endif
-#ifdef HAVE_LCD_BITMAP
-                FOR_NB_SCREENS(i)
-                {
-                    gui_wps_set_margin(&gui_wps[i]);
-                }
-#endif
-                restore = true;
+                return GO_TO_ROOT;
                 break;
 
 
@@ -671,7 +656,7 @@
                 wps_state.current_track_path[0] != '\0')
                 set_current_file(wps_state.current_track_path);
 
-            return 0;
+            return GO_TO_ROOT;
         }
 
         if ( button )
@@ -690,7 +675,7 @@
                     wps_state.current_track_path[0] != '\0')
                     set_current_file(wps_state.current_track_path);
 
-                return 0;
+                return GO_TO_ROOT;
             }
 
             if (wps_state.id3){
@@ -699,7 +684,7 @@
             }
         }
     }
-    return 0; /* unreachable - just to reduce compiler warnings */
+    return GO_TO_ROOT; /* unreachable - just to reduce compiler warnings */
 }
 
 /* needs checking if needed end*/
Index: apps/tree.h
===================================================================
--- apps/tree.h	(revision 12402)
+++ apps/tree.h	(working copy)
@@ -101,7 +101,7 @@
 void tree_init(void);
 void browse_root(void);
 void set_current_file(char *path);
-bool rockbox_browse(const char *root, int dirfilter);
+int rockbox_browse(const char *root, int dirfilter);
 bool create_playlist(void);
 void resume_directory(const char *dir);
 char *getcwd(char *buf, int size);
Index: apps/menu.c
===================================================================
--- apps/menu.c	(revision 12402)
+++ apps/menu.c	(working copy)
@@ -44,6 +44,7 @@
 #include "action.h"
 #include "menus/exported_menus.h"
 #include "string.h"
+#include "root_menu.h"
 
 #ifdef HAVE_LCD_BITMAP
 #include "icons.h"
@@ -303,7 +304,14 @@
         return current_subitems[selected_item];
     return selected_item;
 }
-
+static int find_menu_selection(int selected)
+{
+    int i;
+    for (i=0; i< current_subitems_count; i++)
+        if (current_subitems[i] == selected)
+            return i;
+    return 0;
+}
 static char * get_menu_item_name(int selected_item,void * data, char *buffer)
 {
     const struct menu_item_ex *menu = (const struct menu_item_ex *)data;
@@ -360,6 +368,7 @@
             break;
         case MT_FUNCTION_CALL:
         case MT_FUNCTION_WITH_PARAM:
+        case MT_RETURN_VALUE:
             if (menu_icon == NOICON)
                 *icon = bitmap_icons_6x8[Icon_Menu_functioncall];
             else 
@@ -415,7 +424,7 @@
         gui_synclist_set_icon_callback(lists, NULL);
     gui_synclist_set_nb_items(lists,current_subitems_count);
     gui_synclist_limit_scroll(lists,true);
-    gui_synclist_select_item(lists, selected);
+    gui_synclist_select_item(lists, find_menu_selection(selected));
     
     get_menu_callback(menu,&menu_callback);
     if (callback && menu_callback)
@@ -431,14 +440,14 @@
         int sel = get_menu_selection(gui_synclist_get_sel_pos(lists),menu);
         if ((menu->flags&MENU_TYPE_MASK) == MT_MENU)
         {
-           if ((menu->submenus[sel]->flags&MENU_TYPE_MASK) == MT_SETTING)
-               talk_setting(menu->submenus[sel]->variable);
-           else 
-           {
-               id = P2ID(menu->submenus[sel]->callback_and_desc->desc);
-               if (id != -1)
+            if ((menu->submenus[sel]->flags&MENU_TYPE_MASK) == MT_SETTING)
+                talk_setting(menu->submenus[sel]->variable);
+            else 
+            {
+                id = P2ID(menu->submenus[sel]->callback_and_desc->desc);
+                if (id != -1)
                    talk_id(id,false);
-           }
+            }
         }
     }
 }
@@ -561,10 +570,10 @@
 	return ret_val;
 }
 
-int do_menu(const struct menu_item_ex *start_menu)
+int do_menu(const struct menu_item_ex *start_menu, int *start_selected)
 {
+    int selected = start_selected? *start_selected : 0;
     int action;
-    int selected = 0;
     struct gui_synclist lists;
     const struct menu_item_ex *temp, *menu;
     int ret = 0;
@@ -609,11 +618,15 @@
         }
         else if (action == ACTION_MENU_WPS)
         {
-            ret = MENU_RETURN_TO_WPS;
+            ret = GO_TO_PREVIOUS_MUSIC;
         }
-        else if ((action == ACTION_STD_CANCEL) ||
-                 (action == ACTION_STD_MENU))
+        else if (action == ACTION_STD_MENU)
         {
+            if (menu != &root_menu_)
+                ret = GO_TO_ROOT;
+        }
+        else if (action == ACTION_STD_CANCEL)
+        {
             in_stringlist = false;
             
             if (stack_top > 0)
@@ -631,11 +644,12 @@
                                  menu_stack_selected_item[stack_top], false);
                 talk_menu_item(menu, &lists);
             }
-            else 
+            else if (menu != &root_menu_)
             {
                 get_menu_callback(menu, &menu_callback);
                 if (menu_callback)
                     menu_callback(ACTION_EXIT_MENUITEM, menu);
+                ret = GO_TO_PREVIOUS;
                 break;
             }
         }
@@ -661,8 +675,7 @@
                     if (stack_top < MAX_MENUS)
                     {
                         menu_stack[stack_top] = menu;
-                        menu_stack_selected_item[stack_top]
-                                = gui_synclist_get_sel_pos(&lists);
+                        menu_stack_selected_item[stack_top] = selected;
                         stack_top++;
                         init_menu_lists(temp, &lists, 0, true);
                         menu = temp;
@@ -700,6 +713,10 @@
                         in_stringlist = true;
                     }
                     break;
+                case MT_RETURN_VALUE:
+                    if (start_selected)
+                        *start_selected = selected;
+                    return temp->value;
             }
             get_menu_callback(temp,&menu_callback);
             if (type != MT_MENU && menu_callback)
@@ -711,10 +728,12 @@
         gui_synclist_draw(&lists);
     }
     action_signalscreenchange();
+    if (start_selected)
+        *start_selected = selected;
     return ret;
 }
 
 int main_menu(void)
 {
-    return do_menu(NULL);
+    return do_menu(NULL, 0);
 }
Index: apps/settings.h
===================================================================
--- apps/settings.h	(revision 12402)
+++ apps/settings.h	(working copy)
@@ -277,6 +277,7 @@
     int last_frequency;  /* Last frequency for resuming, in FREQ_STEP units,
                             relative to MIN_FREQ */
 #endif
+    char last_screen;
 };
 
 struct user_settings
@@ -684,6 +685,7 @@
     /* Encoder Settings End */
 #endif /* CONFIG_CODEC == SWCODEC */
     bool cuesheet;
+    int start_in_screen;
 };
 
 /** global variables **/
Index: apps/menus/info_menu.c
===================================================================
--- apps/menus/info_menu.c	(revision 0)
+++ apps/menus/info_menu.c	(revision 0)
@@ -0,0 +1,311 @@
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+ *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ * $Id: main_menu.c 12378 2007-02-18 02:04:47Z jdgordon $
+ *
+ * Copyright (C) 2007 Jonathan Gordon
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <limits.h>
+#include "config.h"
+#include "string.h"
+#include "lang.h"
+#include "action.h"
+#include "settings.h"
+#include "powermgmt.h"
+#include "menu.h"
+#include "settings_menu.h"
+#include "exported_menus.h"
+#include "tree.h"
+#ifdef HAVE_RECORDING
+#include "recording.h"
+#endif
+#include "bookmark.h"
+#include "yesno.h"
+#include "keyboard.h"
+#include "screens.h"
+#include "plugin.h"
+#include "talk.h"
+#include "buffer.h"
+#include "splash.h"
+#include "debug_menu.h"
+#if defined(SIMULATOR) && defined(ROCKBOX_HAS_LOGF)
+#include "logfdisp.h"
+#endif
+
+
+/***********************************/
+/*      INFO MENU                  */
+
+static bool show_credits(void)
+{
+    plugin_load(PLUGIN_DIR "/credits.rock",NULL);
+    return false;
+}
+
+#ifdef SIMULATOR
+extern bool simulate_usb(void);
+#endif
+
+#ifdef HAVE_LCD_CHARCELLS
+#define SIZE_FMT "%s%s"
+#else
+#define SIZE_FMT "%s %s"
+#endif
+
+static bool show_info(void)
+{
+    char s[64], s1[32];
+    unsigned long size, free;
+    long buflen = ((audiobufend - audiobuf) * 2) / 2097;  /* avoid overflow */
+    int key;
+    int i;
+    bool done = false;
+    bool new_info = true;
+#ifdef HAVE_MULTIVOLUME
+    char s2[32];
+    unsigned long size2, free2;
+#endif
+#ifdef HAVE_LCD_CHARCELLS
+    int page = 0;
+#endif
+
+    const unsigned char *kbyte_units[] = {
+        ID2P(LANG_KILOBYTE),
+        ID2P(LANG_MEGABYTE),
+        ID2P(LANG_GIGABYTE)
+    };
+#if defined(HAVE_LCD_BITMAP)
+    FOR_NB_SCREENS(i)
+        screens[i].setmargins(0, 0);
+#endif
+    while (!done)
+    {
+        int y=0;
+
+        if (new_info)
+        {
+            fat_size( IF_MV2(0,) &size, &free );
+#ifdef HAVE_MULTIVOLUME
+            if (fat_ismounted(1))
+                fat_size( 1, &size2, &free2 );
+            else
+                size2 = 0;
+#endif
+
+            if (global_settings.talk_menu)
+            {   /* say whatever is reasonable, no real connection to the screen */
+                bool enqueue = false; /* enqueue all but the first */
+                if (battery_level() >= 0)
+                {
+                    talk_id(LANG_BATTERY_TIME, enqueue);
+                    enqueue = true;
+                    talk_value(battery_level(), UNIT_PERCENT, true);
+#if CONFIG_CHARGING >= CHARGING_MONITOR
+                    if (charge_state == CHARGING)
+                        talk_id(LANG_BATTERY_CHARGE, true);               
+                    else if (charge_state == TOPOFF)
+                        talk_id(LANG_BATTERY_TOPOFF_CHARGE, true);
+                    else if (charge_state == TRICKLE)
+                        talk_id(LANG_BATTERY_TRICKLE_CHARGE, true);
+#endif
+                }
+
+                talk_id(LANG_DISK_FREE_INFO, enqueue);
+#ifdef HAVE_MULTIVOLUME
+                talk_id(LANG_DISK_NAME_INTERNAL, true);
+                output_dyn_value(NULL, 0, free, kbyte_units, true);
+                if (size2)
+                {
+                    talk_id(LANG_DISK_NAME_MMC, true);
+                    output_dyn_value(NULL, 0, free2, kbyte_units, true);
+                }
+#else
+                output_dyn_value(NULL, 0, free, kbyte_units, true);
+#endif
+
+#ifdef CONFIG_RTC
+                {
+                    struct tm* tm = get_time();
+                    talk_id(VOICE_CURRENT_TIME, true);
+                    talk_value(tm->tm_hour, UNIT_HOUR, true);
+                    talk_value(tm->tm_min, UNIT_MIN, true);
+                    talk_value(tm->tm_sec, UNIT_SEC, true);
+                    talk_id(LANG_MONTH_JANUARY + tm->tm_mon, true);
+                    talk_number(tm->tm_mday, true);
+                    talk_number(1900 + tm->tm_year, true);
+                }
+#endif
+            }
+            new_info = false;
+        }
+
+        FOR_NB_SCREENS(i)
+        {
+            screens[i].clear_display();
+#ifdef HAVE_LCD_BITMAP
+            screens[i].puts(0, y, str(LANG_ROCKBOX_INFO));
+#endif
+        }
+#ifdef HAVE_LCD_BITMAP
+        y += 2;
+#endif
+
+#ifdef HAVE_LCD_CHARCELLS
+        if (page == 0)
+#endif
+        {
+            int integer = buflen / 1000;
+            int decimal = buflen % 1000;
+
+#ifdef HAVE_LCD_CHARCELLS
+            snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_PLAYER),
+                     integer, decimal);
+#else
+            snprintf(s, sizeof(s), (char *)str(LANG_BUFFER_STAT_RECORDER),
+                     integer, decimal);
+#endif
+            FOR_NB_SCREENS(i)
+                screens[i].puts_scroll(0, y, (unsigned char *)s);
+            y++;
+#if CONFIG_CHARGING == CHARGING_CONTROL
+            if (charge_state == CHARGING)
+                snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_CHARGE));
+            else if (charge_state == TOPOFF)
+                snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_TOPOFF_CHARGE));
+            else if (charge_state == TRICKLE)
+                snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_TRICKLE_CHARGE));
+            else
+#endif
+            if (battery_level() >= 0)
+                snprintf(s, sizeof(s), (char *)str(LANG_BATTERY_TIME), battery_level(),
+                         battery_time() / 60, battery_time() % 60);
+            else
+                strncpy(s, "(n/a)", sizeof(s));
+            FOR_NB_SCREENS(i)
+                screens[i].puts_scroll(0, y, (unsigned char *)s); 
+            y++;
+        }
+
+#ifdef HAVE_LCD_CHARCELLS
+        if (page == 1)
+#endif
+        {
+#ifdef HAVE_MULTIVOLUME
+            output_dyn_value(s1, sizeof s1, free, kbyte_units, true);
+            output_dyn_value(s2, sizeof s2, size, kbyte_units, true);
+            snprintf(s, sizeof s, "%s %s/%s", str(LANG_DISK_NAME_INTERNAL),
+                     s1, s2);
+            FOR_NB_SCREENS(i)
+                screens[i].puts_scroll(0, y, (unsigned char *)s);
+            y++;
+
+            if (size2) {
+                output_dyn_value(s1, sizeof s1, free2, kbyte_units, true);
+                output_dyn_value(s2, sizeof s2, size2, kbyte_units, true);
+                snprintf(s, sizeof s, "%s %s/%s", str(LANG_DISK_NAME_MMC),
+                         s1, s2);
+                FOR_NB_SCREENS(i)
+                    screens[i].puts_scroll(0, y, (unsigned char *)s);
+                y++;
+            }
+#else
+            output_dyn_value(s1, sizeof s1, size, kbyte_units, true);
+            snprintf(s, sizeof s, SIZE_FMT, str(LANG_DISK_SIZE_INFO), s1);
+            FOR_NB_SCREENS(i)
+                screens[i].puts_scroll(0, y, (unsigned char *)s);
+            y++;
+            output_dyn_value(s1, sizeof s1, free, kbyte_units, true);
+            snprintf(s, sizeof s, SIZE_FMT, str(LANG_DISK_FREE_INFO), s1);
+            FOR_NB_SCREENS(i)
+                screens[i].puts_scroll(0, y, (unsigned char *)s);
+            y++;
+#endif
+        }
+
+#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR)
+        FOR_NB_SCREENS(i)
+                screens[i].update();
+#endif
+
+        /* Wait for a key to be pushed */
+        key = get_action(CONTEXT_MAINMENU,HZ*5);
+        switch(key) {
+
+            case ACTION_STD_CANCEL:
+                done = true;
+                break;
+
+#ifdef HAVE_LCD_CHARCELLS
+            case ACTION_STD_NEXT:
+            case ACTION_STD_PREV:
+                page = (page == 0) ? 1 : 0;
+                break;
+#endif
+
+#ifndef SIMULATOR
+            case ACTION_STD_OK:
+                gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING));
+                fat_recalc_free(IF_MV(0));
+#ifdef HAVE_MULTIVOLUME
+                if (fat_ismounted(1))
+                    fat_recalc_free(1);
+#endif
+                new_info = true;
+                break;
+#endif
+
+            default:
+                if (default_event_handler(key) == SYS_USB_CONNECTED)
+                    return true;
+                break;
+        }
+    }
+    action_signalscreenchange();
+    return false;
+}
+MENUITEM_FUNCTION(show_info_item, ID2P(LANG_INFO_MENU),
+                   (menu_function)show_info, NULL, NOICON);
+MENUITEM_FUNCTION(show_credits_item, ID2P(LANG_VERSION),
+                   (menu_function)show_credits, NULL, NOICON);
+MENUITEM_FUNCTION(show_runtime_item, ID2P(LANG_RUNNING_TIME),
+                   (menu_function)view_runtime, NULL, NOICON);
+
+#ifndef SIMULATOR
+MENUITEM_FUNCTION(debug_menu_item, ID2P(LANG_DEBUG),
+                   (menu_function)debug_menu, NULL, NOICON);
+#else
+MENUITEM_FUNCTION(simulate_usb_item, ID2P(LANG_USB),
+                   (menu_function)simulate_usb, NULL, NOICON);
+#ifdef ROCKBOX_HAS_LOGF
+MENUITEM_FUNCTION(logfdisplay_item, "logf",(int (*)(void)) logfdisplay, NULL, NOICON);
+MENUITEM_FUNCTION(logfdump_item, "logfdump",(int (*)(void)) logfdump, NULL, NOICON);
+#endif
+#endif
+
+MAKE_MENU(info_menu, ID2P(LANG_INFO), 0, bitmap_icons_6x8[Icon_Questionmark],
+          &show_info_item, &show_credits_item, &show_runtime_item,
+#ifndef SIMULATOR
+         &debug_menu_item
+#else
+         &simulate_usb_item
+#ifdef ROCKBOX_HAS_LOGF
+        ,&logfdisplay_item, &logfdump_item
+#endif
+#endif
+        );
+/*      INFO MENU                  */
+/***********************************/
Index: apps/menus/recording_menu.c
===================================================================
--- apps/menus/recording_menu.c	(revision 12402)
+++ apps/menus/recording_menu.c	(working copy)
@@ -29,14 +29,8 @@
 #include "recording.h"
 
 #ifdef HAVE_RECORDING
-MENUITEM_FUNCTION(rec_menu_recording_screen_item, ID2P(LANG_RECORDING_MENU),
-                   (menu_function)recording_screen, NULL, NOICON);
 /* TEMP */
 bool recording_menu(bool no_source); /* from apps/sound_menu.h */
 MENUITEM_FUNCTION_WPARAM(recording_settings, ID2P(LANG_RECORDING_SETTINGS),
                           (int (*)(void*))recording_menu,0, NULL, NOICON);
-
-MAKE_MENU(recording_settings_menu,ID2P(LANG_RECORDING), 
-          0, bitmap_icons_6x8[Icon_Recording],
-          &rec_menu_recording_screen_item, &recording_settings);
 #endif
Index: apps/menus/playlist_menu.c
===================================================================
--- apps/menus/playlist_menu.c	(revision 12402)
+++ apps/menus/playlist_menu.c	(working copy)
@@ -73,12 +73,14 @@
 MENUITEM_SETTING(recursive_dir_insert, &global_settings.recursive_dir_insert, NULL);
 MENUITEM_SETTING(warn_on_erase, &global_settings.warnon_erase_dynplaylist, NULL);
 
-MAKE_MENU(playlist_menu_item, ID2P(LANG_PLAYLIST_MENU), NULL,
+MAKE_MENU(playlist_settings, ID2P(LANG_PLAYLIST_MENU), NULL,
           bitmap_icons_6x8[Icon_Playlist],
-          &create_playlist_item, &view_playlist, &save_playlist, &catalog,
           &recursive_dir_insert, &warn_on_erase);
+MAKE_MENU(playlist_options, ID2P(LANG_PLAYLIST_MENU), NULL,
+          bitmap_icons_6x8[Icon_Playlist],
+          &create_playlist_item, &view_playlist, &save_playlist, &catalog);
 
 bool playlist_menu(void)
 {
-    return do_menu(&playlist_menu_item);
+    return do_menu(&playlist_options, NULL);
 }
Index: apps/menus/exported_menus.h
===================================================================
--- apps/menus/exported_menus.h	(revision 12402)
+++ apps/menus/exported_menus.h	(working copy)
@@ -28,12 +28,14 @@
         display_menu,               /* display_menu.c   */
         playback_menu_item,         /* playback_menu.c  */
 #ifdef HAVE_RECORDING
-        recording_settings_menu,    /* recording_menu.c */
+        recording_settings,         /* recording_menu.c */
 #endif
         sound_settings,             /* sound_menu.c     */
         settings_menu_item,         /* settings_menu.c  */
-        playlist_menu_item,         /* playlist_menu.c  */
-		equalizer_menu;				/* eq_menu.c        */
+        playlist_settings,          /* playlist_menu.c  */
+        playlist_options,           /* playlist_menu.c  */
+		equalizer_menu,				/* eq_menu.c        */
+        info_menu;                  /* info_menu.c      */
 
 #ifdef HAVE_WM8758
 extern const struct menu_item_ex hw_eq_menu; /* eq_menu.c        */
Index: apps/menus/main_menu.c
===================================================================
--- apps/menus/main_menu.c	(revision 12402)
+++ apps/menus/main_menu.c	(working copy)
@@ -30,9 +30,6 @@
 #include "settings_menu.h"
 #include "exported_menus.h"
 #include "tree.h"
-#if CONFIG_TUNER
-#include "radio.h"
-#endif
 #ifdef HAVE_RECORDING
 #include "recording.h"
 #endif
@@ -49,22 +46,18 @@
 #include "logfdisp.h"
 #endif
 
-/* lazy coders can use this function if the needed callback 
-	is just to say if the item is shown or not */
-int dynamicitem_callback(int action,const struct menu_item_ex *this_item);
 
 
 struct browse_folder_info {
-	const char* dir;
-	int show_options;
+    const char* dir;
+    int show_options;
 };
 static struct browse_folder_info theme = {THEME_DIR, SHOW_CFG};
-static struct browse_folder_info rocks = {PLUGIN_DIR, SHOW_PLUGINS};
 static struct browse_folder_info config = {ROCKBOX_DIR, SHOW_CFG};
 static int browse_folder(void *param)
 {
-	const struct browse_folder_info *info =
-		(const struct browse_folder_info*)param;
+    const struct browse_folder_info *info =
+            (const struct browse_folder_info*)param;
     return rockbox_browse(info->dir, info->show_options);
 }
 
@@ -102,11 +95,11 @@
 }
 
 MENUITEM_FUNCTION_WPARAM(browse_configs, ID2P(LANG_CUSTOM_CFG), 
-		browse_folder, (void*)&config, NULL, NOICON);
+        browse_folder, (void*)&config, NULL, NOICON);
 MENUITEM_FUNCTION_WPARAM(save_settings_item, ID2P(LANG_SAVE_SETTINGS), 
-		write_settings_file, (void*)SETTINGS_SAVE_ALL, NULL, NOICON);
+        write_settings_file, (void*)SETTINGS_SAVE_ALL, NULL, NOICON);
 MENUITEM_FUNCTION_WPARAM(save_theme_item, ID2P(LANG_SAVE_THEME), 
-		write_settings_file, (void*)SETTINGS_SAVE_THEME, NULL, NOICON);
+        write_settings_file, (void*)SETTINGS_SAVE_THEME, NULL, NOICON);
 MENUITEM_FUNCTION(reset_settings_item,ID2P(LANG_RESET),reset_settings, NULL, NOICON);
 
 MAKE_MENU(manage_settings, ID2P(LANG_MANAGE_MENU), NULL, bitmap_icons_6x8[Icon_Config],
@@ -382,29 +375,9 @@
 /*    MAIN MENU                    */
 
 MENUITEM_FUNCTION_WPARAM(browse_themes, ID2P(LANG_CUSTOM_THEME), 
-		browse_folder, (void*)&theme, NULL, bitmap_icons_6x8[Icon_Folder]);
-MENUITEM_FUNCTION_WPARAM(browse_plugins, ID2P(LANG_PLUGINS),
-		browse_folder, (void*)&rocks, NULL, bitmap_icons_6x8[Icon_Plugin]);
+        browse_folder, (void*)&theme, NULL, bitmap_icons_6x8[Icon_Folder]);
 
-#if CONFIG_TUNER
-MENUITEM_FUNCTION(load_radio_screen, ID2P(LANG_FM_RADIO),
-                   (menu_function)radio_screen, dynamicitem_callback,
-                    bitmap_icons_6x8[Icon_Radio_screen]);
-#endif
-
-MENUITEM_FUNCTION(mrb_bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS),
-                   (menu_function)bookmark_mrb_load, NULL, bitmap_icons_6x8[Icon_Bookmark]);
-
 #ifdef HAVE_LCD_CHARCELLS
-static int do_shutdown(void)
-{
-    sys_poweroff();
-    return 0;
-}
-MENUITEM_FUNCTION(do_shutdown_item, ID2P(LANG_SHUTDOWN), do_shutdown, NULL, NOICON);
-#endif
-
-#ifdef HAVE_LCD_CHARCELLS
 int mainmenu_callback(int action,const struct menu_item_ex *this_item)
 {
     (void)this_item;
@@ -422,42 +395,14 @@
 #else
 #define mainmenu_callback NULL
 #endif
-/* NOTE: This title will be translatable once we decide what to call this menu
-         when the root menu comes in... hopefully in the next few days */
-MAKE_MENU(main_menu_, "Rockbox Main Menu", mainmenu_callback,
+MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS_MENU), mainmenu_callback,
         bitmap_icons_6x8[Icon_Submenu_Entered],
-        &mrb_bookmarks, &sound_settings,
+        &sound_settings,
         &settings_menu_item, &manage_settings, &browse_themes,
-#if CONFIG_TUNER
-        &load_radio_screen,
-#endif
 #ifdef HAVE_RECORDING
-        &recording_settings_menu,
+        &recording_settings,
 #endif
-        &playlist_menu_item, &browse_plugins, &info_menu
-#ifdef HAVE_LCD_CHARCELLS
-        ,&do_shutdown_item
-#endif
+        &playlist_settings
         );
 /*    MAIN MENU                    */
 /***********************************/
-
-/* lazy coders can use this function if the needed 
-   callback is just to say if the item is shown or not */
-int dynamicitem_callback(int action,const struct menu_item_ex *this_item)
-{
-    if (action != ACTION_ENTER_MENUITEM)
-        return action;
-	
-#if CONFIG_TUNER
-    if (this_item == &load_radio_screen)
-    {
-        if (radio_hardware_present() == 0)
-            return ACTION_EXIT_MENUITEM;
-    }
-#else
-    (void)this_item;
-#endif
-
-    return action;
-}
Index: apps/menus/eq_menu.c
===================================================================
--- apps/menus/eq_menu.c	(revision 12402)
+++ apps/menus/eq_menu.c	(working copy)
@@ -187,7 +187,7 @@
     menu.flags = MT_MENU|(3<<MENU_COUNT_SHIFT)|MENU_HAS_DESC;
     menu.submenus = band_items[band-1];
     menu.callback_and_desc = &cb_and_desc;
-    do_menu(&menu);
+    do_menu(&menu, NULL);
     return 0;
 }
 MAKE_MENU(band_0_menu, ID2P(LANG_EQUALIZER_BAND_LOW_SHELF), NULL, 
Index: apps/menus/sound_menu.c
===================================================================
--- apps/menus/sound_menu.c	(revision 12402)
+++ apps/menus/sound_menu.c	(working copy)
@@ -119,5 +119,5 @@
 
 bool sound_menu(void)
 {
-    return do_menu(&sound_settings);
+    return do_menu(&sound_settings, 0);
 }
Index: apps/menu.h
===================================================================
--- apps/menu.h	(revision 12402)
+++ apps/menu.h	(working copy)
@@ -63,6 +63,7 @@
     MT_FUNCTION_CALL, /* used when the standard code wont work */
     MT_FUNCTION_WITH_PARAM,
     MT_RETURN_ID, /* returns the position of the selected item (starting at 0)*/
+    MT_RETURN_VALUE, /* returns a value associated with an item */
 };
 
 typedef int (*menu_function)(void);
@@ -89,6 +90,7 @@
         const struct menu_func_with_param 
                                 *func_with_param; /* MT_FUNCTION_WITH_PARAM */
         const char **strings; /* used with MT_RETURN_ID */
+        int value; /* MT_RETURN_VALUE */
     };
     union {
 		/* For settings */
@@ -117,7 +119,7 @@
 
 typedef int (*menu_callback_type)(int action,
                                   const struct menu_item_ex *this_item);
-int do_menu(const struct menu_item_ex *menu);
+int do_menu(const struct menu_item_ex *menu, int *start_selected);
 bool do_setting_from_menu(const struct menu_item_ex *temp);
 
 #define MENU_ITEM_COUNT(c) (c<<MENU_COUNT_SHIFT)
@@ -149,22 +151,37 @@
 
 #ifdef HAVE_LCD_BITMAP /* Kill the player port already.... PLEASE!! */
             
-/* This one should be static'ed also, 
-   but cannot be done untill settings menu is done */
+/* returns a value associated with the item */
+#define MENUITEM_RETURNVALUE(name, str, val, cb, icon)                      \
+     static const struct menu_callback_with_desc name##_ = {cb,str,icon};     \
+     static const struct menu_item_ex name   =                                  \
+         { MT_RETURN_VALUE|MENU_HAS_DESC, { .value = val},             \
+         {.callback_and_desc = & name##_}};
+         
+/* same as above, except the item name is dynamic */
+#define MENUITEM_RETURNVALUE_DYNTEXT(name, val, cb, text_callback, text_cb_data, icon)                      \
+     static const struct menu_get_name_and_icon name##_ 					  \
+								= {cb,text_callback,text_cb_data,icon}; \
+     static const struct menu_item_ex name   =                              \
+        { MT_RETURN_VALUE|MENU_DYNAMIC_DESC, { .value = val},               \
+        {.menu_get_name_and_icon = & name##_}};
+        
 /*  Use this to put a function call into the menu.
     When the user selects this item the function will be run,
     when it exits the user will be back in the menu. return value is ignored */
 #define MENUITEM_FUNCTION(name, str, func, callback, icon)                     \
     static const struct menu_callback_with_desc name##_ = {callback,str,icon}; \
-    const struct menu_item_ex name   =                                  \
+    static const struct menu_item_ex name   =                                  \
         { MT_FUNCTION_CALL|MENU_HAS_DESC, { .function = func},          \
         {.callback_and_desc = & name##_}};
 
+/* This one should be static'ed also, 
+   but cannot be done untill recording menu is done */
 /* Same as above, except the function will be called with a (void*)param. */
 #define MENUITEM_FUNCTION_WPARAM(name, str, func, param, callback, icon)    \
     static const struct menu_callback_with_desc name##_ = {callback,str,icon}; \
     static const struct menu_func_with_param name##__ = {func, param};      \
-    static const struct menu_item_ex name   =                               \
+    const struct menu_item_ex name   =                               \
         { MT_FUNCTION_WITH_PARAM|MENU_HAS_DESC,                             \
             { .func_with_param = &name##__},                                \
             {.callback_and_desc = & name##_}};
@@ -189,8 +206,20 @@
         {MT_MENU|MENU_HAS_DESC|                                         \
          MENU_ITEM_COUNT(sizeof( name##_)/sizeof(*name##_)),            \
             { (void*)name##_},{.callback_and_desc = & name##__}};
+            
 
 #else /* HAVE_LCD_BITMAP */
+#define MENUITEM_RETURNVALUE(name, str, val, cb, icon)                      \
+     static const struct menu_callback_with_desc name##_ = {cb,str};   \
+     static const struct menu_item_ex name   =                              \
+        { MT_RETURN_VALUE|MENU_HAS_DESC, { .value = val},                  \
+        {.callback_and_desc = & name##_}};
+#define MENUITEM_RETURNVALUE_DYNTEXT(name, val, cb, text_callback, text_cb_data, icon)                      \
+     static const struct menu_get_name_and_icon name##_ 					  \
+								= {cb,text_callback,text_cb_data}; \
+     static const struct menu_item_ex name   =                              \
+        { MT_RETURN_VALUE|MENU_DYNAMIC_DESC, { .value = val},               \
+        {.menu_get_name_and_icon = & name##_}};
 #define MENUITEM_FUNCTION(name, str, func, callback, icon)                     \
     static const struct menu_callback_with_desc name##_ = {callback,str}; \
     const struct menu_item_ex name   =                                  \
Index: apps/settings_list.c
===================================================================
--- apps/settings_list.c	(revision 12402)
+++ apps/settings_list.c	(working copy)
@@ -624,15 +624,8 @@
 #endif /* HAVE_MMC */
     /* browser */
     CHOICE_SETTING(0, dirfilter, LANG_FILTER, SHOW_SUPPORTED, "show files",
-#ifndef HAVE_TAGCACHE
         "all,supported,music,playlists", NULL, 4, ID2P(LANG_FILTER_ALL),
-        ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC), ID2P(LANG_FILTER_PLAYLIST)
-#else
-        "all,supported,music,playlists,id3 database", NULL, 5, ID2P(LANG_FILTER_ALL),
-        ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC),
-        ID2P(LANG_FILTER_PLAYLIST), ID2P(LANG_FILTER_ID3DB)
-#endif
-       ),
+        ID2P(LANG_FILTER_SUPPORTED), ID2P(LANG_FILTER_MUSIC), ID2P(LANG_FILTER_PLAYLIST)),
     OFFON_SETTING(0,sort_case,LANG_SORT_CASE,false,"sort case",NULL),
     OFFON_SETTING(0,browse_current,LANG_FOLLOW,false,"follow playlist",NULL),
     OFFON_SETTING(0,playlist_viewer_icons,LANG_SHOW_ICONS,true,
@@ -1095,6 +1088,16 @@
 #endif
 #endif
     OFFON_SETTING(0,cuesheet,LANG_CUESHEET_ENABLE,false,"cuesheet support", NULL),
+    {F_T_INT, &global_settings.start_in_screen, LANG_RECORD_TRIGGER_TYPE,
+            INT(1), "start in screen", "previous,root,files,db,wps,menu,"
+#ifdef HAVE_RECORDING
+        ",recording"
+#endif
+#if CONFIG_TUNER
+        ",radio"
+#endif
+                ,UNUSED},
+    SYSTEM_SETTING(NVRAM(1),last_screen,-1),
 };
 
 const int nb_settings = sizeof(settings)/sizeof(*settings);
Index: apps/tagcache.c
===================================================================
--- apps/tagcache.c	(revision 12402)
+++ apps/tagcache.c	(working copy)
@@ -3900,7 +3900,10 @@
 {
     return tc_stat.initialized;
 }
-    
+bool tagcache_is_usable(void)
+{
+    return tc_stat.initialized && tc_stat.ready;
+}
 int tagcache_get_commit_step(void)
 {
     return tc_stat.commit_step;
Index: apps/tagcache.h
===================================================================
--- apps/tagcache.h	(revision 12402)
+++ apps/tagcache.h	(working copy)
@@ -181,6 +181,7 @@
 #endif
 void tagcache_init(void);
 bool tagcache_is_initialized(void);
+bool tagcache_is_usable(void);
 void tagcache_start_scan(void);
 void tagcache_stop_scan(void);
 bool tagcache_update(void);
Index: apps/SOURCES
===================================================================
--- apps/SOURCES	(revision 12402)
+++ apps/SOURCES	(working copy)
@@ -29,6 +29,7 @@
 playlist_catalog.c
 playlist_viewer.c
 plugin.c
+root_menu.c
 screens.c
 settings.c
 settings_list.c
Index: apps/root_menu.c
===================================================================
--- apps/root_menu.c	(revision 0)
+++ apps/root_menu.c	(revision 0)
@@ -0,0 +1,351 @@
+/***************************************************************************
+ *             __________               __   ___.
+ *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+ *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+ *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+ *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+ *                     \/            \/     \/    \/            \/
+ * $Id: main.c 12101 2007-01-24 02:19:22Z jdgordon $
+ *
+ * Copyright (C) 2007 Jonathan Gordon
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include "config.h"
+#include "menu.h"
+#include "root_menu.h"
+#include "lang.h"
+#include "settings.h"
+#include "kernel.h"
+#include "debug.h"
+#include "misc.h"
+#include "rolo.h"
+#include "backdrop.h"
+#include "talk.h"
+
+/* gui api */
+#include "list.h"
+#include "statusbar.h"
+#include "splash.h"
+#include "buttonbar.h"
+#include "textarea.h"
+#include "action.h"
+#include "yesno.h"
+
+#include "main_menu.h"
+#include "tree.h"
+#include "radio.h"
+#include "recording.h"
+#include "gwps-common.h"
+#include "bookmark.h"
+#include "tagtree.h"
+#include "menus/exported_menus.h"
+
+struct root_items {
+    int (*function)(void* param);
+    void* param;
+};
+
+/* NOTE: trying to resume tree position in the DB causes problems.
+        Someone else can try to fix this later */
+static int browser(void* param)
+{
+    static char folder[MAX_PATH] = "/";
+    /* static char database[MAX_PATH] = "/"; */
+    static int  dir_filter;
+    struct tree_context* tc = tree_get_context();
+    static int folder_depth = 0, db_depth = 0;
+    char browse_dir[MAX_PATH];
+    int last_dirfilter = *tc->dirfilter;
+    int ret_val;
+    switch ((int)param)
+    {
+        case GO_TO_FILEBROWSER:
+            snprintf(browse_dir, MAX_PATH, "%s/", folder);
+            dir_filter = last_dirfilter;
+            tc->dirlevel = folder_depth;
+        break;
+        case GO_TO_DBBROWSER:
+            /* snprintf(browse_dir, MAX_PATH, "%s/", database); */
+            if (!tagcache_is_usable())
+            {
+                gui_syncsplash(HZ, true, str(LANG_TAGCACHE_BUSY));
+                return GO_TO_PREVIOUS;
+            }
+            /* strcpy(browse_dir, "/"); */
+            while (db_depth > 0)
+            {
+                tagtree_exit(tc);
+                db_depth--;
+            }
+            dir_filter = SHOW_ID3DB;
+            tc->dirlevel = db_depth;
+        break;
+        case GO_TO_BROWSEPLUGINS:
+            snprintf(browse_dir, MAX_PATH, "%s/", PLUGIN_DIR);
+            dir_filter = SHOW_PLUGINS;
+        break;
+    }
+    ret_val = rockbox_browse(browse_dir, dir_filter);
+    switch ((int)param)
+    {
+        case GO_TO_FILEBROWSER:
+            strcpy(folder, tc->currdir);
+            folder_depth = tc->dirlevel;
+        break;
+        case GO_TO_DBBROWSER:
+            /* strcpy(database, tc->currdir); */
+            *tc->dirfilter = last_dirfilter;
+            db_depth = tc->dirlevel;
+        break;
+    }
+    return ret_val;
+}  
+
+static int menu(void* param)
+{
+    (void)param;
+    return main_menu();
+    
+}
+#ifdef HAVE_RECORDING
+static int recscrn(void* param)
+{
+    (void)param;
+    recording_screen(false);
+    return GO_TO_ROOT;
+}
+#endif
+static int wpsscrn(void* param)
+{
+    int ret_val = GO_TO_PREVIOUS;
+    (void)param;
+    if (audio_status())
+    {
+        ret_val = gui_wps_show();
+    }
+    else if ( global_status.resume_index != -1 )
+    {
+        DEBUGF("Resume index %X offset %X\n",
+               global_status.resume_index,
+               global_status.resume_offset);
+
+#ifdef HAVE_ALARM_MOD
+        if ( rtc_check_alarm_started(true) ) {
+           rtc_enable_alarm(false);
+        }
+#endif
+
+        if (playlist_resume() != -1)
+        {
+            playlist_start(global_status.resume_index,
+                global_status.resume_offset);
+            ret_val = gui_wps_show();
+        }
+    }
+    else 
+    {
+        gui_syncsplash(HZ*2, true, str(LANG_NOTHING_TO_RESUME));
+    }
+#if LCD_DEPTH > 1
+    show_main_backdrop();
+#endif
+    return ret_val;
+}
+#if CONFIG_TUNER
+static int radio(void* param)
+{
+    (void)param;
+    radio_screen();
+    return GO_TO_ROOT;
+}
+#endif
+
+static int load_bmarks(void* param)
+{
+    (void)param;
+    bookmark_mrb_load();
+    return GO_TO_PREVIOUS;
+}
+
+static const struct root_items items[] = {
+    [GO_TO_FILEBROWSER] =   { browser, (void*)GO_TO_FILEBROWSER },
+    [GO_TO_DBBROWSER] =     { browser, (void*)GO_TO_DBBROWSER },
+    [GO_TO_WPS] =           { wpsscrn, NULL },
+    [GO_TO_MAINMENU] =      { menu, NULL },
+    
+#ifdef HAVE_RECORDING
+    [GO_TO_RECSCREEN] =     {  recscrn, NULL },
+#endif
+    
+#if CONFIG_TUNER
+    [GO_TO_FM] =            { radio, NULL },
+#endif
+    
+    [GO_TO_RECENTBMARKS] =  { load_bmarks, NULL }, 
+    [GO_TO_BROWSEPLUGINS] = { browser, (void*)GO_TO_BROWSEPLUGINS }, 
+    
+};
+static const int nb_items = sizeof(items)/sizeof(*items);
+
+#ifdef BOOTFILE
+extern bool boot_changed; /* from tree.c */
+static void check_boot(void)
+{
+    if (boot_changed) {
+        char *lines[]={str(LANG_BOOT_CHANGED), str(LANG_REBOOT_NOW)};
+        struct text_message message={lines, 2};
+        if(gui_syncyesno_run(&message, NULL, NULL)==YESNO_YES)
+            rolo_load("/" BOOTFILE);
+        boot_changed = false;
+    }
+}
+#else
+# define check_boot()
+#endif
+int item_callback(int action, const struct menu_item_ex *this_item) ;
+
+MENUITEM_RETURNVALUE(file_browser, ID2P(LANG_DIR_BROWSER), GO_TO_FILEBROWSER,
+                        NULL, bitmap_icons_6x8[Icon_file_view_menu]);
+MENUITEM_RETURNVALUE(db_browser, ID2P(LANG_TAGCACHE), GO_TO_DBBROWSER, 
+                        NULL, bitmap_icons_6x8[Icon_Audio]);
+MENUITEM_RETURNVALUE(rocks_browser, ID2P(LANG_PLUGINS), GO_TO_BROWSEPLUGINS, 
+                        NULL, bitmap_icons_6x8[Icon_Plugin]);
+char *get_wps_item_name(int selected_item, void * data, char *buffer)
+{
+    (void)selected_item; (void)data; (void)buffer;
+    if (audio_status())
+        return str(LANG_NOW_PLAYING);
+    return str(LANG_RESUME_PLAYBACK);
+}
+MENUITEM_RETURNVALUE_DYNTEXT(wps_item, GO_TO_WPS, NULL, get_wps_item_name, 
+                                NULL, bitmap_icons_6x8[Icon_Playback_menu]);
+#ifdef HAVE_RECORDING
+MENUITEM_RETURNVALUE(rec, ID2P(LANG_RECORDING_MENU), GO_TO_RECSCREEN,  
+                        NULL, bitmap_icons_6x8[Icon_Recording]);
+#endif
+#if CONFIG_TUNER
+MENUITEM_RETURNVALUE(fm, ID2P(LANG_FM_RADIO), GO_TO_FM,  
+                        item_callback, bitmap_icons_6x8[Icon_Radio_screen]);
+#endif
+MENUITEM_RETURNVALUE(menu_, ID2P(LANG_SETTINGS_MENU), GO_TO_MAINMENU,  
+                        NULL, bitmap_icons_6x8[Icon_Submenu_Entered]);
+MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS),
+                        GO_TO_RECENTBMARKS,  item_callback, 
+                        bitmap_icons_6x8[Icon_Bookmark]);
+#ifdef HAVE_LCD_CHARCELLS
+static int do_shutdown(void)
+{
+    sys_poweroff();
+    return 0;
+}
+MENUITEM_FUNCTION(do_shutdown_item, ID2P(LANG_SHUTDOWN), do_shutdown, NULL, NOICON);
+#endif
+MAKE_MENU(root_menu_, ID2P(LANG_ROCKBOX_TITLE),
+            NULL, bitmap_icons_6x8[Icon_Rockbox],
+            &bookmarks, &file_browser, &db_browser,
+            &wps_item, &menu_, 
+#ifdef HAVE_RECORDING
+            &rec, 
+#endif
+#if CONFIG_TUNER
+            &fm,
+#endif
+            &playlist_options, &rocks_browser,  &info_menu
+
+#ifdef HAVE_LCD_CHARCELLS
+            ,&do_shutdown_item
+#endif
+        );
+
+int item_callback(int action, const struct menu_item_ex *this_item) 
+{
+    switch (action)
+    {
+        case ACTION_REQUEST_MENUITEM:
+#if CONFIG_TUNER
+            if (this_item == &fm)
+            {
+                if (radio_hardware_present() == 0)
+                    return ACTION_EXIT_MENUITEM;
+            }
+            else 
+#endif
+                if (this_item == &bookmarks)
+            {
+                if (global_settings.usemrb == 0)
+                    return ACTION_EXIT_MENUITEM;
+            }
+        break;
+    }
+    return action;
+}
+
+void root_menu(void)
+{
+    int previous_browser = GO_TO_FILEBROWSER;
+    int previous_music = GO_TO_WPS;
+    int ret_val = GO_TO_ROOT, last_screen = GO_TO_ROOT;
+    int this_screen = GO_TO_ROOT;
+    int selected = 0;
+
+    if (global_settings.start_in_screen == 0)
+        ret_val = (int)global_status.last_screen;
+    else ret_val = global_settings.start_in_screen - 2;
+    
+    while (true)
+    {
+        check_boot();
+        switch (ret_val)
+        {
+            case GO_TO_ROOT:
+                ret_val = do_menu(&root_menu_, &selected);
+                if (ret_val == GO_TO_PREVIOUS_MUSIC)
+                    ret_val = previous_music;
+                last_screen = GO_TO_ROOT;
+                break;
+            case GO_TO_PREVIOUS:
+                ret_val = last_screen;
+                if (last_screen == GO_TO_ROOT)
+                    continue;
+                break;
+            case GO_TO_PREVIOUS_BROWSER:
+                ret_val = previous_browser;
+                break;
+            case GO_TO_PREVIOUS_MUSIC:
+                ret_val = previous_music;
+                break;
+        }
+        this_screen = ret_val;
+        
+        if (this_screen == GO_TO_FILEBROWSER)
+            previous_browser = GO_TO_FILEBROWSER;
+        else if (this_screen == GO_TO_DBBROWSER)
+            previous_browser = GO_TO_DBBROWSER;
+        else if (this_screen == GO_TO_WPS)
+            previous_music = GO_TO_WPS;
+#if CONFIG_TUNER
+        else if (this_screen == GO_TO_FM)
+            previous_music = GO_TO_FM;
+#endif
+        
+        /* set the global_status.last_screen before entering,
+           if we dont we will always return to the wrong screen on boot */
+        global_status.last_screen = (char)this_screen;
+        status_save();
+        action_signalscreenchange();
+        ret_val = items[this_screen].function(items[this_screen].param);
+        if (ret_val != GO_TO_PREVIOUS)
+            last_screen = this_screen;
+    }
+    return;
+}
Index: apps/root_menu.h
===================================================================
--- apps/root_menu.h	(revision 0)
+++ apps/root_menu.h	(revision 0)
@@ -0,0 +1,44 @@
+/***************************************************************************
+*             __________               __   ___.
+*   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
+*   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
+*   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
+*   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
+*                     \/            \/     \/    \/            \/
+* $Id: main.c 12101 2007-01-24 02:19:22Z jdgordon $
+*
+* Copyright (C) 2007 Jonathan Gordon
+*
+* All files in this archive are subject to the GNU General Public License.
+* See the file COPYING in the source tree root for full license agreement.
+*
+* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+* KIND, either express or implied.
+*
+****************************************************************************/
+#include "config.h"
+void root_menu(void);
+
+enum {
+    GO_TO_PREVIOUS_MUSIC = -4,
+    GO_TO_PREVIOUS_BROWSER = -3,
+    GO_TO_PREVIOUS = -2,
+    GO_TO_ROOT = -1,
+    GO_TO_FILEBROWSER = 0,
+    GO_TO_DBBROWSER,
+    GO_TO_WPS,
+    GO_TO_MAINMENU,
+#ifdef HAVE_RECORDING
+    GO_TO_RECSCREEN,
+#endif
+#ifdef CONFIG_TUNER
+    GO_TO_FM,
+#endif
+    GO_TO_RECENTBMARKS,
+    GO_TO_BROWSEPLUGINS,
+    /* Do Not add any items above here unless you want it to be able to 
+       be the "start screen" after a boot up. The setting in settings_list.c
+       will need editing if this is the case. */
+};
+
+extern const struct menu_item_ex root_menu_;
Index: apps/keymaps/keymap-x5.c
===================================================================
--- apps/keymaps/keymap-x5.c	(revision 12402)
+++ apps/keymaps/keymap-x5.c	(working copy)
@@ -117,7 +117,7 @@
 /* Main Menu Context Menu **/
 static const struct button_mapping button_context_mainmenu[] = {
     { ACTION_NONE,     BUTTON_POWER,                  BUTTON_NONE },
-
+    { ACTION_MENU_WPS, BUTTON_PLAY,                   BUTTON_NONE },
     LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
 }; /* button_context_mainmenu */
 
Index: apps/keymaps/keymap-h1x0_h3x0.c
===================================================================
--- apps/keymaps/keymap-h1x0_h3x0.c	(revision 12402)
+++ apps/keymaps/keymap-h1x0_h3x0.c	(working copy)
@@ -65,6 +65,11 @@
     LAST_ITEM_IN_LIST
 }; /* button_context_standard */
 
+static const struct button_mapping button_context_menu[]  = {
+    { ACTION_MENU_WPS,            BUTTON_ON,       BUTTON_NONE },
+    
+    LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_menu */
 
 static const struct button_mapping button_context_wps[]  = {
     { ACTION_WPS_PLAY,          BUTTON_ON|BUTTON_REL,           BUTTON_ON },
@@ -914,8 +919,9 @@
     switch (context)
     {
         case CONTEXT_STD:
+            return button_context_standard;
         case CONTEXT_MAINMENU:
-            return button_context_standard;
+            return button_context_menu;
         case CONTEXT_WPS:
             return button_context_wps;
             
Index: apps/keymaps/keymap-e200.c
===================================================================
--- apps/keymaps/keymap-e200.c	(revision 12402)
+++ apps/keymaps/keymap-e200.c	(working copy)
@@ -48,6 +48,12 @@
     LAST_ITEM_IN_LIST
 }; /* button_context_standard */
 
+static const struct button_mapping button_context_menu[]  = {
+    { ACTION_MENU_WPS,        BUTTON_UP,       BUTTON_NONE },
+    
+    LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_menu */
+
 static const struct button_mapping button_context_wps[]  = {
     { ACTION_WPS_PLAY,     BUTTON_UP|BUTTON_REL,        BUTTON_UP },
     { ACTION_WPS_STOP,     BUTTON_UP|BUTTON_REPEAT,     BUTTON_UP },
@@ -228,8 +234,9 @@
     switch (context)
     {
         case CONTEXT_STD:
+            return button_context_standard;
         case CONTEXT_MAINMENU:
-            return button_context_standard;
+            return button_context_menu;
             
         case CONTEXT_WPS:
             return button_context_wps;
Index: apps/keymaps/keymap-h10.c
===================================================================
--- apps/keymaps/keymap-h10.c	(revision 12402)
+++ apps/keymaps/keymap-h10.c	(working copy)
@@ -62,6 +62,12 @@
     LAST_ITEM_IN_LIST
 }; /* remote_button_context_standard */
 
+static const struct button_mapping button_context_menu[]  = {
+    { ACTION_MENU_WPS,        BUTTON_PLAY,       BUTTON_NONE },
+    
+    LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+}; /* button_context_menu */
+
 static const struct button_mapping button_context_wps[]  = {
     { ACTION_WPS_PLAY,     BUTTON_PLAY|BUTTON_REL,   BUTTON_PLAY },
     { ACTION_WPS_STOP,     BUTTON_PLAY|BUTTON_REPEAT,BUTTON_PLAY },
@@ -351,8 +357,9 @@
     switch (context)
     {
         case CONTEXT_STD:
+            return button_context_standard;
         case CONTEXT_MAINMENU:
-            return button_context_standard;
+            return button_context_menu;
             
         case CONTEXT_WPS:
             return button_context_wps;
