summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-09-19 09:00:25 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-09-19 09:00:25 +0000
commitc3eb83c6956672e4e639e66fba6f97acbcacd591 (patch)
treec3789d10829052b5102e9b99c88b87a7a339c414 /apps
parenta316213f0fe669b3d956a6936fabd94904a36bb4 (diff)
downloadrockbox-c3eb83c6956672e4e639e66fba6f97acbcacd591.tar.gz
rockbox-c3eb83c6956672e4e639e66fba6f97acbcacd591.tar.bz2
rockbox-c3eb83c6956672e4e639e66fba6f97acbcacd591.zip
Removed F3 handling in the set_() functions. Now the function callback is not called on button timeouts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2332 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 3bc39ed6d2..5d1ffef4a4 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -657,6 +657,7 @@ void set_int(char* string,
int max )
{
bool done = false;
+ int button;
#ifdef HAVE_LCD_BITMAP
if(global_settings.statusbar)
@@ -677,7 +678,8 @@ void set_int(char* string,
#endif
lcd_update();
- switch( button_get_w_tmo(HZ/2) ) {
+ button = button_get_w_tmo(HZ/2);
+ switch(button) {
#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_UP:
case BUTTON_UP | BUTTON_REPEAT:
@@ -710,23 +712,8 @@ void set_int(char* string,
#endif
done = true;
break;
-
-#ifdef HAVE_RECORDER_KEYPAD
- case BUTTON_F3:
-#ifdef HAVE_LCD_BITMAP
- global_settings.statusbar = !global_settings.statusbar;
- settings_save();
- if(global_settings.statusbar)
- lcd_setmargins(0, STATUSBAR_HEIGHT);
- else
- lcd_setmargins(0, 0);
- lcd_clear_display();
- lcd_puts_scroll(0, 0, string);
-#endif
- break;
-#endif
}
- if ( function )
+ if ( function && button != BUTTON_NONE)
function(*variable);
}
lcd_stop_scroll();
@@ -736,6 +723,7 @@ void set_option(char* string, int* variable, char* options[],
int numoptions, void (*function)(int))
{
bool done = false;
+ int button;
#ifdef HAVE_LCD_BITMAP
if(global_settings.statusbar)
@@ -753,7 +741,8 @@ void set_option(char* string, int* variable, char* options[],
#endif
lcd_update();
- switch ( button_get_w_tmo(HZ/2) ) {
+ button = button_get_w_tmo(HZ/2);
+ switch (button) {
#ifdef HAVE_RECORDER_KEYPAD
case BUTTON_UP:
case BUTTON_UP | BUTTON_REPEAT:
@@ -788,24 +777,9 @@ void set_option(char* string, int* variable, char* options[],
#endif
done = true;
break;
-
-#ifdef HAVE_RECORDER_KEYPAD
- case BUTTON_F3:
-#ifdef HAVE_LCD_BITMAP
- global_settings.statusbar = !global_settings.statusbar;
- settings_save();
- if(global_settings.statusbar)
- lcd_setmargins(0, STATUSBAR_HEIGHT);
- else
- lcd_setmargins(0, 0);
- lcd_clear_display();
- lcd_puts_scroll(0, 0, string);
-#endif
- break;
-#endif
}
- if ( function )
+ if ( function && button != BUTTON_NONE)
function(*variable);
}
lcd_stop_scroll();