diff options
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r-- | apps/root_menu.c | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index 27242c9797..4dca1f3541 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -271,14 +271,8 @@ static int browser(void* param) | |||
271 | #endif | 271 | #endif |
272 | } | 272 | } |
273 | return ret_val; | 273 | return ret_val; |
274 | } | ||
275 | |||
276 | static int menu(void* param) | ||
277 | { | ||
278 | (void)param; | ||
279 | return do_menu(NULL, 0, NULL, false); | ||
280 | |||
281 | } | 274 | } |
275 | |||
282 | #ifdef HAVE_RECORDING | 276 | #ifdef HAVE_RECORDING |
283 | static int recscrn(void* param) | 277 | static int recscrn(void* param) |
284 | { | 278 | { |
@@ -323,6 +317,18 @@ static int radio(void* param) | |||
323 | } | 317 | } |
324 | #endif | 318 | #endif |
325 | 319 | ||
320 | static int miscscrn(void * param) | ||
321 | { | ||
322 | const struct menu_item_ex *menu = (const struct menu_item_ex*)param; | ||
323 | switch (do_menu(menu, NULL, NULL, false)) | ||
324 | { | ||
325 | case GO_TO_PLAYLIST_VIEWER: | ||
326 | return GO_TO_PLAYLIST_VIEWER; | ||
327 | default: | ||
328 | return GO_TO_ROOT; | ||
329 | } | ||
330 | } | ||
331 | |||
326 | static int playlist_view(void * param) | 332 | static int playlist_view(void * param) |
327 | { | 333 | { |
328 | (void)param; | 334 | (void)param; |
@@ -391,10 +397,13 @@ extern struct menu_item_ex | |||
391 | #ifdef HAVE_TAGCACHE | 397 | #ifdef HAVE_TAGCACHE |
392 | tagcache_menu, | 398 | tagcache_menu, |
393 | #endif | 399 | #endif |
400 | main_menu_, | ||
394 | manage_settings, | 401 | manage_settings, |
395 | recording_settings_menu, | 402 | recording_settings_menu, |
396 | radio_settings_menu, | 403 | radio_settings_menu, |
397 | bookmark_settings_menu, | 404 | bookmark_settings_menu, |
405 | playlist_options, | ||
406 | info_menu, | ||
398 | system_menu; | 407 | system_menu; |
399 | static const struct root_items items[] = { | 408 | static const struct root_items items[] = { |
400 | [GO_TO_FILEBROWSER] = { browser, (void*)GO_TO_FILEBROWSER, &file_menu}, | 409 | [GO_TO_FILEBROWSER] = { browser, (void*)GO_TO_FILEBROWSER, &file_menu}, |
@@ -402,7 +411,8 @@ static const struct root_items items[] = { | |||
402 | [GO_TO_DBBROWSER] = { browser, (void*)GO_TO_DBBROWSER, &tagcache_menu }, | 411 | [GO_TO_DBBROWSER] = { browser, (void*)GO_TO_DBBROWSER, &tagcache_menu }, |
403 | #endif | 412 | #endif |
404 | [GO_TO_WPS] = { wpsscrn, NULL, &playback_settings }, | 413 | [GO_TO_WPS] = { wpsscrn, NULL, &playback_settings }, |
405 | [GO_TO_MAINMENU] = { menu, NULL, &manage_settings }, | 414 | [GO_TO_MAINMENU] = { miscscrn, (struct menu_item_ex*)&main_menu_, |
415 | &manage_settings }, | ||
406 | 416 | ||
407 | #ifdef HAVE_RECORDING | 417 | #ifdef HAVE_RECORDING |
408 | [GO_TO_RECSCREEN] = { recscrn, NULL, &recording_settings_menu }, | 418 | [GO_TO_RECSCREEN] = { recscrn, NULL, &recording_settings_menu }, |
@@ -414,7 +424,9 @@ static const struct root_items items[] = { | |||
414 | 424 | ||
415 | [GO_TO_RECENTBMARKS] = { load_bmarks, NULL, &bookmark_settings_menu }, | 425 | [GO_TO_RECENTBMARKS] = { load_bmarks, NULL, &bookmark_settings_menu }, |
416 | [GO_TO_BROWSEPLUGINS] = { plugins_menu, NULL, NULL }, | 426 | [GO_TO_BROWSEPLUGINS] = { plugins_menu, NULL, NULL }, |
427 | [GO_TO_PLAYLISTS_SCREEN] = { miscscrn, &playlist_options, NULL }, | ||
417 | [GO_TO_PLAYLIST_VIEWER] = { playlist_view, NULL, NULL }, | 428 | [GO_TO_PLAYLIST_VIEWER] = { playlist_view, NULL, NULL }, |
429 | [GO_TO_SYSTEM_SCREEN] = { miscscrn, &info_menu, &system_menu }, | ||
418 | 430 | ||
419 | }; | 431 | }; |
420 | static const int nb_items = sizeof(items)/sizeof(*items); | 432 | static const int nb_items = sizeof(items)/sizeof(*items); |
@@ -451,6 +463,11 @@ MENUITEM_RETURNVALUE(menu_, ID2P(LANG_SETTINGS), GO_TO_MAINMENU, | |||
451 | MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS), | 463 | MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS), |
452 | GO_TO_RECENTBMARKS, item_callback, | 464 | GO_TO_RECENTBMARKS, item_callback, |
453 | Icon_Bookmark); | 465 | Icon_Bookmark); |
466 | MENUITEM_RETURNVALUE(playlists, ID2P(LANG_PLAYLISTS), GO_TO_PLAYLISTS_SCREEN, | ||
467 | NULL, Icon_Playlist); | ||
468 | MENUITEM_RETURNVALUE(system_menu_, ID2P(LANG_SYSTEM), GO_TO_SYSTEM_SCREEN, | ||
469 | NULL, Icon_System_menu); | ||
470 | |||
454 | #ifdef HAVE_LCD_CHARCELLS | 471 | #ifdef HAVE_LCD_CHARCELLS |
455 | static int do_shutdown(void) | 472 | static int do_shutdown(void) |
456 | { | 473 | { |
@@ -478,7 +495,7 @@ MAKE_MENU(root_menu_, ID2P(LANG_ROCKBOX_TITLE), | |||
478 | #if CONFIG_TUNER | 495 | #if CONFIG_TUNER |
479 | &fm, | 496 | &fm, |
480 | #endif | 497 | #endif |
481 | &playlist_options, &rocks_browser, &info_menu | 498 | &playlists, &rocks_browser, &system_menu_ |
482 | 499 | ||
483 | #ifdef HAVE_LCD_CHARCELLS | 500 | #ifdef HAVE_LCD_CHARCELLS |
484 | ,&do_shutdown_item | 501 | ,&do_shutdown_item |