--- strings.txt 2005-11-09 16:51:00.000000000 -0800 +++ server/strings.txt 2005-11-16 17:16:35.081046900 -0800 @@ -937,6 +937,9 @@ ALARM_SET_VOLUME_SHORT SE Väckningsvolym ZH_CN 闹钟音量: +ALARM_FADESECONDS + EN Alarm Fade-in: + ALARM_SET_ENTRY CZ Čas buzení DE Stellen der Weckzeit @@ -1599,9 +1602,7 @@ SETUP_GROUP_ALARM ZH_CN 闹钟 SETUP_GROUP_ALARM_DESC - DE Pro Player können bis zu 8 Wecker definiert werden: für jeden Wochentag einen, sowie einen täglichen, der jeden Tag aktiv ist. - EN This player can have up to 8 alarms: one alarm that goes off every day and individual alarms for each day of the week. - ES Este reproductor puede tener hasta 8 alarmas: una alarma que suena todos los días, y una alarma individual para cada día de la semana. + EN This player can have up to 8 alarms: one alarm that goes off every day and individual alarms for each day of the week. You may also choose to have the alarm fade in over 20 seconds. SETUP_GROUP_IRSETS CZ Dálkové ovládání --- AlarmClock.pm 2005-11-03 16:41:00.000000000 -0800 +++ server/Slim/Buttons/AlarmClock.pm 2005-11-16 17:15:18.941883800 -0800 @@ -199,6 +199,20 @@ sub init { Slim::Buttons::Common::pushModeLeft($client, 'INPUT.Bar',\%params); + # choice is alarm fade time setting. create params and enter the bar input mode. + } elsif ($menuChoice eq 'ALARM_FADESECONDS') { + + my $newval; + if ($client->prefGet("alarmfadeseconds")) { + $newval = 0; + } else { + $newval = 1; + } + + $client->prefSet("alarmfadeseconds", $newval); + + $client->update(); + # choice is weekday alarms. create params and enter the list input mode. # creates a list of days, so that pressing right on a day re-enters alarm menu system with the specific day set. } elsif ($menuChoice eq 'ALARM_WEEKDAYS') { @@ -276,6 +290,15 @@ sub setMode { unless (defined $time) { $client->prefSet("alarmtime", 9 * 60 * 60, $weekDay); } + + # entering alarm settings, add teh fade timing global pref unless already there + if (!defined $client->param('day')) { + push @browseMenuChoices, 'ALARM_FADESECONDS' unless $browseMenuChoices[-1] eq 'ALARM_FADESECONDS'; + + # remove for weekday pref menus + } elsif($browseMenuChoices[-1] eq 'ALARM_FADESECONDS') { + pop @browseMenuChoices; + } } # on exiting the weekday list, this handler will deal the exit left to the previous @@ -365,8 +388,8 @@ sub checkAlarms { $client->execute(["mixer", "volume", $volume]); } - # fade volume over time - $client->fade_volume($client->prefGet("alarmfadeseconds", $day)); + # fade volume over 20s if enabled. + $client->fade_volume($client->prefGet("alarmfadeseconds")*30); my $playlist = $client->prefGet("alarmplaylist", $day); @@ -463,6 +486,8 @@ sub lines { my $line2; my $max; + my $overlay2 = $client->symbols('rightarrow'); + # create line 1, showing the chosen weekday if applicable if ($weekDay) { $line1 = sprintf('%s - %s', $client->string('ALARM_WEEKDAYS'), $client->string("ALARM_DAY$weekDay")); @@ -481,11 +506,15 @@ sub lines { } else { $line2 = $client->string($browseMenuChoices[$index]); } + + if ($browseMenuChoices[$index] eq 'ALARM_FADESECONDS') { + $overlay2 = $client->prefGet("alarmfadeseconds") ? "[x]" : "[ ]"; + } return { 'line1' => $line1, 'line2' => $line2, - 'overlay2' => $client->symbols('rightarrow'), + 'overlay2' => $overlay2, }; } --- Setup.pm 2005-11-10 01:16:00.000000000 -0800 +++ server/Slim/Web/Setup.pm 2005-11-16 17:14:46.317510200 -0800 @@ -843,14 +843,20 @@ sub initSetupConfig { ,'GroupOrder' => ['AlarmClock','AlarmDay0','AlarmDay1','AlarmDay2','AlarmDay3','AlarmDay4','AlarmDay5','AlarmDay6','AlarmDay7'] ,'Groups' => { 'AlarmClock' => { - 'PrefOrder' => undef + 'PrefOrder' => ['alarmfadeseconds'] ,'GroupHead' => string('SETUP_GROUP_ALARM') ,'GroupDesc' => string('SETUP_GROUP_ALARM_DESC') ,'GroupLine' => 1 + ,'Suppress_PrefLine' => 1 + ,'Suppress_PrefHead' => 1 } } ,'Prefs' => { - undef + 'alarmfadeseconds' => { + 'validate' => \&validateTrueFalse, + 'PrefChoose' => string('ALARM_FADESECONDS'), + 'inputTemplate' => 'setup_input_chk.html', + } }, } ,'audio' => {