summaryrefslogtreecommitdiff
path: root/apps/menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2007-02-16 10:40:59 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2007-02-16 10:40:59 +0000
commit6ffd8043cbdbf6c092ac7eb689863a02dc9840ff (patch)
tree3a9e3458ad15fdb73de8c9b6e435bbe0ef0576bc /apps/menu.c
parent750fa4a1a0eb3671b7bd73ba3cb7629b437f8fe5 (diff)
downloadrockbox-6ffd8043cbdbf6c092ac7eb689863a02dc9840ff.tar.gz
rockbox-6ffd8043cbdbf6c092ac7eb689863a02dc9840ff.zip
Removed some unused menu code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12335 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c49
1 files changed, 2 insertions, 47 deletions
diff --git a/apps/menu.c b/apps/menu.c
index 88574caa78..523a92ed74 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -253,51 +253,6 @@ int menu_count(int menu)
253} 253}
254 254
255/* 255/*
256 * Allows a menu item at the current cursor position in "menu"
257 * to be moved up the list
258 */
259
260bool menu_moveup(int menu)
261{
262 struct menu_item swap;
263 int selected=menu_cursor(menu);
264 /* can't be the first item ! */
265 if( selected == 0)
266 return false;
267
268 /* use a temporary variable to do the swap */
269 swap = menus[menu].items[selected - 1];
270 menus[menu].items[selected - 1] = menus[menu].items[selected];
271 menus[menu].items[selected] = swap;
272
273 gui_synclist_select_previous(&(menus[menu].synclist));
274 return true;
275}
276
277/*
278 * Allows a menu item at the current cursor position in "menu" to be moved down the list
279 */
280
281bool menu_movedown(int menu)
282{
283 struct menu_item swap;
284 int selected=menu_cursor(menu);
285 int nb_items=gui_synclist_get_nb_items(&(menus[menu].synclist));
286
287 /* can't be the last item ! */
288 if( selected == nb_items - 1)
289 return false;
290
291 /* use a temporary variable to do the swap */
292 swap = menus[menu].items[selected + 1];
293 menus[menu].items[selected + 1] = menus[menu].items[selected];
294 menus[menu].items[selected] = swap;
295
296 gui_synclist_select_next(&(menus[menu].synclist));
297 return true;
298}
299
300/*
301 * Allows to set the cursor position. Doesn't redraw by itself. 256 * Allows to set the cursor position. Doesn't redraw by itself.
302 */ 257 */
303 258
@@ -530,8 +485,8 @@ int do_menu(const struct menu_item_ex *start_menu)
530 else if ((action == ACTION_STD_CANCEL) || 485 else if ((action == ACTION_STD_CANCEL) ||
531 (action == ACTION_STD_MENU)) 486 (action == ACTION_STD_MENU))
532 { 487 {
533 if (in_stringlist) 488 in_stringlist = false;
534 in_stringlist = false; 489
535 if (stack_top > 0) 490 if (stack_top > 0)
536 { 491 {
537 get_menu_callback(menu,&menu_callback); 492 get_menu_callback(menu,&menu_callback);