summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/cups.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2005-09-02 21:43:38 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2005-09-02 21:43:38 +0000
commit1f72116762d7547f35959189dae3145c1cc74cc1 (patch)
tree96eccc2f5a4d86e7f262e36ab3daca810b07e20d /perl-install/printer/cups.pm
parent474ef6367025b193d13a29f650cd5a1c920c2c91 (diff)
downloaddrakx-1f72116762d7547f35959189dae3145c1cc74cc1.tar
drakx-1f72116762d7547f35959189dae3145c1cc74cc1.tar.gz
drakx-1f72116762d7547f35959189dae3145c1cc74cc1.tar.bz2
drakx-1f72116762d7547f35959189dae3145c1cc74cc1.tar.xz
drakx-1f72116762d7547f35959189dae3145c1cc74cc1.zip
- Make building of main window of printerdrake much faster.
Diffstat (limited to 'perl-install/printer/cups.pm')
-rw-r--r--perl-install/printer/cups.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/printer/cups.pm b/perl-install/printer/cups.pm
index 0ddff19f0..eb443482e 100644
--- a/perl-install/printer/cups.pm
+++ b/perl-install/printer/cups.pm
@@ -29,13 +29,15 @@ sub lpstat_lpv() {
for my $line (@lpstat) {
chomp($line);
if ($line !~ m!^\s*$!) {
- if ($line =~ m!^printer\s+(\S+)\s+(\S.*)$!) {
+ if ($line =~ m!^printer\s+(\S+)\s+.*\b(enabled|disabled)\b!) {
# Beginning of new printer's entry
my $name = $1;
+ my $state = $2;
push(@items, {});
$currentitem = $#items;
$itemshash->{$name} = $currentitem;
$items[$currentitem]{queuename} ||= $name;
+ $items[$currentitem]{state} ||= $state;
} elsif ($line =~ m!^\s+Description:\s+(\S.*)$!) {
# Description field
if ($currentitem != -1) {