summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2003-03-02 23:08:13 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2003-03-02 23:08:13 +0000
commit1a7a3beb5f10554b525deb88fbc78f75473dd9b0 (patch)
tree1a430f72234499e057bba8929ccb7a822045d85c
parent55971b9830f5e0f0442d12dc382a4525a19bbd11 (diff)
downloaddrakx-backup-do-not-use-1a7a3beb5f10554b525deb88fbc78f75473dd9b0.tar
drakx-backup-do-not-use-1a7a3beb5f10554b525deb88fbc78f75473dd9b0.tar.gz
drakx-backup-do-not-use-1a7a3beb5f10554b525deb88fbc78f75473dd9b0.tar.bz2
drakx-backup-do-not-use-1a7a3beb5f10554b525deb88fbc78f75473dd9b0.tar.xz
drakx-backup-do-not-use-1a7a3beb5f10554b525deb88fbc78f75473dd9b0.zip
- Avoid two overlayed wait messages when installing packages
- Let applications (OpenOffice.org/GIMP) being once on startup of Printerdrake
-rw-r--r--perl-install/printer/printerdrake.pm27
1 files changed, 18 insertions, 9 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 74569c0aa..9f93ba9cd 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -3316,7 +3316,8 @@ sub install_spooler {
my ($printer, $in, $upNetwork) = @_;
return 1 if $::testing;
my $spooler = $printer->{SPOOLER};
- # If the user refuses to install the spooler in high or paranoid security level, exit.
+ # If the user refuses to install the spooler in high or paranoid
+ # security level, exit.
return 0 unless security_check($printer, $in, $spooler);
return 1 if $spooler !~ /^(cups|lpd|lprng|pqd)$/; # should not happen
my $w = $in->wait_message(N("Printerdrake"), N("Checking installed software..."));
@@ -3324,12 +3325,14 @@ sub install_spooler {
# "lpr" conflicts with "LPRng", remove either "LPRng" or remove "lpr"
my $packages = $spoolers{$spooler}{packages2rm};
if ($packages && files_exist($packages->[1])) {
+ undef $w;
$w = $in->wait_message(N("Printerdrake"), N("Removing %s ..."), $spoolers{$packages->[0]}{short_name});
$in->do_pkgs->remove_nodeps($packages->[0]);
}
$packages = $spoolers{$spooler}{packages2add};
if ($packages && !files_exist(@{$packages->[1]})) {
+ undef $w;
$w = $in->wait_message(N("Printerdrake"), N("Installing %s ..."), $spoolers{$spooler}{short_name});
$in->do_pkgs->install(@{$packages->[0]});
}
@@ -3338,7 +3341,6 @@ sub install_spooler {
# Start the network (especially during installation), so the
# user can set up queues to remote printers.
- # (especially during installation)
$upNetwork and do {
&$upNetwork();
@@ -3427,13 +3429,13 @@ sub setup_default_spooler {
# has no raw queue)
%printer::main::thedb = ();
assure_default_printer_is_set($printer, $in);
+ # Configure the current printer queues in applications
+ my $_w =
+ $in->wait_message(N("Printerdrake"),
+ N("Configuring applications..."));
+ printer::main::configureapplications($printer);
+ undef $_w;
}
- # Configure the current printer queues in applications
- my $_w =
- $in->wait_message(N("Printerdrake"),
- N("Configuring applications..."));
- printer::main::configureapplications($printer);
- undef $_w;
# Save spooler choice
printer::default::set_spooler($printer);
return $printer->{SPOOLER};
@@ -3551,10 +3553,17 @@ sub main {
configure_new_printers($printer, $in, $upNetwork);
# Make sure that default printer is registered
- if ($nodefault) {
+ if ($nodefault && $printer->{DEFAULT}) {
printer::default::set_printer($printer);
}
+ # Configure the current printer queues in applications
+ my $_w =
+ $in->wait_message(N("Printerdrake"),
+ N("Configuring applications..."));
+ printer::main::configureapplications($printer);
+ undef $_w;
+
# Mark this part as done, it should not be done a second time.
if ($::isInstall) {
$::printerdrake_initialized = 1;