summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakfloppy
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-08-18 08:39:56 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-08-18 08:39:56 +0000
commit2f3f3a80ee9788282b1c08de1866ebfc205e5dbc (patch)
tree77c9c4392e01edf37880ba90df3e19df2be50758 /perl-install/standalone/drakfloppy
parent31a1b646760213abe96ad84cd2ad58ef3c344f96 (diff)
downloaddrakx-backup-do-not-use-2f3f3a80ee9788282b1c08de1866ebfc205e5dbc.tar
drakx-backup-do-not-use-2f3f3a80ee9788282b1c08de1866ebfc205e5dbc.tar.gz
drakx-backup-do-not-use-2f3f3a80ee9788282b1c08de1866ebfc205e5dbc.tar.bz2
drakx-backup-do-not-use-2f3f3a80ee9788282b1c08de1866ebfc205e5dbc.tar.xz
drakx-backup-do-not-use-2f3f3a80ee9788282b1c08de1866ebfc205e5dbc.zip
try to be more user friendly:
- if no error, display a success message, then exit - on error, instead of displaying the raw exit code that has no meaning for the end user, display in red the log message of mkbootdisk - remove insane expert button and so called expert frame
Diffstat (limited to 'perl-install/standalone/drakfloppy')
-rwxr-xr-xperl-install/standalone/drakfloppy31
1 files changed, 6 insertions, 25 deletions
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index 16ad16c64..fdfe8f948 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -38,8 +38,6 @@ $ENV{LANGUAGE} = "C" if $ENV{LANGUAGE} =~ /\b(ar|he|hi|ta)/;
require_root_capability();
-my $expert_mode = $::expert;
-
my $window = ugtk2->new('drakfloppy');
unless ($::isEmbedded) {
$window->{rwindow}->signal_connect(delete_event => sub { ugtk2->exit(0) });
@@ -99,17 +97,6 @@ $window->{window}->add(
),
),
- 0, gtksignal_connect(gtkset_active(Gtk2::CheckButton->new(N("Expert Mode")), $expert_mode),
- clicked => \&toggle_expert_button),
- 1, gtkadd(my $expert_mod_frame = Gtk2::Frame->new(N("Output")),
- gtkpack_(gtkset_size_request(
- gtkset_border_width(
- Gtk2::HBox->new(0, 0),
- 5),
- 30, 75),
- 1, $output = gtkset_editable(Gtk2::TextView->new, 0),
- ),
- ),
0, gtkpack__(new Gtk2::HButtonBox(),
gtksignal_connect(Gtk2::Button->new(N("Cancel")),
clicked => sub { ugtk2->exit(0) }
@@ -125,19 +112,11 @@ $window->{window}->add(
);
$window->{rwindow}->show_all;
-$expert_mod_frame->set_sensitive($expert_mode);
$window->main;
ugtk2->exit(0);
-sub toggle_expert_button() {
- my ($expert_button) = @_;
- $expert_mode = $expert_button->get_active;
- $expert_mod_frame->set_sensitive($expert_mode);
-}
-
-
my $remove_but;
sub pref_dialog() {
@@ -312,11 +291,13 @@ sub build_it() {
local *STATUS;
open STATUS, $co or do { err_dialog(N("Error"), N("Unable to fork: %s", $!)); return };
- local $_;
- while (<STATUS>) {
- gtktext_append($output, [ [ $_ ] ]);
+ my $log = join('', <STATUS>);
+ if (close STATUS) {
+ info_dialog(N("Floppy creation completed"), N("The creation of the boot floppy has been successfully completed \n"));
+ ugtk2->exit;
+ } else {
+ err_dialog(N("Error"), N("Unable to properly close mkbootdisk:\n\n<span foreground=\"Red\"><tt>%s</tt></span>", $log), { use_markup => 1, small => 1 });
}
- close STATUS or err_dialog(N("Error"), N("Unable to properly close mkbootdisk: \n %s \n %s", $!, $?));
return (0);
}