On 23 August 2011 18:29, Jonathan Gordon <[email protected]> wrote:
> Hi,
> This is my view on the other thread about moving the Time & Date menu.
> Get rid of the System menu. it is entirely pointless.
>
> The items hat will be in it once T&D is moved (which sounds like a
> given) are: "Rockbox info", "credits", "running time", "debug".
> Rockbox info has very little actually useful information, credits can
> be got from the plugins menu, running time is nothing more than a
> waste of binary space, and debug serves basically no purpose and
> should be disabled by default (We've already talked about disabling it
> in release builds).
>
> What I'd much prefer to see is the current "settings" menu be renamed
> to "system" and either: 1) "settings" be a submenu, or 2) just copy
> all the items from the current "system" menu into the new
> "settings/system" menu.
>
> The main menu order should then be:
> * (hidden bookmarks)
> * Files
> * Database
> * playlist catalogue
> * resume playback
> * plugins
> * system
>
> and now the main menu makes some sense. Items are prioritized from the
> top down starting with ways to get to your music on to less important
> items. Resume playback i pushed down because just about all targets
> have a dedicated button to get there. I'd be happy to swap plugins and
> system.
>
> If the "system" menu didnt have "settings" as a submenu it would look
> like this (making it very obvious what is and isnt a setting):
> * rockbox info
> * sound settings
> * playback settings
> * general settings
> * Time & Date
> * theme settings
> * manage settings
> * running time (I'd rather nuke this though)
> * debug menu (remove also)
> * Credits
>
>
> Jonathan
>
As usual, the only way to get any discussion is to commit and fend off
the hordes in IRC after. So, This patch will be commited tonight (if I
have time) or sometime over the weekend.
All this does is move the contents of the settings menu into the
system menu, and move the system menu to where settings currently is.
It also changed the "rockbox info" icon. No other changes.
With this done the sleep timer patch can put all its settings in the
T&D screen with no issues.
Jonathan
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index c5758d1..91d6411 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -108,6 +108,32 @@ MAKE_MENU(manage_settings, ID2P(LANG_MANAGE_MENU), NULL, Icon_Config,
/**********************************/
/***********************************/
+/* MAIN MENU */
+
+
+#ifdef HAVE_LCD_CHARCELLS
+static int mainmenu_callback(int action,const struct menu_item_ex *this_item)
+{
+ (void)this_item;
+ switch (action)
+ {
+ case ACTION_ENTER_MENUITEM:
+ status_set_param(true);
+ break;
+ case ACTION_EXIT_MENUITEM:
+ status_set_param(false);
+ break;
+ }
+ return action;
+}
+#else
+#define mainmenu_callback NULL
+#endif
+/* MAIN MENU */
+/***********************************/
+
+
+/***********************************/
/* INFO MENU */
@@ -390,7 +416,7 @@ static bool show_info(void)
return simplelist_show_list(&info);
}
MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_ROCKBOX_INFO),
- (menu_function)show_info, NULL, NULL, Icon_NOICON);
+ (menu_function)show_info, NULL, NULL, Icon_Rockbox);
/* sleep Menu */
@@ -440,50 +466,22 @@ MENUITEM_FUNCTION(show_runtime_item, 0, ID2P(LANG_RUNNING_TIME),
MENUITEM_FUNCTION(debug_menu_item, 0, ID2P(LANG_DEBUG),
(menu_function)debug_menu, NULL, NULL, Icon_NOICON);
-MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu,
+MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), mainmenu_callback, Icon_System_menu,
+ &show_info_item,
+ &sound_settings,
+ &playback_settings,
+ &settings_menu_item, &theme_menu,
+#ifdef HAVE_RECORDING
+ &recording_settings,
+#endif
+ &manage_settings,
#if CONFIG_RTC
&timedate_item,
#endif
- &show_info_item, &show_credits_item, &show_runtime_item,
#if CONFIG_RTC == 0
&sleep_timer_call,
#endif
+ &show_credits_item, &show_runtime_item,
&debug_menu_item);
/* INFO MENU */
/***********************************/
-
-/***********************************/
-/* MAIN MENU */
-
-
-#ifdef HAVE_LCD_CHARCELLS
-static int mainmenu_callback(int action,const struct menu_item_ex *this_item)
-{
- (void)this_item;
- switch (action)
- {
- case ACTION_ENTER_MENUITEM:
- status_set_param(true);
- break;
- case ACTION_EXIT_MENUITEM:
- status_set_param(false);
- break;
- }
- return action;
-}
-#else
-#define mainmenu_callback NULL
-#endif
-MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback,
- Icon_Submenu_Entered,
- &sound_settings,
- &playback_settings,
- &settings_menu_item, &theme_menu,
-#ifdef HAVE_RECORDING
- &recording_settings,
-#endif
- &manage_settings,
- );
-/* MAIN MENU */
-/***********************************/
-
diff --git a/apps/onplay.c b/apps/onplay.c
index 03981c6..5a64224 100644
--- a/apps/onplay.c
+++ b/apps/onplay.c
@@ -1361,8 +1361,6 @@ int onplay(char* file, int attr, int from, bool hotkey)
case GO_TO_WPS:
return ONPLAY_START_PLAY;
case GO_TO_ROOT:
- case GO_TO_MAINMENU:
- return ONPLAY_MAINMENU;
case GO_TO_PLAYLIST_VIEWER:
return ONPLAY_PLAYLIST;
#ifdef HAVE_PICTUREFLOW_INTEGRATION
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 472c1db..c82bab2 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -387,7 +387,6 @@ extern struct menu_item_ex
#ifdef HAVE_TAGCACHE
tagcache_menu,
#endif
- main_menu_,
manage_settings,
plugin_menu,
playlist_options,
@@ -399,9 +398,6 @@ static const struct root_items items[] = {
[GO_TO_DBBROWSER] = { browser, (void*)GO_TO_DBBROWSER, &tagcache_menu },
#endif
[GO_TO_WPS] = { wpsscrn, NULL, &playback_settings },
- [GO_TO_MAINMENU] = { miscscrn, (struct menu_item_ex*)&main_menu_,
- &manage_settings },
-
#ifdef HAVE_RECORDING
[GO_TO_RECSCREEN] = { recscrn, NULL, &recording_settings_menu },
#endif
@@ -451,8 +447,6 @@ MENUITEM_RETURNVALUE(rec, ID2P(LANG_RECORDING), GO_TO_RECSCREEN,
MENUITEM_RETURNVALUE(fm, ID2P(LANG_FM_RADIO), GO_TO_FM,
item_callback, Icon_Radio_screen);
#endif
-MENUITEM_RETURNVALUE(menu_, ID2P(LANG_SETTINGS), GO_TO_MAINMENU,
- NULL, Icon_Submenu_Entered);
MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS),
GO_TO_RECENTBMARKS, item_callback,
Icon_Bookmark);
@@ -481,14 +475,14 @@ MAKE_MENU(root_menu_, ID2P(LANG_ROCKBOX_TITLE),
#ifdef HAVE_TAGCACHE
&db_browser,
#endif
- &wps_item, &menu_,
+ &wps_item, &system_menu_,
#ifdef HAVE_RECORDING
&rec,
#endif
#if CONFIG_TUNER
&fm,
#endif
- &playlists, &rocks_browser, &system_menu_
+ &playlists, &rocks_browser
#if CONFIG_KEYPAD == PLAYER_PAD
,&do_shutdown_item
@@ -550,8 +544,6 @@ static inline int load_screen(int screen)
if (screen == GO_TO_BROWSEPLUGINS)
activity = ACTIVITY_PLUGINBROWSER;
- else if (screen == GO_TO_MAINMENU)
- activity = ACTIVITY_SETTINGS;
else if (screen == GO_TO_SYSTEM_SCREEN)
activity = ACTIVITY_SYSTEMSCREEN;
diff --git a/apps/root_menu.h b/apps/root_menu.h
index 2ffdced..0ceb5e9 100644
--- a/apps/root_menu.h
+++ b/apps/root_menu.h
@@ -41,7 +41,6 @@ enum {
GO_TO_DBBROWSER,
#endif
GO_TO_WPS,
- GO_TO_MAINMENU,
#ifdef HAVE_RECORDING
GO_TO_RECSCREEN,
#endif