summaryrefslogtreecommitdiffstats
path: root/apps/menus
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-03-01 11:14:46 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-03-01 11:14:46 +0000
commit91cb68a1fb5b019aaebf77fae6506bb807059b65 (patch)
treeea3e56a915479ecad597cc0769ca24c2e2bcf686 /apps/menus
parentd94c7d3f7679789cce916d213b39f3b54dc0216b (diff)
downloadrockbox-91cb68a1fb5b019aaebf77fae6506bb807059b65.tar.gz
rockbox-91cb68a1fb5b019aaebf77fae6506bb807059b65.zip
Introducing the root menu!
Blind users: get a new voice file as there are lots of lang changes and new strings. FS#6630 or RootMenu on the wiki for more info. complaints to /dev/null :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12528 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/eq_menu.c2
-rw-r--r--apps/menus/exported_menus.h8
-rw-r--r--apps/menus/main_menu.c63
-rw-r--r--apps/menus/playback_menu.c5
-rw-r--r--apps/menus/playlist_menu.c8
-rw-r--r--apps/menus/recording_menu.c6
-rw-r--r--apps/menus/settings_menu.c5
-rw-r--r--apps/menus/sound_menu.c2
8 files changed, 22 insertions, 77 deletions
diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c
index c66e5a20c0..25ab170169 100644
--- a/apps/menus/eq_menu.c
+++ b/apps/menus/eq_menu.c
@@ -187,7 +187,7 @@ int do_center_band_menu(void* param)
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,
diff --git a/apps/menus/exported_menus.h b/apps/menus/exported_menus.h
index f6b6f5a708..a4f8512a73 100644
--- a/apps/menus/exported_menus.h
+++ b/apps/menus/exported_menus.h
@@ -28,12 +28,14 @@ extern const struct menu_item_ex
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 */
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index b367fded35..d986436311 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -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,9 +46,6 @@
#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 {
@@ -59,12 +53,11 @@ struct browse_folder_info {
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*)param;
return rockbox_browse(info->dir, info->show_options);
}
@@ -384,26 +377,6 @@ MAKE_MENU(info_menu, ID2P(LANG_INFO), 0, bitmap_icons_6x8[Icon_Questionmark],
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]);
-
-#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)
@@ -423,42 +396,14 @@ int mainmenu_callback(int action,const struct menu_item_ex *this_item)
#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,
-#endif
- &playlist_menu_item, &browse_plugins, &info_menu
-#ifdef HAVE_LCD_CHARCELLS
- ,&do_shutdown_item
+ &recording_settings,
#endif
);
/* 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_REQUEST_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;
-}
diff --git a/apps/menus/playback_menu.c b/apps/menus/playback_menu.c
index 6345b67ace..ae735609a8 100644
--- a/apps/menus/playback_menu.c
+++ b/apps/menus/playback_menu.c
@@ -57,7 +57,6 @@ int playback_callback(int action,const struct menu_item_ex *this_item);
MENUITEM_SETTING(shuffle_item, &global_settings.playlist_shuffle, playback_callback);
MENUITEM_SETTING(repeat_mode, &global_settings.repeat_mode, playback_callback);
MENUITEM_SETTING(play_selected, &global_settings.play_selected, NULL);
-MENUITEM_SETTING(resume, &global_settings.resume, NULL);
MENUITEM_SETTING(ff_rewind_accel, &global_settings.ff_rewind_accel, NULL);
MENUITEM_SETTING(ff_rewind_min_step, &global_settings.ff_rewind_min_step, NULL);
@@ -108,7 +107,7 @@ int replaygain_callback(int action,const struct menu_item_ex *this_item)
(void)this_item;
switch (action)
{
- case ACTION_EXIT_MENUITEM: /* on exit */
+ case ACTION_EXIT_MENUITEM: /* on exit */
dsp_set_replaygain();
break;
}
@@ -172,7 +171,7 @@ MAKE_MENU(unplug_menu, ID2P(LANG_UNPLUG), 0, NOICON,
MAKE_MENU(playback_menu_item,ID2P(LANG_PLAYBACK),0,
bitmap_icons_6x8[Icon_Playback_menu],
- &shuffle_item, &repeat_mode, &play_selected, &resume,
+ &shuffle_item, &repeat_mode, &play_selected,
&ff_rewind_settings_menu,
&buffer_margin, &fade_on_stop, &party_mode,
diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c
index f179265279..d0d491f74e 100644
--- a/apps/menus/playlist_menu.c
+++ b/apps/menus/playlist_menu.c
@@ -73,12 +73,14 @@ MENUITEM_FUNCTION(catalog, ID2P(LANG_CATALOG),
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);
}
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c
index 0b4ba52715..028b57bb99 100644
--- a/apps/menus/recording_menu.c
+++ b/apps/menus/recording_menu.c
@@ -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
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index 92c169e43a..35b7e2bf2f 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -281,9 +281,11 @@ MENUITEM_SETTING(line_in, &global_settings.line_in, linein_callback);
#if CONFIG_CHARGING
MENUITEM_SETTING(car_adapter_mode, &global_settings.car_adapter_mode, NULL);
#endif
+MENUITEM_SETTING(start_screen, &global_settings.start_in_screen, NULL);
MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
0, bitmap_icons_6x8[Icon_System_menu],
+ &start_screen,
#ifndef SIMULATOR
&battery_menu,
#endif
@@ -385,7 +387,8 @@ MENUITEM_FUNCTION(browse_langs, ID2P(LANG_LANGUAGE), language_browse,
MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0,
bitmap_icons_6x8[Icon_General_settings_menu],
- &playback_menu_item, &file_menu, &display_menu, &system_menu,
+ &playback_menu_item, &playlist_settings, &file_menu,
+ &display_menu, &system_menu,
&bookmark_settings_menu, &browse_langs, &voice_settings_menu );
/* SETTINGS MENU */
/***********************************/
diff --git a/apps/menus/sound_menu.c b/apps/menus/sound_menu.c
index 287b3ec904..1fa8ec6d02 100644
--- a/apps/menus/sound_menu.c
+++ b/apps/menus/sound_menu.c
@@ -113,5 +113,5 @@ MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, bitmap_icons_6x8[Icon
bool sound_menu(void)
{
- return do_menu(&sound_settings);
+ return do_menu(&sound_settings, 0);
}