summaryrefslogtreecommitdiffstats
path: root/perl-install/printer.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2002-01-25 21:17:42 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2002-01-25 21:17:42 +0000
commita4bf5454a6181c5d340b79dfc6472fa35ee67711 (patch)
treea2b4357c4ea44e945955c5b1b5f6c89e6bf9bd44 /perl-install/printer.pm
parent9a7f812ae9c714b5253bbec3244ca19afff6e5b7 (diff)
downloaddrakx-backup-do-not-use-a4bf5454a6181c5d340b79dfc6472fa35ee67711.tar
drakx-backup-do-not-use-a4bf5454a6181c5d340b79dfc6472fa35ee67711.tar.gz
drakx-backup-do-not-use-a4bf5454a6181c5d340b79dfc6472fa35ee67711.tar.bz2
drakx-backup-do-not-use-a4bf5454a6181c5d340b79dfc6472fa35ee67711.tar.xz
drakx-backup-do-not-use-a4bf5454a6181c5d340b79dfc6472fa35ee67711.zip
Less important options only shown when "Advanced" button clicked.
Handling of cursor position in the main window improved. Handling of empty printer queue list in main window improved. Removed line breaks from longer texts, so that text flows into window nicely Minor text improvements.
Diffstat (limited to 'perl-install/printer.pm')
-rw-r--r--perl-install/printer.pm24
1 files changed, 11 insertions, 13 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 57a01352b..8e50cc043 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -41,7 +41,7 @@ my $FOOMATIC_DEFAULT_SPOOLER = "$FOOMATICCONFDIR/defaultspooler";
_("Remote printer") => "REMOTE",
_("Printer on remote CUPS server") => "CUPS",
_("Printer on remote lpd server") => "LPD",
- _("Network printer (socket)") => "SOCKET",
+ _("Network printer (TCP/Socket)") => "SOCKET",
_("Printer on SMB/Windows 95/98/NT server") => "SMB",
_("Printer on NetWare server") => "NCP",
_("Enter a printer device URI") => "URI",
@@ -68,13 +68,9 @@ sub spooler {
sub printer_type($) {
my ($printer) = @_;
for ($printer->{SPOOLER}) {
- # In the case of CUPS as spooler only present the "Remote CUPS
- # server" option when one adds a new printer, not when one modifies
- # an already configured one.
/cups/ && return @printer_type_inv{qw(LOCAL),
- $printer->{configured}{$printer->{OLD_QUEUE}} ?
- () : qw(CUPS), qw(LPD SOCKET SMB),
- $::expert ? qw(URI) : ()};
+ qw(LPD SOCKET SMB),
+ $::expert ? qw(URI) : ()};
/lpd/ && return @printer_type_inv{qw(LOCAL LPD SOCKET SMB NCP),
$::expert ? qw(POSTPIPE URI) : ()};
/lprng/ && return @printer_type_inv{qw(LOCAL LPD SOCKET SMB NCP),
@@ -448,7 +444,7 @@ sub make_menuentry {
my $spooler = $shortspooler_inv{$printer->{SPOOLER}};
my $connect = $printer->{configured}{$queue}{'queuedata'}{'connect'};
my $localremote;
- if ($connect =~ m!^file:!) {
+ if (($connect =~ m!^file:!) || ($connect =~ m!^ptal:!)) {
$localremote = _("Local Printers");
} else {
$localremote = _("Remote Printers");
@@ -467,7 +463,7 @@ sub make_menuentry {
} elsif ($connect =~ m!^lpd://([^/]+)/([^/]+)/?$!) {
$connection = _("on LPD server \"%s\", printer \"%s\"", $2, $1);
} elsif ($connect =~ m!^socket://([^/:]+):([^/:]+)/?$!) {
- $connection = _(", TCP/IP host \"%s\", port \"%s\"", $1, $2);
+ $connection = _(", TCP/IP host \"%s\", port %s", $1, $2);
} elsif (($connect =~ m!^smb://([^/\@]+)/([^/\@]+)/?$!) ||
($connect =~ m!^smb://.*/([^/\@]+)/([^/\@]+)/?$!) ||
($connect =~ m!^smb://.*\@([^/\@]+)/([^/\@]+)/?$!)) {
@@ -479,7 +475,7 @@ sub make_menuentry {
} elsif ($connect =~ m!^postpipe:(.+)$!) {
$connection = _(", using command %s", $1);
} else {
- $connection = "";
+ $connection = ($::expert ? ", URI: $connect" : "");
}
my $sep = "!";
$printer->{configured}{$queue}{'queuedata'}{'menuentry'} =
@@ -1124,6 +1120,11 @@ sub configure_queue($) {
{};
copy_printer_params($printer->{currentqueue},
$printer->{configured}{$printer->{currentqueue}{'queue'}}{'queuedata'});
+ # Construct an entry line for tree view in main window of
+ # printerdrake
+ make_menuentry($printer, $printer->{currentqueue}{'queue'});
+
+ # Store the default option settings
$printer->{configured}{$printer->{currentqueue}{'queue'}}{'args'} = {};
if ($printer->{currentqueue}{foomatic}) {
my $tmp = $printer->{OLD_QUEUE};
@@ -1135,9 +1136,6 @@ sub configure_queue($) {
$printer->{configured}{$printer->{currentqueue}{'queue'}}{'args'} =
read_cups_options($printer->{currentqueue}{'queue'});
}
- # Construct an entry line for tree view in main window of
- # printerdrake
- make_menuentry($printer, $printer->{currentqueue}{'queue'});
# Clean up
delete($printer->{ARGS});
$printer->{OLD_CHOICE} = "";