diff --git a/apps/menu.c b/apps/menu.c index 88574caa78..523a92ed74 100644 --- a/apps/menu.c +++ b/apps/menu.c @@ -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); diff --git a/apps/plugin.c b/apps/plugin.c index e11fd5cffe..dd82a8da75 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -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, diff --git a/apps/plugin.h b/apps/plugin.h index 00c4326663..daab88eda1 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -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);