--- settings.c 21 Apr 2004 06:49:12 -0000 1.202 +++ settings.c 24 Apr 2004 18:41:01 -0000 @@ -52,6 +52,7 @@ #include "font.h" #include "peakmeter.h" #include "hwcompat.h" +#include "recorder/widgets.h" #endif #include "lang.h" #include "language.h" @@ -1851,32 +1852,66 @@ int oldval = 0; int index, oldindex = -1; /* remember what we said */ +#ifdef HAVE_LCD_BITMAP + int char_width = -1; + int char_height = -1; +#endif + if (type==INT) oldval=*intvar; else oldval=*boolvar; + lcd_clear_display(); + #ifdef HAVE_LCD_BITMAP - if(global_settings.statusbar) - lcd_setmargins(0, STATUSBAR_HEIGHT); - else - lcd_setmargins(0, 0); -#endif - lcd_clear_display(); - lcd_puts_scroll(0, 0, string); + /* get char width and height */ + if( char_width == -1) + lcd_getstringsize("a", &char_width, &char_height); + + if(global_settings.statusbar) + lcd_setmargins(0, STATUSBAR_HEIGHT); + else + lcd_setmargins(0, 0); + + if (type == BOOL) + /* only one boolean option, make room for checkbox */ + lcd_puts_scroll(2, 0, string); + else + lcd_puts_scroll(0, 0, string); + +#else + /* no checkbox, no need for room */ + lcd_puts_scroll(0, 0, string); +#endif while ( !done ) { index = type==INT ? *intvar : (int)*boolvar; - lcd_puts(0, 1, options[index].string); - if (global_settings.talk_menu && index != oldindex) + +#ifdef HAVE_LCD_BITMAP + if(type != BOOL) + lcd_puts(0, 1, options[index].string); +#else + lcd_puts(0, 1, options[index].string); +#endif + + if (global_settings.talk_menu && index != oldindex) { talk_id(options[index].voice_id, false); oldindex = index; } #ifdef HAVE_LCD_BITMAP status_draw(true); + if(type == BOOL){ + /* print checkbox */ + if(global_settings.statusbar) + checkbox(0, 0, char_width, char_height, (int)*boolvar); + else + checkbox(0, STATUSBAR_HEIGHT, char_width, char_height, (int)*boolvar); + } #endif + lcd_update(); button = button_get_w_tmo(HZ/2);