summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/harddrake28
-rw-r--r--perl-install/ugtk2.pm9
2 files changed, 9 insertions, 8 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index 02ddb5abb..855ec62bf 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -105,18 +105,18 @@ my @menu_items =
[ $menus{help}.N("/_Help"), undef, sub { unless (fork()) { exec("drakhelp Drakxtools-Guide.html/harddrake.html") } }, undef, '<CheckItem>' ],
[ $menus{help}.N("/_Fields description"), undef, sub {
if ($current_device) {
- $in->ask_warn(N("Harddrake help"),
+ create_dialog(N("Harddrake help"),
N("Description of the fields:\n\n")
. join("\n\n", map { if_($fields{$_}[0], "$fields{$_}[0]: $fields{$_}[1]") } sort keys %$current_device))
} else {
- $in->ask_warn(N("Select a device !"), N("Once you've selected a device, you'll be able to see the device information in fields displayed on the right frame (\"Information\")"))
+ create_dialog(N("Select a device !"), N("Once you've selected a device, you'll be able to see the device information in fields displayed on the right frame (\"Information\")"))
}
},
undef, '<CheckItem>'
],
[ $menus{help}.N("/_Report Bug"), undef, sub { unless (fork()) { exec("drakbug --report harddrake2 &") } }, undef, '<CheckItem>' ],
[ $menus{help}.N("/_About..."), undef, sub {
- $in->ask_warn(N("About Harddrake"),
+ create_dialog(N("About Harddrake"),
N("This is HardDrake, a Mandrake hardware configuration tool.\nVersion: %s
Author: Thierry Vignaud <tvignaud\@mandrakesoft.com>\n\n", $harddrake::data::version) .
formatAlaTeX($::license));
@@ -124,7 +124,7 @@ Author: Thierry Vignaud <tvignaud\@mandrakesoft.com>\n\n", $harddrake::data::ver
]
);
-$in = 'interactive'->vnew('su');
+$in = 'interactive'->vnew('su'); #require_root_capability();
my $wait = $in->wait_message(N("Please wait"), N("Detection in progress"));
gtkflush();
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 42eea50ea..af30e3f61 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -352,16 +352,17 @@ sub create_box_with_title {
}
}
-# drakfloppy / drakfont
+# drakfloppy / drakfont / harddrake2
sub create_dialog {
- my ($title, $label, $o_c) = @_;
+ my ($title, $label, $o_options) = @_;
my $ret = 0;
my $dialog = Gtk2::Dialog->new;
$dialog->signal_connect(delete_event => sub { Gtk2->main_quit });
$dialog->set_title($title);
$dialog->set_border_width(10);
$dialog->set_position('center-on-parent'); # center-on-parent doesn't work
- $dialog->vbox->pack_start(Gtk2::Label->new($label), 1, 1, 0);
+ $dialog->vbox->pack_start(my $text = Gtk2::Label->new($label), 1, 1, 0);
+ $text->set_line_wrap(1);
my $button = Gtk2::Button->new(N("OK"));
$button->can_default(1);
@@ -369,7 +370,7 @@ sub create_dialog {
$dialog->action_area->pack_start($button, 1, 1, 0);
$button->grab_default;
- if ($o_c) {
+ if ($o_options->{cancel}) {
my $button2 = Gtk2::Button->new(N("Cancel"));
$button2->signal_connect(clicked => sub { $ret = 0; $dialog->destroy; Gtk2->main_quit });
$button2->can_default(1);