diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-06-26 11:36:16 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-06-26 11:36:16 +0200 |
commit | 622413fa7640e09c9346a9c70c84c6b81ed87895 (patch) | |
tree | f989dbadcbfadc361202ba33e42fea865fa03f42 | |
parent | 1437630bbfa67877cb359cc292df05c27d9fbec0 (diff) | |
download | colin-keep-622413fa7640e09c9346a9c70c84c6b81ed87895.tar colin-keep-622413fa7640e09c9346a9c70c84c6b81ed87895.tar.gz colin-keep-622413fa7640e09c9346a9c70c84c6b81ed87895.tar.bz2 colin-keep-622413fa7640e09c9346a9c70c84c6b81ed87895.tar.xz colin-keep-622413fa7640e09c9346a9c70c84c6b81ed87895.zip |
fixed NTP frame initialization
-rw-r--r-- | lib/AdminPanel/Module/Clock.pm | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/AdminPanel/Module/Clock.pm b/lib/AdminPanel/Module/Clock.pm index 145447d..0361c08 100644 --- a/lib/AdminPanel/Module/Clock.pm +++ b/lib/AdminPanel/Module/Clock.pm @@ -179,10 +179,11 @@ sub _get_NTPservers { ### _restoreValues ## restore NTP server and Time Zone from configuration files ## returns 'info', a HASH references containing: -## time_zone => time zone hash reference to be restored -## ntp_server => ntp server address -## date => date string -## time => time string +## time_zone => time zone hash reference to be restored +## ntp_server => ntp server address +## date => date string +## time => time string +## ntp_running => is NTP running? # sub _restoreValues { my ($self) = @_; @@ -192,6 +193,7 @@ sub _restoreValues { $info->{ntp_server} = $self->sh_tz->ntpCurrentServer(); #- strip digits from \d+.foo.pool.ntp.org $info->{ntp_server} =~ s/^\d+\.// if $info->{ntp_server}; + $info->{ntp_running} = $self->sh_tz->isNTPRunning(); my $t = localtime; my $day = $t->strftime("%F"); my $time = $t->strftime("%H:%M:%S"); @@ -278,6 +280,8 @@ sub _adminClockPanel { if ($info->{ntp_server}) { $ntpLabel->setValue($info->{ntp_server}); } + $ntpFrame->setValue($info->{ntp_running}); + # get only once my $NTPservers = $self->_get_NTPservers(); @@ -366,6 +370,7 @@ sub _adminClockPanel { else { $ntpLabel->setValue($self->loc->N("not defined")); } + $ntpFrame->setValue($info->{ntp_running}); } elsif($widget == $aboutButton) { my $translators = $self->loc->N("_: Translator(s) name(s) & email(s)\n"); |