From 224c0a13ebb5828b9bc06a9c1c23ae17f0ac19f9 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Tue, 15 Aug 2006 12:27:07 +0000 Subject: Finally, the new button action system is here, thanks to Jonathan Gordon. Some button mappings have changed and other things may break. Comments should go to the forum, http://forums.rockbox.org/index.php?topic=5829.0 or the mailing list. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10582 a1c6a512-1295-4272-9138-f99709370657 --- apps/main_menu.c | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) (limited to 'apps/main_menu.c') diff --git a/apps/main_menu.c b/apps/main_menu.c index bce6e20976..04527f9329 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -24,7 +24,7 @@ #include "tree.h" #include "lcd.h" #include "font.h" -#include "button.h" +#include "action.h" #include "kernel.h" #include "main_menu.h" #include "debug_menu.h" @@ -237,48 +237,22 @@ bool show_info(void) #endif /* Wait for a key to be pushed */ - key = button_get_w_tmo(HZ*5); + key = get_action(CONTEXT_MAINMENU,HZ*5); switch(key) { - case SETTINGS_OK: -#ifdef SETTINGS_RC_OK - case SETTINGS_RC_OK: -#endif -#ifdef SETTINGS_OK2 - case SETTINGS_OK2: -#endif -#ifdef SETTINGS_RC_OK2 - case SETTINGS_RC_OK2: -#endif -#ifdef SETTINGS_RC_CANCEL - case SETTINGS_RC_CANCEL: -#endif - case SETTINGS_CANCEL: + case ACTION_STD_CANCEL: done = true; break; #ifdef HAVE_LCD_CHARCELLS - case SETTINGS_INC: - case SETTINGS_DEC: -#ifdef SETTINGS_RC_INC - case SETTINGS_RC_INC: -#endif -#ifdef SETTINGS_RC_DEC - case SETTINGS_RC_DEC: -#endif + case ACTION_STD_NEXT: + case ACTION_STD_PREV: page = (page == 0) ? 1 : 0; break; #endif #ifndef SIMULATOR -#ifdef SETTINGS_RC_ACCEPT - case SETTINGS_RC_ACCEPT: -#endif -#ifdef SETTINGS_ACCEPT - case SETTINGS_ACCEPT: -#else - case SETTINGS_INC: /* Ondio */ -#endif + case ACTION_STD_OK: gui_syncsplash(0, true, str(LANG_DIRCACHE_BUILDING)); fat_recalc_free(IF_MV(0)); #ifdef HAVE_MULTIVOLUME @@ -295,7 +269,7 @@ bool show_info(void) break; } } - + action_signalscreenchange(); return false; } -- cgit v1.2.3