This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12338 - Option to restart running sleep timer on keypress
Attached to Project:
Rockbox
Opened by Nick Peskett (nickp) - Tuesday, 18 October 2011, 05:39 GMT+2
Last edited by Nick Peskett (nickp) - Monday, 26 December 2011, 10:34 GMT+2
Opened by Nick Peskett (nickp) - Tuesday, 18 October 2011, 05:39 GMT+2
Last edited by Nick Peskett (nickp) - Monday, 26 December 2011, 10:34 GMT+2
|
DetailsIf set and a sleep timer is running, the sleep timer is restarted with the value of the "sleeptimer duration" setting each time a key is pressed.
|
This task depends upon
Closed by Nick Peskett (nickp)
Monday, 26 December 2011, 10:34 GMT+2
Reason for closing: Accepted
Additional comments about closing: r31437
Monday, 26 December 2011, 10:34 GMT+2
Reason for closing: Accepted
Additional comments about closing: r31437
I think this was probably done to stop the interface becoming sluggish, and if so, seemed a good idea.
Here's an update with a fix to the e200 scroll wheel code.
It now also includes a manual entry.
http://www.rockbox.org/tracker/task/12351
Updated revision, purely implementing the restarting the sleep timer on keypress.
If you've already applied this patch, there have been no functional changes since the first version.
As discussed on IRC;
http://www.rockbox.org/irc/log-20111208#10:12:43
Here's an updated couple of patches; the first one applies the restart by default, the second as an option.
You did exactly what I proposed, thank you! I have some notes:
1. It would be good if the new variable (sleeptimer_duration) would be commented, specifically, in what units it is (I think, it's seconds).
2. In "set_sleep_timer", the variable can be set unconditionally, i.e. the assignment can be pukked out of if-then-else.
As to the setting... I can't comment on that but has anything changed since the last discussion? I.e. do we need it?
Not sure what you mean about 2, sleeptimer_duration is just keeping track of what the sleep timer was last instantiated with so it can be reinstated on keypress, or am I missing the point?
I plan to put the question re a setting to the dev list soon. Rasher wasn't keen on it being a default, there may be others;
http://www.rockbox.org/irc/log-20111208#10:40:52
I think if another sleep timer setting is added, there ought to be a dedicated sub-menu under settings, rather than squatting in time&date (not sure what its got to do with t&d anyway).
As it is, I think there's a case for a dedicated sub-menu, if only to stop polluting the root settings menu with the couple of existing sleep timer options for non-RTC targets.