From f4f246d4a12ce137e1e73b8c0d590da3d9337b5f Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 27 Jul 2005 08:08:05 +0000 Subject: - Started implementation of configurable, partially interactive print queue auto setup. --- perl-install/standalone/printerdrake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone/printerdrake') diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index be0716c79..2c4cc8eb2 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -57,6 +57,10 @@ my $in = 'interactive'->vnew('su', if_(!$::isEmbedded, 'printer-mdk')); my $commandline = $_; +# Suppress some wait messages to avoid windows popping up if no new print +# queue has to be set up +$commandline =~ /-onlyautoqueue/ and $::autoqueue = 1; + # Data structure for GTK2 main window my $us = {}; $us->{VERSION} = '10.2'; @@ -64,8 +68,9 @@ $us->{VERSION} = '10.2'; # Check whether Foomatic is installed and install it if necessary #printer::printerdrake::install_foomatic($in); -my $w = $in->wait_message(N("Printerdrake"), - N("Reading data of installed printers...")); +my $w = $::autoqueue || + $in->wait_message(N("Printerdrake"), + N("Reading data of installed printers...")); # Get what was installed before eval { $printer = printer::main::getinfo('') }; @@ -107,6 +112,9 @@ $printer->{SPOOLER} ||= 'cups'; # Initialization printer::printerdrake::init($printer, $security, $in, undef); +# Stop here when we are supposed to only automatically set up print queues +$commandline =~ /-onlyautoqueue/ and exit 0; + # GTK2 main window my $stringsearch = ''; -- cgit v1.2.1