summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rwxr-xr-xperl-install/standalone/drakclock15
2 files changed, 12 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 5d63ecdf8..85bb4ad4c 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- drakclock:
o fix config file read/write for chrony and ntpsec (mga#34664)
* use "pool" directive instead of "service"
+ o ensure the NTP server combo box always displays a valid pool
- improve Congratulations message in last installer screen (mga#28209)
- make IceWM the last choice when automatically choosing the session for autologin
- fix inconsistent use of any::sessions()
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);