Removed some unused menu code

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12335 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2007-02-16 10:40:59 +00:00
parent 750fa4a1a0
commit 6ffd8043cb
3 changed files with 4 additions and 53 deletions

View file

@ -252,51 +252,6 @@ int menu_count(int menu)
return gui_synclist_get_nb_items(&(menus[menu].synclist));
}
/*
* Allows a menu item at the current cursor position in "menu"
* to be moved up the list
*/
bool menu_moveup(int menu)
{
struct menu_item swap;
int selected=menu_cursor(menu);
/* can't be the first item ! */
if( selected == 0)
return false;
/* use a temporary variable to do the swap */
swap = menus[menu].items[selected - 1];
menus[menu].items[selected - 1] = menus[menu].items[selected];
menus[menu].items[selected] = swap;
gui_synclist_select_previous(&(menus[menu].synclist));
return true;
}
/*
* Allows a menu item at the current cursor position in "menu" to be moved down the list
*/
bool menu_movedown(int menu)
{
struct menu_item swap;
int selected=menu_cursor(menu);
int nb_items=gui_synclist_get_nb_items(&(menus[menu].synclist));
/* can't be the last item ! */
if( selected == nb_items - 1)
return false;
/* use a temporary variable to do the swap */
swap = menus[menu].items[selected + 1];
menus[menu].items[selected + 1] = menus[menu].items[selected];
menus[menu].items[selected] = swap;
gui_synclist_select_next(&(menus[menu].synclist));
return true;
}
/*
* Allows to set the cursor position. Doesn't redraw by itself.
*/
@ -530,8 +485,8 @@ int do_menu(const struct menu_item_ex *start_menu)
else if ((action == ACTION_STD_CANCEL) ||
(action == ACTION_STD_MENU))
{
if (in_stringlist)
in_stringlist = false;
in_stringlist = false;
if (stack_top > 0)
{
get_menu_callback(menu,&menu_callback);

View file

@ -386,8 +386,6 @@ static const struct plugin_api rockbox_api = {
menu_description,
menu_delete,
menu_count,
menu_moveup,
menu_movedown,
menu_draw,
menu_insert,
menu_set_cursor,

View file

@ -110,12 +110,12 @@
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
#define PLUGIN_API_VERSION 43
#define PLUGIN_API_VERSION 44
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
#define PLUGIN_MIN_API_VERSION 43
#define PLUGIN_MIN_API_VERSION 44
/* plugin return codes */
enum plugin_status {
@ -484,8 +484,6 @@ struct plugin_api {
char* (*menu_description)(int menu, int position);
void (*menu_delete)(int menu, int position);
int (*menu_count)(int menu);
bool (*menu_moveup)(int menu);
bool (*menu_movedown)(int menu);
void (*menu_draw)(int menu);
void (*menu_insert)(int menu, int position, char *desc, bool (*function) (void));
void (*menu_set_cursor)(int menu, int position);