Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 23rd, 2011  |  syntax: None  |  size: 5.47 KB  |  views: 58  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
  2. index c5758d1..0be3345 100644
  3. --- a/apps/menus/main_menu.c
  4. +++ b/apps/menus/main_menu.c
  5. @@ -108,6 +108,42 @@ MAKE_MENU(manage_settings, ID2P(LANG_MANAGE_MENU), NULL, Icon_Config,
  6.  /**********************************/
  7.  
  8.  /***********************************/
  9. +/*    MAIN MENU                    */
  10. +
  11. +
  12. +#ifdef HAVE_LCD_CHARCELLS
  13. +static int mainmenu_callback(int action,const struct menu_item_ex *this_item)
  14. +{
  15. +    (void)this_item;
  16. +    switch (action)
  17. +    {
  18. +        case ACTION_ENTER_MENUITEM:
  19. +            status_set_param(true);
  20. +            break;
  21. +        case ACTION_EXIT_MENUITEM:
  22. +            status_set_param(false);
  23. +            break;
  24. +    }
  25. +    return action;
  26. +}
  27. +#else
  28. +#define mainmenu_callback NULL
  29. +#endif
  30. +MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback,
  31. +        Icon_Submenu_Entered,
  32. +        &sound_settings,
  33. +        &playback_settings,
  34. +        &settings_menu_item, &theme_menu,
  35. +#ifdef HAVE_RECORDING
  36. +        &recording_settings,
  37. +#endif
  38. +        &manage_settings,
  39. +        );
  40. +/*    MAIN MENU                    */
  41. +/***********************************/
  42. +
  43. +
  44. +/***********************************/
  45.  /*      INFO MENU                  */
  46.  
  47.  
  48. @@ -441,6 +477,7 @@ MENUITEM_FUNCTION(debug_menu_item, 0, ID2P(LANG_DEBUG),
  49.                     (menu_function)debug_menu, NULL, NULL, Icon_NOICON);
  50.  
  51.  MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu,
  52. +          &main_menu_,
  53.  #if CONFIG_RTC
  54.            &timedate_item,
  55.  #endif
  56. @@ -451,39 +488,3 @@ MAKE_MENU(info_menu, ID2P(LANG_SYSTEM), 0, Icon_System_menu,
  57.            &debug_menu_item);
  58.  /*      INFO MENU                  */
  59.  /***********************************/
  60. -
  61. -/***********************************/
  62. -/*    MAIN MENU                    */
  63. -
  64. -
  65. -#ifdef HAVE_LCD_CHARCELLS
  66. -static int mainmenu_callback(int action,const struct menu_item_ex *this_item)
  67. -{
  68. -    (void)this_item;
  69. -    switch (action)
  70. -    {
  71. -        case ACTION_ENTER_MENUITEM:
  72. -            status_set_param(true);
  73. -            break;
  74. -        case ACTION_EXIT_MENUITEM:
  75. -            status_set_param(false);
  76. -            break;
  77. -    }
  78. -    return action;
  79. -}
  80. -#else
  81. -#define mainmenu_callback NULL
  82. -#endif
  83. -MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback,
  84. -        Icon_Submenu_Entered,
  85. -        &sound_settings,
  86. -        &playback_settings,
  87. -        &settings_menu_item, &theme_menu,
  88. -#ifdef HAVE_RECORDING
  89. -        &recording_settings,
  90. -#endif
  91. -        &manage_settings,
  92. -        );
  93. -/*    MAIN MENU                    */
  94. -/***********************************/
  95. -
  96. diff --git a/apps/onplay.c b/apps/onplay.c
  97. index 03981c6..5a64224 100644
  98. --- a/apps/onplay.c
  99. +++ b/apps/onplay.c
  100. @@ -1361,8 +1361,6 @@ int onplay(char* file, int attr, int from, bool hotkey)
  101.          case GO_TO_WPS:
  102.              return ONPLAY_START_PLAY;
  103.          case GO_TO_ROOT:
  104. -        case GO_TO_MAINMENU:
  105. -            return ONPLAY_MAINMENU;
  106.          case GO_TO_PLAYLIST_VIEWER:
  107.              return ONPLAY_PLAYLIST;
  108.  #ifdef HAVE_PICTUREFLOW_INTEGRATION
  109. diff --git a/apps/root_menu.c b/apps/root_menu.c
  110. index 472c1db..bd9c4aa 100644
  111. --- a/apps/root_menu.c
  112. +++ b/apps/root_menu.c
  113. @@ -387,7 +387,6 @@ extern struct menu_item_ex
  114.  #ifdef HAVE_TAGCACHE
  115.          tagcache_menu,
  116.  #endif
  117. -        main_menu_,
  118.          manage_settings,
  119.          plugin_menu,
  120.          playlist_options,
  121. @@ -399,9 +398,6 @@ static const struct root_items items[] = {
  122.      [GO_TO_DBBROWSER] =     { browser, (void*)GO_TO_DBBROWSER, &tagcache_menu },
  123.  #endif
  124.      [GO_TO_WPS] =           { wpsscrn, NULL, &playback_settings },
  125. -    [GO_TO_MAINMENU] =      { miscscrn, (struct menu_item_ex*)&main_menu_,
  126. -                                                            &manage_settings },
  127. -    
  128.  #ifdef HAVE_RECORDING
  129.      [GO_TO_RECSCREEN] =     {  recscrn, NULL, &recording_settings_menu },
  130.  #endif
  131. @@ -451,8 +447,6 @@ MENUITEM_RETURNVALUE(rec, ID2P(LANG_RECORDING), GO_TO_RECSCREEN,
  132.  MENUITEM_RETURNVALUE(fm, ID2P(LANG_FM_RADIO), GO_TO_FM,  
  133.                          item_callback, Icon_Radio_screen);
  134.  #endif
  135. -MENUITEM_RETURNVALUE(menu_, ID2P(LANG_SETTINGS), GO_TO_MAINMENU,  
  136. -                        NULL, Icon_Submenu_Entered);
  137.  MENUITEM_RETURNVALUE(bookmarks, ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS),
  138.                          GO_TO_RECENTBMARKS,  item_callback,
  139.                          Icon_Bookmark);
  140. @@ -481,14 +475,14 @@ MAKE_MENU(root_menu_, ID2P(LANG_ROCKBOX_TITLE),
  141.  #ifdef HAVE_TAGCACHE
  142.              &db_browser,
  143.  #endif
  144. -            &wps_item, &menu_,
  145. +            &playlists, &wps_item,
  146.  #ifdef HAVE_RECORDING
  147.              &rec,
  148.  #endif
  149.  #if CONFIG_TUNER
  150.              &fm,
  151.  #endif
  152. -            &playlists, &rocks_browser,  &system_menu_
  153. +            &rocks_browser,  &system_menu_
  154.  
  155.  #if CONFIG_KEYPAD == PLAYER_PAD
  156.              ,&do_shutdown_item
  157. @@ -550,8 +544,6 @@ static inline int load_screen(int screen)
  158.  
  159.      if (screen == GO_TO_BROWSEPLUGINS)
  160.          activity = ACTIVITY_PLUGINBROWSER;
  161. -    else if (screen == GO_TO_MAINMENU)
  162. -        activity = ACTIVITY_SETTINGS;
  163.      else if (screen == GO_TO_SYSTEM_SCREEN)
  164.          activity =  ACTIVITY_SYSTEMSCREEN;
  165.  
  166. diff --git a/apps/root_menu.h b/apps/root_menu.h
  167. index 2ffdced..0ceb5e9 100644
  168. --- a/apps/root_menu.h
  169. +++ b/apps/root_menu.h
  170. @@ -41,7 +41,6 @@ enum {
  171.      GO_TO_DBBROWSER,
  172.  #endif
  173.      GO_TO_WPS,
  174. -    GO_TO_MAINMENU,
  175.  #ifdef HAVE_RECORDING
  176.      GO_TO_RECSCREEN,
  177.  #endif
clone this paste RAW Paste Data