From b6c65f31df94644fc38abadb11234082c821adff Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Thu, 28 Aug 2003 19:46:37 +0000 Subject: Moved some stuff from mainwindow_interactive() to main() and init() as it has nothing to do with the main window. --- perl-install/printer/printerdrake.pm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'perl-install') diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 42730f259..daad043e0 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -3538,6 +3538,13 @@ sub main { # clicked on the "Configure" button in the "Summary" step. We do not # call it during the preparation of the "Summary" screen. if (!$::isInstall || $install_step == 1) { + # Ask for a spooler when none is defined yet + $printer->{SPOOLER} ||= + setup_default_spooler($printer, $in, $upNetwork) || return; + + # Save the default spooler + printer::default::set_spooler($printer); + mainwindow_interactive($printer, $in, $upNetwork); } # In the installation we call the clean-up manually when we leave @@ -3615,6 +3622,12 @@ sub init { printer::main::configureapplications($printer); undef $w; + # Turn on printer autodetection by default + $printer->{AUTODETECT} = 1; + $printer->{AUTODETECTLOCAL} = 1; + $printer->{AUTODETECTNETWORK} = 1; + $printer->{AUTODETECTSMB} = 1; + # Mark this part as done, it should not be done a second time. if ($::isInstall) { $::printerdrake_initialized = 1; @@ -3627,19 +3640,6 @@ sub mainwindow_interactive { my ($printer, $in, $upNetwork) = @_; - # Ask for a spooler when none is defined yet - $printer->{SPOOLER} ||= - setup_default_spooler($printer, $in, $upNetwork) || return; - - # Save the default spooler - printer::default::set_spooler($printer); - - # Turn on printer autodetection by default - $printer->{AUTODETECT} = 1; - $printer->{AUTODETECTLOCAL} = 1; - $printer->{AUTODETECTNETWORK} = 1; - $printer->{AUTODETECTSMB} = 1; - # Control variables for the main loop my ($menuchoice, $cursorpos) = ('', '::'); -- cgit v1.2.1