summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakfloppy
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/drakfloppy
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/drakfloppy')
-rwxr-xr-xperl-install/standalone/drakfloppy50
1 files changed, 24 insertions, 26 deletions
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index a1fcc48b8..6dac2a782 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -99,17 +99,13 @@ $window->{window}->add(
),
),
1, Gtk2::VBox->new,
- 0, gtkpack__(new Gtk2::HButtonBox(),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")),
- clicked => sub { ugtk2->exit(0) }
- ),
- gtksignal_connect(Gtk2::Button->new(N("Preferences")), clicked => \&pref_dialog),
- gtksignal_connect(gtkset_tip($tips,
- Gtk2::Button->new(N("Ok")),
- N("Build the disk")),
- clicked => \&build_it
- ),
- ),
+ 0, create_okcancel({
+ cancel_clicked => sub { ugtk2->exit(0) },
+ ok_clicked => \&build_it,
+ },
+ undef, undef, '',
+ [ N("Preferences"), \&pref_dialog, 0 ],
+ ),
),
);
@@ -188,21 +184,23 @@ sub pref_dialog() {
$remove_but->set_sensitive(scalar @modules);
@temp_modules = ();
- gtkpack($dialog->action_area,
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $dialog->destroy }),
- gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub {
- # save values:
- $options{$_} = $buttons{$_}->get_active foreach keys %buttons;
- my $val;
- @modules = ();
- $list_model->foreach(sub {
- my ($model, $_path, $iter) = @_;
- push @modules, $model->get($iter, 0);
- return 0;
- }, $val);
- $dialog->destroy;
- }),
- );
+ gtkadd($dialog->action_area,
+ create_okcancel({
+ cancel_clicked => sub { $dialog->destroy },
+ ok_clicked => sub {
+ # save values:
+ $options{$_} = $buttons{$_}->get_active foreach keys %buttons;
+ my $val;
+ @modules = ();
+ $list_model->foreach(sub {
+ my ($model, $_path, $iter) = @_;
+ push @modules, $model->get($iter, 0);
+ return 0;
+ }, $val);
+ $dialog->destroy;
+ },
+ }),
+ );
$dialog->show_all;
$dialog->run;
}