PDA

View Full Version : Alarm "bell" symbol



DarrenG
2007-10-11, 12:25
Hi can anyone tell me if there is Alarm functionaliy in the Date Time screen saver that shows the bell symbol on the display if there is an alarm set in the next "n" hours (e.g. 12 hours).
Typically, I set an alarm for week days and not weekends -- therefore it would be good to see the Bell symbol on the screen saver on a Sunday night.

Looking at the DateTime screensaver plug-in code it looks like the display shows the Bell symbol if the Alarm day matches the current:

my $alarmOn = $client->prefGet("alarm", 0) || $client->prefGet("alarm", $wday);

This means, that the Bell is shown even if the Alarm has already gone off and there isn't on tomorrow (e.g. Friday afternoon).

Am I missing something, has anybody already found a work around for this?

Darren

mherger
2007-10-11, 23:37
> Hi can anyone tell me if there is Alarm functionaliy in the Date Time
> screen saver that shows the bell symbol on the display if there is an
> alarm set in the next "n" hours (e.g. 12 hours).

I've changed the behaviour in SC7 for exact your reasons: it now shows whether there's an alarm within the next 24hrs, so I see even before midnight whether the alarm for next morning is set. I'm glad there's at least one other person having this issue :-). I didn't include the change in SS6, though. If you're adventurous, you might be able to merge it. Here's the change I did:

http://svn.slimdevices.com/trunk/server/Slim/Plugin/DateTime/Plugin.pm?rev=12830&r1=12607&r2=12830

Michael

DarrenG
2007-10-12, 12:58
Michael, your a star -- exactly the logic I was after!! I had to adjust the code from:
$client->prefGet ..
to:
preferences('server')->client($client)->get ..

I guess this is a version 7 change, and all is working excellently!

many thanks!
Darren

peter
2007-10-13, 03:19
Michael Herger wrote:
>> Hi can anyone tell me if there is Alarm functionaliy in the Date Time
>> screen saver that shows the bell symbol on the display if there is an
>> alarm set in the next "n" hours (e.g. 12 hours).
>>
>
> I've changed the behaviour in SC7 for exact your reasons: it now shows whether there's an alarm within the next 24hrs, so I see even before midnight whether the alarm for next morning is set. I'm glad there's at least one other person having this issue :-). I didn't include the change in SS6, though. If you're adventurous, you might be able to merge it. Here's the change I did:
>

Thanks, Michael. At least somebody was awake ;)

P.