From e192b0985a1cfaa8b270e6142b99797ad3cf756d Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Wed, 15 Aug 2001 22:48:13 +0000 Subject: Let the "Options" button only appear when the queue is Foomatic or with PPD (CUPS) --- perl-install/printer.pm | 3 ++- perl-install/printerdrake.pm | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 28c30da4e..e7ddcea46 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -554,7 +554,8 @@ sub get_descr_from_ppd { my %ppd; #- if there is no ppd, this means this is the PostScript generic filter. - local *F; open F, "$prefix/etc/cups/ppd/$printer->{OLD_QUEUE}.ppd" or return "OTHERS|Generic PostScript printer|PostScript (en)"; + local *F; open F, "$prefix/etc/cups/ppd/$printer->{OLD_QUEUE}.ppd" or return "|" . _("Unknown model"); + # "OTHERS|Generic PostScript printer|PostScript (en)"; local $_; while () { /^\*([^\s:]*)\s*:\s*\"([^\"]*)\"/ and do { $ppd{$1} = $2; next }; diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 72f1ec24b..5fcb5997e 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -1412,7 +1412,11 @@ What do you want to modify on this printer?", ($::expert ? _("Printer manufacturer, model, driver") : _("Printer manufacturer, model")), - _("Printer options"), + (($printer->{configured}{$queue}{make} ne + "") && + ($printer->{configured}{$queue}{model} ne + _("Unknown model")) ? + _("Printer options") : ()), _("Print test pages"), _("Remove printer") ] } ] ) ) { # Stay in the queue edit window until the user clicks "Close" -- cgit v1.2.1