diff options
-rw-r--r-- | apps/action.c | 37 | ||||
-rw-r--r-- | apps/action.h | 2 | ||||
-rw-r--r-- | apps/lang/english.lang | 14 | ||||
-rw-r--r-- | apps/menus/settings_menu.c | 1 | ||||
-rwxr-xr-x | manual/configure_rockbox/display_options.tex | 8 | ||||
-rwxr-xr-x | manual/configure_rockbox/system_options.tex | 25 |
6 files changed, 61 insertions, 26 deletions
diff --git a/apps/action.c b/apps/action.c index f9602b967f..34897b938c 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -675,24 +675,31 @@ static inline int do_auto_softlock(action_last_t *last, action_cur_t *cur) | |||
675 | } | 675 | } |
676 | else if (action == ACTION_STD_KEYLOCK) | 676 | else if (action == ACTION_STD_KEYLOCK) |
677 | { | 677 | { |
678 | last->unlock_combo = cur->button;/* set unlock combo to allow unlock */ | 678 | if (!has_flag(last->softlock_mask, SEL_ACTION_ALWAYSAUTOLOCK)) // normal operation, clear/arm autolock |
679 | last->softlock_mask ^= SEL_ACTION_ALOCK_OK; | ||
680 | action_handle_backlight(true, false); | ||
681 | /* If we don't wait for a moment for the backlight queue | ||
682 | * to process, the user will never see the message */ | ||
683 | if (!is_backlight_on(false)) | ||
684 | { | 679 | { |
685 | sleep(HZ/2); | 680 | last->unlock_combo = cur->button;/* set unlock combo to allow unlock */ |
686 | } | 681 | last->softlock_mask ^= SEL_ACTION_ALOCK_OK; |
682 | action_handle_backlight(true, false); | ||
683 | /* If we don't wait for a moment for the backlight queue | ||
684 | * to process, the user will never see the message */ | ||
685 | if (!is_backlight_on(false)) | ||
686 | { | ||
687 | sleep(HZ/2); | ||
688 | } | ||
687 | 689 | ||
688 | if (has_flag(last->softlock_mask, SEL_ACTION_ALOCK_OK)) | 690 | if (has_flag(last->softlock_mask, SEL_ACTION_ALOCK_OK)) |
689 | { | 691 | { |
690 | splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_ON)); | 692 | splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_ON)); |
691 | action = ACTION_REDRAW; | 693 | action = ACTION_REDRAW; |
692 | } | 694 | } |
693 | else | 695 | else |
696 | { | ||
697 | splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_OFF)); | ||
698 | } | ||
699 | } else if (!has_flag(last->softlock_mask, SEL_ACTION_ALOCK_OK)) // always autolock, but not currently armed | ||
694 | { | 700 | { |
695 | splash(HZ/2, ID2P(LANG_ACTION_AUTOLOCK_OFF)); | 701 | last->unlock_combo = cur->button;/* set unlock combo to allow unlock */ |
702 | last->softlock_mask ^= SEL_ACTION_ALOCK_OK; | ||
696 | } | 703 | } |
697 | } | 704 | } |
698 | 705 | ||
diff --git a/apps/action.h b/apps/action.h index da4565c28b..e4ad29504b 100644 --- a/apps/action.h +++ b/apps/action.h | |||
@@ -51,7 +51,7 @@ | |||
51 | #define SEL_ACTION_SKIP 0x008U | 51 | #define SEL_ACTION_SKIP 0x008U |
52 | #define SEL_ACTION_NOUNMAPPED 0x010U/* disable backlight on unmapped buttons */ | 52 | #define SEL_ACTION_NOUNMAPPED 0x010U/* disable backlight on unmapped buttons */ |
53 | #define SEL_ACTION_ALLNONOTIFY 0x020U/* disable switch for all softlock notifications */ | 53 | #define SEL_ACTION_ALLNONOTIFY 0x020U/* disable switch for all softlock notifications */ |
54 | /* Available 0x040U*/ | 54 | #define SEL_ACTION_ALWAYSAUTOLOCK 0x040U/* always prime autolock, requires autolock enabled */ |
55 | #define SEL_ACTION_NOTOUCH 0x080U/* disable touch screen/pad on screen lock */ | 55 | #define SEL_ACTION_NOTOUCH 0x080U/* disable touch screen/pad on screen lock */ |
56 | #define SEL_ACTION_AUTOLOCK 0x100U/* autolock on backlight off */ | 56 | #define SEL_ACTION_AUTOLOCK 0x100U/* autolock on backlight off */ |
57 | #define SEL_ACTION_NOEXT 0x200U/* disable selective backlight while charge*/ | 57 | #define SEL_ACTION_NOEXT 0x200U/* disable selective backlight while charge*/ |
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 327584c4f6..9ca4c84430 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -15767,3 +15767,17 @@ | |||
15767 | *: "Exempt Volume" | 15767 | *: "Exempt Volume" |
15768 | </voice> | 15768 | </voice> |
15769 | </phrase> | 15769 | </phrase> |
15770 | <phrase> | ||
15771 | id: LANG_ACTION_ALWAYSAUTOLOCK | ||
15772 | desc: always prime autolock | ||
15773 | user: core | ||
15774 | <source> | ||
15775 | *: "Always Autolock" | ||
15776 | </source> | ||
15777 | <dest> | ||
15778 | *: "Always Autolock" | ||
15779 | </dest> | ||
15780 | <voice> | ||
15781 | *: "Always Autolock" | ||
15782 | </voice> | ||
15783 | </phrase> | ||
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index a5daad01ce..0b7516f749 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c | |||
@@ -89,6 +89,7 @@ int mask = global_settings.bt_selective_softlock_actions_mask; | |||
89 | {ID2P(LANG_ACTION_SKIP), SEL_ACTION_SKIP}, | 89 | {ID2P(LANG_ACTION_SKIP), SEL_ACTION_SKIP}, |
90 | #ifdef HAVE_BACKLIGHT | 90 | #ifdef HAVE_BACKLIGHT |
91 | {ID2P(LANG_ACTION_AUTOLOCK_ON), SEL_ACTION_AUTOLOCK}, | 91 | {ID2P(LANG_ACTION_AUTOLOCK_ON), SEL_ACTION_AUTOLOCK}, |
92 | {ID2P(LANG_ACTION_ALWAYSAUTOLOCK), SEL_ACTION_ALWAYSAUTOLOCK}, | ||
92 | #endif | 93 | #endif |
93 | #if defined(HAVE_TOUCHPAD) || defined(HAVE_TOUCHSCREEN) | 94 | #if defined(HAVE_TOUCHPAD) || defined(HAVE_TOUCHSCREEN) |
94 | {ID2P(LANG_ACTION_DISABLE_TOUCH), SEL_ACTION_NOTOUCH}, | 95 | {ID2P(LANG_ACTION_DISABLE_TOUCH), SEL_ACTION_NOTOUCH}, |
diff --git a/manual/configure_rockbox/display_options.tex b/manual/configure_rockbox/display_options.tex index f00b0a2da9..d64734aec4 100755 --- a/manual/configure_rockbox/display_options.tex +++ b/manual/configure_rockbox/display_options.tex | |||
@@ -67,13 +67,13 @@ | |||
67 | \item[Settings.] | 67 | \item[Settings.] |
68 | Allows to select actions that will \emph{not} activate backlight. | 68 | Allows to select actions that will \emph{not} activate backlight. |
69 | \begin{itemize} | 69 | \begin{itemize} |
70 | \item[Volume.] | 70 | \item[Exempt Volume] |
71 | Volume up/down. | 71 | Volume up/down. |
72 | \item[Play.] | 72 | \item[Exempt Play] |
73 | Toggling Play/Pause. | 73 | Toggling Play/Pause. |
74 | \item[Seek.] | 74 | \item[Exempt Seek] |
75 | Seeking in a track. | 75 | Seeking in a track. |
76 | \item[Skip.] | 76 | \item[Exempt Skip] |
77 | Skipping of a track. | 77 | Skipping of a track. |
78 | \item[Disable Unmapped Keys.] | 78 | \item[Disable Unmapped Keys.] |
79 | Buttons that have no action assigned and accidental button | 79 | Buttons that have no action assigned and accidental button |
diff --git a/manual/configure_rockbox/system_options.tex b/manual/configure_rockbox/system_options.tex index bf82b8c074..59acdaa5f9 100755 --- a/manual/configure_rockbox/system_options.tex +++ b/manual/configure_rockbox/system_options.tex | |||
@@ -262,16 +262,16 @@ therefore result in better runtime. | |||
262 | \item[Settings.] | 262 | \item[Settings.] |
263 | Allows to select actions that will \emph{not} be blocked by the key lock. | 263 | Allows to select actions that will \emph{not} be blocked by the key lock. |
264 | \begin{itemize} | 264 | \begin{itemize} |
265 | \item[Volume.] | 265 | \item[Exempt Volume] |
266 | Volume up/down. | 266 | Volume up/down. |
267 | \item[Play.] | 267 | \item[Exempt Play] |
268 | Toggling Play/Pause. | 268 | Toggling Play/Pause. |
269 | \item[Seek.] | 269 | \item[Exempt Seek] |
270 | Seeking in a track. | 270 | Seeking in a track. |
271 | \item[Skip.] | 271 | \item[Exempt Skip] |
272 | Skipping of a track. | 272 | Skipping of a track. |
273 | \opt{HAVE_BACKLIGHT}{ | 273 | \opt{HAVE_BACKLIGHT}{ |
274 | \item[Autolock On.] | 274 | \item[Autolock On] |
275 | When the backlight turns off, softlock will lock the screen, | 275 | When the backlight turns off, softlock will lock the screen, |
276 | activates when you press the lock key and if you manually lock | 276 | activates when you press the lock key and if you manually lock |
277 | again, while active it then disables autolock. | 277 | again, while active it then disables autolock. |
@@ -284,16 +284,29 @@ therefore result in better runtime. | |||
284 | \item | 284 | \item |
285 | (Lock Button Pressed \#3) >(device unlocked). | 285 | (Lock Button Pressed \#3) >(device unlocked). |
286 | \end{itemize} | 286 | \end{itemize} |
287 | \item[Always Autolock] | ||
288 | Force Autolock to always be active rather than cycling through the | ||
289 | list above. The device can be locked and unlocked manually, but | ||
290 | the lock will always engage when the backlight turns off. Requires | ||
291 | Autolock On to be enabled. | ||
292 | \note{The lock button must be pressed at least once after enabling | ||
293 | this setting and at least once every time the device is powered up.} | ||
287 | } %\opt{HAVE_BACKLIGHT} | 294 | } %\opt{HAVE_BACKLIGHT} |
288 | \opt{touchpad}{ | 295 | \opt{touchpad}{ |
289 | \item[Disable Touch.] | 296 | \item[Disable Touch.] |
290 | Blocks touch screen buttons like the original. | 297 | Blocks touch screen buttons like the original. |
291 | } | 298 | } |
292 | \item[Disable Notify.] | 299 | \item[Disable Locked Reminders] |
293 | Suppresses the notification 'Buttons Locked' | 300 | Suppresses the notification 'Buttons Locked' |
294 | (still will if power button is pressed). | 301 | (still will if power button is pressed). |
295 | \note{This is a pre-requisite for \setting{selectivebacklight} | 302 | \note{This is a pre-requisite for \setting{selectivebacklight} |
296 | \reference{ref:selectivebacklight} to work also during key lock.} | 303 | \reference{ref:selectivebacklight} to work also during key lock.} |
304 | \item[Disable All Lock Notifications] | ||
305 | Disable all softlock notifications, including when power button | ||
306 | is pressed. | ||
307 | \note{When this is enabled, Disable Locked Reminders is still required to | ||
308 | be enabled for \setting{selectivebacklight} \reference{ref:selectivebacklight} | ||
309 | to work during key lock.} | ||
297 | 310 | ||
298 | \end{itemize} | 311 | \end{itemize} |
299 | Selected actions are indicated by a leading +. | 312 | Selected actions are indicated by a leading +. |