summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-01-10 06:46:04 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-01-10 06:46:04 +0000
commit4d238c14d70199e3a991db0c3b938eb4b0f6c93a (patch)
tree9b6eb432eebb15dce7d645d13602101e7e40c695
parent6a56c14e17f6ba113ec0d4d40e75bffd61b293cc (diff)
downloadrockbox-4d238c14d70199e3a991db0c3b938eb4b0f6c93a.tar.gz
rockbox-4d238c14d70199e3a991db0c3b938eb4b0f6c93a.zip
bandaid fix for FS#8168 - statusbar would be enabled if poweroff happened while in fm screen. a proper fix is to not force the statusbar on in the fm screen, but untill that happens this is fine.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16044 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/recorder/radio.c3
-rw-r--r--apps/settings.c8
-rw-r--r--apps/settings.h5
-rw-r--r--apps/settings_list.c3
4 files changed, 18 insertions, 1 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index d576755ae7..0e43cc6735 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -462,6 +462,7 @@ int radio_screen(void)
462 in_screen = true; 462 in_screen = true;
463 463
464 /* always display status bar in radio screen for now */ 464 /* always display status bar in radio screen for now */
465 global_status.statusbar_forced = statusbar?0:1;
465 global_settings.statusbar = true; 466 global_settings.statusbar = true;
466 FOR_NB_SCREENS(i) 467 FOR_NB_SCREENS(i)
467 { 468 {
@@ -1029,7 +1030,7 @@ int radio_screen(void)
1029 1030
1030 /* restore status bar settings */ 1031 /* restore status bar settings */
1031 global_settings.statusbar = statusbar; 1032 global_settings.statusbar = statusbar;
1032 1033 global_status.statusbar_forced = 0;
1033 in_screen = false; 1034 in_screen = false;
1034#if CONFIG_CODEC != SWCODEC 1035#if CONFIG_CODEC != SWCODEC
1035 return have_recorded; 1036 return have_recorded;
diff --git a/apps/settings.c b/apps/settings.c
index 2814a6f57a..26b9434ba4 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -458,6 +458,11 @@ static bool settings_write_config(char* filename, int options)
458 fd = open(filename,O_CREAT|O_TRUNC|O_WRONLY); 458 fd = open(filename,O_CREAT|O_TRUNC|O_WRONLY);
459 if (fd < 0) 459 if (fd < 0)
460 return false; 460 return false;
461#if CONFIG_TUNER
462 bool statusbar = global_settings.statusbar;
463 if (global_status.statusbar_forced != 0 && statusbar)
464 global_settings.statusbar = false;
465#endif
461 fdprintf(fd, "# .cfg file created by rockbox %s - " 466 fdprintf(fd, "# .cfg file created by rockbox %s - "
462 "http://www.rockbox.org\r\n\r\n", appsversion); 467 "http://www.rockbox.org\r\n\r\n", appsversion);
463 for(i=0; i<nb_settings; i++) 468 for(i=0; i<nb_settings; i++)
@@ -536,6 +541,9 @@ static bool settings_write_config(char* filename, int options)
536 fdprintf(fd,"%s: %s\r\n",settings[i].cfg_name,value); 541 fdprintf(fd,"%s: %s\r\n",settings[i].cfg_name,value);
537 } /* for(...) */ 542 } /* for(...) */
538 close(fd); 543 close(fd);
544#if CONFIG_TUNER
545 global_settings.statusbar = statusbar;
546#endif
539 return true; 547 return true;
540} 548}
541#ifndef HAVE_RTC_RAM 549#ifndef HAVE_RTC_RAM
diff --git a/apps/settings.h b/apps/settings.h
index 3ae9ef0221..f365e16ef5 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -269,6 +269,11 @@ struct system_status
269#if CONFIG_TUNER 269#if CONFIG_TUNER
270 int last_frequency; /* Last frequency for resuming, in FREQ_STEP units, 270 int last_frequency; /* Last frequency for resuming, in FREQ_STEP units,
271 relative to MIN_FREQ */ 271 relative to MIN_FREQ */
272 int statusbar_forced; /* fix the bug where the statusbar would stay shown
273 if powered off inside the fm screen...
274 for some reason the screen doesnt use global_settings.statusbar
275 obviously a better fix is to fix the screen... so remove this
276 when that happens */
272#endif 277#endif
273 char last_screen; 278 char last_screen;
274 int viewer_icon_count; 279 int viewer_icon_count;
diff --git a/apps/settings_list.c b/apps/settings_list.c
index ef4e6be5b1..9d74514088 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1175,6 +1175,9 @@ const struct settings_list settings[] = {
1175 3, "list_accel_wait", UNIT_SEC, 1, 10, 1, 1175 3, "list_accel_wait", UNIT_SEC, 1, 10, 1,
1176 scanaccel_formatter, getlang_unit_0_is_off, NULL), 1176 scanaccel_formatter, getlang_unit_0_is_off, NULL),
1177#endif /* HAVE_SCROLLWHEEL */ 1177#endif /* HAVE_SCROLLWHEEL */
1178#if CONFIG_TUNER
1179 SYSTEM_SETTING(0, statusbar_forced, 0),
1180#endif
1178}; 1181};
1179 1182
1180const int nb_settings = sizeof(settings)/sizeof(*settings); 1183const int nb_settings = sizeof(settings)/sizeof(*settings);