summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/draksec
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/draksec
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/draksec')
-rwxr-xr-xperl-install/standalone/draksec29
1 files changed, 13 insertions, 16 deletions
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 7b53b96ad..c6d6afca4 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -227,8 +227,12 @@ $notebook->append_page(gtkshow(create_scrolled_window(gtkpack_(new Gtk2::VBox(0,
####################### OK CANCEL BUTTONS ##################################
-my $bok = gtksignal_connect(Gtk2::Button->new(N("Ok")),
- 'clicked' => sub {
+gtkpack_($vbox,
+ 1, gtkshow($notebook),
+ 0, create_okcancel(my $oc =
+ {
+ cancel_clicked => sub { ugtk2->exit(0) },
+ ok_clicked => sub {
my $seclevel_value = $seclevel_entry->entry->get_text;
my $secadmin_check_value = $secadmin_check->get_active;
my $secadmin_value = $secadmin_entry->get_text;
@@ -272,21 +276,14 @@ my $bok = gtksignal_connect(Gtk2::Button->new(N("Ok")),
remove_wait_msg($w);
ugtk2->exit(0);
- });
-
-my $bcancel = gtksignal_connect(Gtk2::Button->new(N("Cancel")),
- 'clicked' => sub { ugtk2->exit(0) });
-gtkpack_($vbox,
- 1, gtkshow($notebook),
- 0, gtkpack(Gtk2::HButtonBox->new,
- gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub { unless (fork()) { exec("drakhelp --id draksec") } }),
- Gtk2::Label->new(""),
- $bcancel,
- $bok,
- ),
+ }
+ },
+ undef, undef, '',
+ [ N("Help"), sub { unless (fork()) { exec("drakhelp --id draksec") } } ],
+ ),
);
-$bcancel->can_default(1);
-$bcancel->grab_default;
+$oc->{cancel}->can_default(1);
+$oc->{cancel}->grab_default;
$w->main;
ugtk2->exit(0);