diff --git a/apps/status.c b/apps/status.c index 4f3afabed8..7d941c30bc 100644 --- a/apps/status.c +++ b/apps/status.c @@ -59,11 +59,6 @@ bool statusbar(bool state) return(laststate); } - -void statusbar_toggle(void) -{ - statusbar_enabled = !statusbar_enabled; -} #endif void status_draw(void) diff --git a/apps/status.h b/apps/status.h index 41251bef28..d908face85 100644 --- a/apps/status.h +++ b/apps/status.h @@ -35,7 +35,6 @@ void status_set_playmode(enum playmode mode); #ifdef HAVE_LCD_BITMAP extern bool statusbar_enabled; bool statusbar(bool state); -void statusbar_toggle(void); #endif void status_draw(void); diff --git a/apps/tree.c b/apps/tree.c index 2230f17aa9..d2660513a5 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -74,7 +74,7 @@ void browse_root(void) #define MARGIN_Y 0 /* Y pixel margin */ #define MARGIN_X 10 /* X pixel margin */ -#define LINE_Y (global_settings.statusbar&&statusbar_enabled?1:0) /* Y position the entry-list starts at */ +#define LINE_Y (global_settings.statusbar ? 1 : 0) /* Y position the entry-list starts at */ #define LINE_X 0 /* X position the entry-list starts at */ #define LINE_HEIGTH 8 /* pixels for each text line */ @@ -522,10 +522,9 @@ bool dirbrowse(char *root) case BUTTON_F3: #endif #ifdef HAVE_LCD_BITMAP - if(global_settings.statusbar) { - statusbar_toggle(); - restore = true; - } + global_settings.statusbar = !global_settings.statusbar; + settings_save(); + restore = true; #endif break; diff --git a/apps/wps.c b/apps/wps.c index c3f2f0a164..4348819799 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -44,7 +44,7 @@ #endif #ifdef HAVE_LCD_BITMAP -#define LINE_Y (global_settings.statusbar&&statusbar_enabled?1:0) /* Y position the entry-list starts at */ +#define LINE_Y (global_settings.statusbar ? 1 : 0) /* Y position the entry-list starts at */ #else /* HAVE_LCD_BITMAP */ #define LINE_Y 0 /* Y position the entry-list starts at */ #endif /* HAVE_LCD_BITMAP */ @@ -787,10 +787,9 @@ int wps_show(void) #ifdef HAVE_RECORDER_KEYPAD case BUTTON_F3: #ifdef HAVE_LCD_BITMAP - if(global_settings.statusbar) { - statusbar_toggle(); - draw_screen(id3); - } + global_settings.statusbar = !global_settings.statusbar; + settings_save(); + draw_screen(id3); #endif break; #endif