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

Untitled

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