Difference between revisions of "Patch Clock Change Alarm Snooze Length"

From WebOS Internals
Jump to navigation Jump to search
(New page: {{template:patch}} ==Change Alarm Snooze Length== The default snooze length for the alarm clock is 10 minutes. This patch shortens it to the minimum supported length of 5 minutes. Of cour...)
 
(No difference)

Latest revision as of 17:27, 5 October 2009


Change Alarm Snooze Length

The default snooze length for the alarm clock is 10 minutes. This patch shortens it to the minimum supported length of 5 minutes. Of course, you could use any length of time greater than 5 minutes if you prefer. This simple modification involves editing line 456 (WebOS 1.2.1) of /usr/palm/applications/com.palm.app.clock/app/models/alarm.js. Change the value of Alarm.kAlarmSnoozeDuration to whatever you like, provided it is 5 minutes or longer (seems to be a built-in limit of the service, according to Palm's comment).

Patch Source (snooze-length.patch)

<source lang="diff"> --- /usr/palm/applications/com.palm.app.clock/app/models/alarm.js.bak 2009-07-18 01:22:36.000000000 -0400 +++ /usr/palm/applications/com.palm.app.clock/app/models/alarm.js 2009-10-05 12:10:09.091830000 -0400 @@ -453,7 +453,7 @@

Alarm.kAlarmSchedulerUri = "luna://com.palm.power/timeout/";
Alarm.kAlarmLaunchUri = "luna://com.palm.applicationManager/launch";
Alarm.kAlarmLaunchParams = '{"id":"com.palm.app.clock","params":{"action":"ring"}}';

-Alarm.kAlarmSnoozeDuration = "00:10:00"; +Alarm.kAlarmSnoozeDuration = "00:05:00";

// Alarm.kAlarmSnoozeInterruptedDuration = "00:00:45"; service does not allow alarms less than 5 min.
Alarm.kAlarmSnoozeInterruptedDuration = "00:05:00";
Alarm.kCookieAlarmSoundFile = "alarmsoundfile";

</source>