diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-09-28 02:25:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-09-28 02:25:23 +0000 |
commit | 87ee25a82bc6b17ff1d08eb5f21a1c149dc3a28a (patch) | |
tree | 2b4cf1415f9893cf105b691f9127af5232b2246e /perl-install/standalone | |
parent | 82ab154cc91bc4d2ceff3a207d119058d7d18454 (diff) | |
download | drakx-87ee25a82bc6b17ff1d08eb5f21a1c149dc3a28a.tar drakx-87ee25a82bc6b17ff1d08eb5f21a1c149dc3a28a.tar.gz drakx-87ee25a82bc6b17ff1d08eb5f21a1c149dc3a28a.tar.bz2 drakx-87ee25a82bc6b17ff1d08eb5f21a1c149dc3a28a.tar.xz drakx-87ee25a82bc6b17ff1d08eb5f21a1c149dc3a28a.zip |
- make printer::printerdrake::install_spooler() work with an optional $in
- many functions now take $security (which used to be taken from $in during install)
- fix some functions with empty prototype but still using a parameter
- remove some unused variable
- rename some $_foo vars to $foo since those vars are used
- add some undef to some function calls to be minimally perl_checker compliant
- perl_checker compliant optional parameters in start_spooler_on_boot(), install_spooler()
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/printerdrake | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index d6fa7984b..013905069 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -37,7 +37,6 @@ use Gtk2::Gdk::Keysyms; use modules; use c; -my $companyname = "Mandrakesoft"; my $distroname = "Mandrakelinux"; my $domainname = "mandrakesoft.com"; @@ -90,7 +89,7 @@ eval { $printer = printer::main::getinfo('') }; undef $w; -exit 0 unless printer::printerdrake::first_time_dialog($printer, $in); +exit 0 unless printer::printerdrake::first_time_dialog($printer, $in, undef); # Were we in expert mode last time? $printer->{expert} = printer::main::get_usermode(); @@ -112,15 +111,18 @@ $commandline =~ /-pdq/ and if ($::isInstall) { # Interactive main window for installation - printer::printerdrake::main($printer, $in, 1); + printer::printerdrake::main($printer, $::o->{security}, $in, 1, undef); exit(); } +require security::level; +my $security = security::level::get(); + # Do not let printerdrake ask for the spooler $printer->{SPOOLER} ||= 'cups'; # Initialization -printer::printerdrake::init($printer, $in); +printer::printerdrake::init($printer, $security, $in, undef); # GTK2 main window @@ -245,9 +247,9 @@ my @toolbwg = map { #-PO: "Configure CUPS" is a button text and the translation has to be AS SHORT AS POSSIBLE N("Configure CUPS"), N("Configure CUPS printing system"), 'cups_config', \&ConfigCUPS ] ); -my ($_tbadd, $tbdefault, $tbedit, $tbdel, $_tbref, $_tbconfig) = @toolbwg; +my ($tbadd, $tbdefault, $tbedit, $tbdel, $_tbref, $_tbconfig) = @toolbwg; GrayDelEdit(); -foreach ($_tbadd, $buttorcheck{add}) { defined $_ and $_->set_sensitive($printer->{SPOOLER} ne "rcups")}; +foreach ($tbadd, $buttorcheck{add}) { defined $_ and $_->set_sensitive($printer->{SPOOLER} ne "rcups")}; $localtree->parent->parent->set_sensitive($printer->{SPOOLER} ne "rcups"); $nb->set_current_page(1) if $printer->{SPOOLER} eq "rcups"; @@ -367,7 +369,7 @@ sub Refresh { sub AddPrinter() { deactivate_mainwindow(); - if (printer::printerdrake::add_printer($printer, $in)) { + if (printer::printerdrake::add_printer($printer, $in, undef)) { Refresh($stringsearch); set_selection($printer->{QUEUE}); } else { @@ -411,8 +413,8 @@ sub Delete() { sub ConfigCUPS() { deactivate_mainwindow(); - printer::printerdrake::config_cups($printer, $in); - foreach ($_tbadd, $buttorcheck{add}) { defined $_ and $_->set_sensitive($printer->{SPOOLER} ne "rcups")}; + printer::printerdrake::config_cups($printer, $security, $in, undef); + foreach ($tbadd, $buttorcheck{add}) { defined $_ and $_->set_sensitive($printer->{SPOOLER} ne "rcups")}; $localtree->parent->parent->set_sensitive($printer->{SPOOLER} ne "rcups"); $nb->set_current_page(1) if $printer->{SPOOLER} eq "rcups"; Refresh($stringsearch); @@ -504,7 +506,7 @@ sub CreateTree { $tree->set_headers_visible(1); $tree->set_rules_hint(1); $tree->get_selection->signal_connect('changed' => sub { - my (undef, $event) = @_; + my (undef, $_event) = @_; my (undef, $iter) = $tree->get_selection->get_selected; return unless $iter; foreach ($tbdefault, $tbedit, $tbdel, $buttorcheck{default}, $buttorcheck{edit}, $buttorcheck{delete}) { $_->set_sensitive(1) } |