summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakclock
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-13 17:45:11 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-13 17:45:11 +0000
commit9c46bcf3d81dd0a8fc5bcc9e8bef6eea6d384060 (patch)
tree3aed7a3f5417d4bdd2a37a4c82c5a8969a814a43 /perl-install/standalone/drakclock
parent0ba56cce3e0255f0ed2dec02f158f37b718c0e61 (diff)
downloaddrakx-backup-do-not-use-9c46bcf3d81dd0a8fc5bcc9e8bef6eea6d384060.tar
drakx-backup-do-not-use-9c46bcf3d81dd0a8fc5bcc9e8bef6eea6d384060.tar.gz
drakx-backup-do-not-use-9c46bcf3d81dd0a8fc5bcc9e8bef6eea6d384060.tar.bz2
drakx-backup-do-not-use-9c46bcf3d81dd0a8fc5bcc9e8bef6eea6d384060.tar.xz
drakx-backup-do-not-use-9c46bcf3d81dd0a8fc5bcc9e8bef6eea6d384060.zip
sanitize buttons through reusing create_okcancel()
Diffstat (limited to 'perl-install/standalone/drakclock')
-rwxr-xr-xperl-install/standalone/drakclock34
1 files changed, 19 insertions, 15 deletions
diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock
index 4637e1b46..2dbbf6877 100755
--- a/perl-install/standalone/drakclock
+++ b/perl-install/standalone/drakclock
@@ -95,19 +95,10 @@ $my_win->{window}->add(gtkpack_(Gtk2::VBox->new(0,0),
),
),
),
- 0, gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'end'),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { ugtk2->exit(0) }),
- $button_reset = gtksignal_connect(Gtk2::Button->new(N("Reset")), clicked => sub {
- $its_reset = 1;
- $timer = Glib::Timeout->add(120, \&update_time);
- Repaint($drawing_area, 1);
- $calendar->select_month($old_month, $old_year);
- $calendar->select_day($old_day);
- $button_reset->set_sensitive(0);
- $its_reset = 0;
- }),
- gtksignal_connect(Gtk2::Button->new(N("Ok")),
- clicked => sub {
+ 0, create_okcancel(my $w =
+ {
+ cancel_clicked => sub { ugtk2->exit(0) },
+ ok_clicked => sub {
if ($check_ntp->get_active) {
my $choosed_serv = $combo_ntpserver->entry->get_text;
$choosed_serv =~ s/(\S+)\s*(.*)$/$1/;
@@ -128,10 +119,23 @@ $my_win->{window}->add(gtkpack_(Gtk2::VBox->new(0,0),
-e '/sbin/hwclock' and system('/sbin/hwclock --systohc');
system("dcop kicker Panel restart") if $ENV{DESKTOP} eq 'kde';
ugtk2->exit(0);
- }),
- )
+ },
+ },
+ undef, undef, '',
+ [ N("Reset"), sub {
+ $its_reset = 1;
+ $timer = Glib::Timeout->add(120, \&update_time);
+ Repaint($drawing_area, 1);
+ $calendar->select_month($old_month, $old_year);
+ $calendar->select_day($old_day);
+ $button_reset->set_sensitive(0);
+ $its_reset = 0;
+ } ]
+ ),
)
);
+$button_reset = $w->{buttons}{N("Reset")};
+
my $servers = get_server();
$combo_ntpserver->set_popdown_strings(@$servers);
if (-e $ntpfile && -e $ntpdlock) {