diff options
-rw-r--r-- | apps/lang/english.lang | 14 | ||||
-rw-r--r-- | apps/menus/settings_menu.c | 2 | ||||
-rw-r--r-- | apps/misc.c | 5 | ||||
-rw-r--r-- | apps/settings.h | 3 | ||||
-rw-r--r-- | apps/settings_list.c | 4 | ||||
-rw-r--r-- | firmware/backlight.c | 9 | ||||
-rw-r--r-- | manual/appendix/config_file_options.tex | 1 | ||||
-rw-r--r-- | manual/configure_rockbox/startup_shutdown_options.tex | 5 |
8 files changed, 41 insertions, 2 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 50cec84b7c..333527c71c 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -16136,3 +16136,17 @@ | |||
16136 | *: "List Wraparound" | 16136 | *: "List Wraparound" |
16137 | </voice> | 16137 | </voice> |
16138 | </phrase> | 16138 | </phrase> |
16139 | <phrase> | ||
16140 | id: LANG_SHOW_SHUTDOWN_MESSAGE | ||
16141 | desc: in Settings | ||
16142 | user: core | ||
16143 | <source> | ||
16144 | *: "Show Shutdown Message" | ||
16145 | </source> | ||
16146 | <dest> | ||
16147 | *: "Show Shutdown Message" | ||
16148 | </dest> | ||
16149 | <voice> | ||
16150 | *: "Show Shutdown Message" | ||
16151 | </voice> | ||
16152 | </phrase> \ No newline at end of file | ||
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 1dce12907f..562a89e85a 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -563,9 +563,11 @@ MENUITEM_SETTING(sleeptimer_on_startup, | |||
563 | &global_settings.sleeptimer_on_startup, NULL); | 563 | &global_settings.sleeptimer_on_startup, NULL); |
564 | MENUITEM_SETTING(keypress_restarts_sleeptimer, | 564 | MENUITEM_SETTING(keypress_restarts_sleeptimer, |
565 | &global_settings.keypress_restarts_sleeptimer, NULL); | 565 | &global_settings.keypress_restarts_sleeptimer, NULL); |
566 | MENUITEM_SETTING(show_shutdown_message, &global_settings.show_shutdown_message, NULL); | ||
566 | 567 | ||
567 | MAKE_MENU(startup_shutdown_menu, ID2P(LANG_STARTUP_SHUTDOWN), | 568 | MAKE_MENU(startup_shutdown_menu, ID2P(LANG_STARTUP_SHUTDOWN), |
568 | 0, Icon_System_menu, | 569 | 0, Icon_System_menu, |
570 | &show_shutdown_message, | ||
569 | &start_screen, | 571 | &start_screen, |
570 | &poweroff, | 572 | &poweroff, |
571 | &sleeptimer_toggle, | 573 | &sleeptimer_toggle, |
diff --git a/apps/misc.c b/apps/misc.c index 7da86930ba..2668ba714d 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -323,7 +323,10 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) | |||
323 | #endif | 323 | #endif |
324 | level = battery_level(); | 324 | level = battery_level(); |
325 | if (level > 10 || level < 0) | 325 | if (level > 10 || level < 0) |
326 | splash(0, str(LANG_SHUTTINGDOWN)); | 326 | { |
327 | if (global_settings.show_shutdown_message) | ||
328 | splash(0, str(LANG_SHUTTINGDOWN)); | ||
329 | } | ||
327 | else | 330 | else |
328 | { | 331 | { |
329 | msg_id = LANG_WARNING_BATTERY_LOW; | 332 | msg_id = LANG_WARNING_BATTERY_LOW; |
diff --git a/apps/settings.h b/apps/settings.h index ce7421d95e..4374cc720b 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -761,6 +761,9 @@ struct user_settings | |||
761 | bool sleeptimer_on_startup; | 761 | bool sleeptimer_on_startup; |
762 | bool keypress_restarts_sleeptimer; | 762 | bool keypress_restarts_sleeptimer; |
763 | 763 | ||
764 | bool show_shutdown_message; /* toggle whether display lights up and displays message | ||
765 | when shutting down */ | ||
766 | |||
764 | #ifdef HAVE_MORSE_INPUT | 767 | #ifdef HAVE_MORSE_INPUT |
765 | bool morse_input; /* text input method setting */ | 768 | bool morse_input; /* text input method setting */ |
766 | #endif | 769 | #endif |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 383ec9cd0e..d8702148ba 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -1956,6 +1956,10 @@ const struct settings_list settings[] = { | |||
1956 | "sleeptimer on startup", NULL), | 1956 | "sleeptimer on startup", NULL), |
1957 | OFFON_SETTING(0, keypress_restarts_sleeptimer, LANG_KEYPRESS_RESTARTS_SLEEP_TIMER, false, | 1957 | OFFON_SETTING(0, keypress_restarts_sleeptimer, LANG_KEYPRESS_RESTARTS_SLEEP_TIMER, false, |
1958 | "keypress restarts sleeptimer", set_keypress_restarts_sleep_timer), | 1958 | "keypress restarts sleeptimer", set_keypress_restarts_sleep_timer), |
1959 | |||
1960 | OFFON_SETTING(0, show_shutdown_message, LANG_SHOW_SHUTDOWN_MESSAGE, true, | ||
1961 | "show shutdown message", NULL), | ||
1962 | |||
1959 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING | 1963 | #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING |
1960 | /* If specific values are set for touchpad sensitivity setting we use those */ | 1964 | /* If specific values are set for touchpad sensitivity setting we use those */ |
1961 | #if (defined(MAX_TOUCHPAD_SENSITIVITY_SETTING) \ | 1965 | #if (defined(MAX_TOUCHPAD_SENSITIVITY_SETTING) \ |
diff --git a/firmware/backlight.c b/firmware/backlight.c index e8a71af12c..1284db4659 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -21,6 +21,9 @@ | |||
21 | * | 21 | * |
22 | ****************************************************************************/ | 22 | ****************************************************************************/ |
23 | #include "config.h" | 23 | #include "config.h" |
24 | #if !defined(BOOTLOADER) | ||
25 | #include "settings.h" | ||
26 | #endif | ||
24 | #include <stdlib.h> | 27 | #include <stdlib.h> |
25 | #include "cpu.h" | 28 | #include "cpu.h" |
26 | #include "kernel.h" | 29 | #include "kernel.h" |
@@ -667,7 +670,11 @@ void backlight_thread(void) | |||
667 | 670 | ||
668 | case SYS_POWEROFF: /* Lock backlight on poweroff so it doesn't */ | 671 | case SYS_POWEROFF: /* Lock backlight on poweroff so it doesn't */ |
669 | locked = true; /* go off before power is actually cut. */ | 672 | locked = true; /* go off before power is actually cut. */ |
670 | /* fall through */ | 673 | #if !defined(BOOTLOADER) |
674 | if (!global_settings.show_shutdown_message) | ||
675 | break; | ||
676 | #endif | ||
677 | /* else fall through */ | ||
671 | #if CONFIG_CHARGING | 678 | #if CONFIG_CHARGING |
672 | case SYS_CHARGER_CONNECTED: | 679 | case SYS_CHARGER_CONNECTED: |
673 | case SYS_CHARGER_DISCONNECTED: | 680 | case SYS_CHARGER_DISCONNECTED: |
diff --git a/manual/appendix/config_file_options.tex b/manual/appendix/config_file_options.tex index fd08f64335..5cf5b1b0f7 100644 --- a/manual/appendix/config_file_options.tex +++ b/manual/appendix/config_file_options.tex | |||
@@ -107,6 +107,7 @@ | |||
107 | 107 | ||
108 | idle poweroff & off, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 30, 45, 60 | 108 | idle poweroff & off, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 30, 45, 60 |
109 | & min\\ | 109 | & min\\ |
110 | show shutdown message & off, on & N/A\\ | ||
110 | sleeptimer duration & 5 to 300 (in steps of 5) | 111 | sleeptimer duration & 5 to 300 (in steps of 5) |
111 | & min\\ | 112 | & min\\ |
112 | sleeptimer on startup & off, on & N/A\\ | 113 | sleeptimer on startup & off, on & N/A\\ |
diff --git a/manual/configure_rockbox/startup_shutdown_options.tex b/manual/configure_rockbox/startup_shutdown_options.tex index 20dd21356d..7952985ece 100644 --- a/manual/configure_rockbox/startup_shutdown_options.tex +++ b/manual/configure_rockbox/startup_shutdown_options.tex | |||
@@ -5,6 +5,11 @@ | |||
5 | The \setting{Startup/Shutdown} sub menu allows you to configure items which | 5 | The \setting{Startup/Shutdown} sub menu allows you to configure items which |
6 | are run at startup, or initiate a shutdown when conditions are met. | 6 | are run at startup, or initiate a shutdown when conditions are met. |
7 | 7 | ||
8 | \begin{description} | ||
9 | \item[Show Shutdown Message.] If set, a message will be displayed and the display | ||
10 | will light up before the device shuts down. | ||
11 | \end{description} | ||
12 | |||
8 | \subsection{Start Screen} | 13 | \subsection{Start Screen} |
9 | Set the screen that Rockbox will start in. The default is the main menu but | 14 | Set the screen that Rockbox will start in. The default is the main menu but |
10 | the following options are available: | 15 | the following options are available: |