summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakclock15
1 files changed, 11 insertions, 4 deletions
diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock
index 15ef0bafa..34a0e9fec 100755
--- a/perl-install/standalone/drakclock
+++ b/perl-install/standalone/drakclock
@@ -77,6 +77,7 @@ $my_win->{window}->add(
$hb_ntp->set_sensitive($mode);
if ($mode == 1 && !$in->do_pkgs->is_installed('ntpsec') && !$in->do_pkgs->is_installed('chrony')) {
install_ntp();
+ show_current_pool();
}
}),
0, $hb_ntp = gtknew('HBox', border_width => 5, children => [
@@ -177,9 +178,15 @@ $time_box->set_direction('ltr');
my $servers = get_servers();
$combo_ntp_pool->set_popdown_strings(@$servers);
+show_current_pool();
if (-e timezone::ntp_conf() && is_ntp_daemon_running()) {
- $ntp = timezone::ntp_pool();
- $ntp and ntp_widget_state(1);
+ ntp_widget_state(1);
+} else {
+ ntp_widget_state(0);
+}
+
+sub show_current_pool() {
+ $ntp = timezone::ntp_pool() || 'pool.ntp.org';
my $fullntp = $ntp;
my $short_ntp = $ntp;
#- strip digits from \d+.foo.pool.ntp.org
@@ -188,8 +195,8 @@ if (-e timezone::ntp_conf() && is_ntp_daemon_running()) {
/^[^:]+: \Q$short_ntp\E$/ and $fullntp = $_, last;
}
$combo_ntp_pool->entry->set_text($fullntp);
-} else { ntp_widget_state(0) }
-
+}
+
my $pressed;
$drawing_area->set_events(${ Gtk3::Gdk::EventMask->new([ 'button_press_mask', 'button_release_mask', "pointer_motion_mask" ]) });
$drawing_area->signal_connect(draw => \&draw);