summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorwendyp <none@none>2008-05-21 12:16:32 -0700
committerwendyp <none@none>2008-05-21 12:16:32 -0700
commit853389e344087efe23a5cc688693e5301a1cb90d (patch)
treecba40d0411d72c265b2ae5e9540d2d8f9f86604e /usr/src
parent63e9dad6fd7aa76bcbab14646b8f095642f8a2ae (diff)
downloadillumos-joyent-853389e344087efe23a5cc688693e5301a1cb90d.tar.gz
6180823 S10 BETA 6: printmgr(1M) say banner "always" when it's "never"
6667354 printmgr fails to add/modify printer 6689188 modify queue display values in printmgr incorrect for filecontents, notification, and printer type.
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/print/bsd-sysv-commands/lpstat.c26
-rw-r--r--usr/src/cmd/print/printmgr/com/sun/admin/pm/client/pmInstallPrinter.java17
-rw-r--r--usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java14
3 files changed, 44 insertions, 13 deletions
diff --git a/usr/src/cmd/print/bsd-sysv-commands/lpstat.c b/usr/src/cmd/print/bsd-sysv-commands/lpstat.c
index 116d3fa1bb..af26bfb43e 100644
--- a/usr/src/cmd/print/bsd-sysv-commands/lpstat.c
+++ b/usr/src/cmd/print/bsd-sysv-commands/lpstat.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
@@ -388,7 +388,7 @@ report_printer(papi_service_t svc, char *name, papi_printer_t printer,
"document-format-supported", &str);
printf(gettext("\tContent types: %s"), str);
while (papiAttributeListGetString(attrs, &iter, NULL, &str)
- == PAPI_OK)
+ == PAPI_OK)
printf(", %s", str);
printf("\n");
@@ -398,6 +398,16 @@ report_printer(papi_service_t svc, char *name, papi_printer_t printer,
printf(gettext("\tDescription: %s\n"), str);
str = "";
+ iter = NULL;
+ (void) papiAttributeListGetString(attrs, &iter,
+ "lpsched-printer-type", &str);
+ printf(gettext("\tPrinter types: %s"), str);
+ while (papiAttributeListGetString(attrs, &iter, NULL, &str)
+ == PAPI_OK)
+ printf(", %s", str);
+ printf("\n");
+
+ str = "";
(void) papiAttributeListGetString(attrs, NULL,
"lpsched-dial-info", &str);
printf(gettext("\tConnection: %s\n"),
@@ -477,9 +487,15 @@ report_printer(papi_service_t svc, char *name, papi_printer_t printer,
str = "";
(void) papiAttributeListGetString(attrs, NULL,
"job-sheets-supported", &str);
- printf(gettext("\tBanner %s\n"),
- (strcasecmp(str, "none") == 0 ?
- gettext("not required") : gettext("required")));
+ if ((strcasecmp(str, "none")) == 0)
+ str = gettext("page never printed");
+ else if (strcasecmp(str, "optional") == 0)
+ str = gettext("not required");
+ else
+ str = gettext("required");
+
+ printf(gettext("\tBanner %s\n"), str);
+
str = "";
iter = NULL;
diff --git a/usr/src/cmd/print/printmgr/com/sun/admin/pm/client/pmInstallPrinter.java b/usr/src/cmd/print/printmgr/com/sun/admin/pm/client/pmInstallPrinter.java
index bf834be71b..e24f1425d1 100644
--- a/usr/src/cmd/print/printmgr/com/sun/admin/pm/client/pmInstallPrinter.java
+++ b/usr/src/cmd/print/printmgr/com/sun/admin/pm/client/pmInstallPrinter.java
@@ -22,7 +22,7 @@
*
* ident "%Z%%M% %I% %E% SMI"
*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Install and Modify Printer implementation
@@ -788,20 +788,35 @@ public class pmInstallPrinter extends pmInstallScreen {
if (filecontents.equals("postscript")) {
fileCombo.setSelectedItem(pmUtility.getResource(
"PostScript"));
+ } else if (filecontents.equals("application/postscript")) {
+ fileCombo.setSelectedItem(pmUtility.getResource(
+ "PostScript"));
+
} else if (filecontents.equals("simple")) {
fileCombo.setSelectedItem(pmUtility.getResource("ASCII"));
+ } else if (filecontents.equals("text/plain")) {
+ fileCombo.setSelectedItem(pmUtility.getResource("ASCII"));
+
} else if (filecontents.equals("postscript,simple")) {
fileCombo.setSelectedItem(pmUtility.getResource(
"Both.PostScript.and.ASCII"));
} else if (filecontents.equals("simple,postscript")) {
fileCombo.setSelectedItem(pmUtility.getResource(
"Both.PostScript.and.ASCII"));
+ } else if (filecontents.equals(
+ "text/plain,application/postscript")) {
+ fileCombo.setSelectedItem(pmUtility.getResource(
+ "Both.PostScript.and.ASCII"));
+
} else if (filecontents.equals("none")) {
fileCombo.setSelectedItem(
pmUtility.getResource("None"));
} else if (filecontents.equals("any")) {
fileCombo.setSelectedItem(
pmUtility.getResource("Any"));
+ } else if (filecontents.equals("application/octet-stream")) {
+ fileCombo.setSelectedItem(
+ pmUtility.getResource("Any"));
} else {
Debug.message(
"CLNT:pmInstPr:setType()unknown file contents type");
diff --git a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java
index f810995372..6f4f37cc15 100644
--- a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java
+++ b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/DoPrinterView.java
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -22,7 +21,7 @@
/*
* ident "%Z%%M% %I% %E% SMI"
*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* DoPrinterView class
@@ -231,7 +230,8 @@ public class DoPrinterView {
// Get the PPD path/filename from lpstat
// Get the make/model/ppd nickname using ppd-filename
ppdfile = getToken(o, "\tPPD:");
- if (ppdfile.equals("none")) {
+ if ((ppdfile == null) || (ppdfile.equals("none")) ||
+ (ppdfile.equals(""))) {
ppdfile = null;
} else {
// Set the make/model/ppd
@@ -375,9 +375,9 @@ public class DoPrinterView {
str = getToken(o, "On fault:");
if (str != null) {
if (!str.equals("")) {
- if (str.indexOf("write to") != -1) {
+ if (str.indexOf("write") != -1) {
notify = "write";
- } else if (str.indexOf("mail to") != -1) {
+ } else if (str.indexOf("mail") != -1) {
notify = "mail";
} else if (str.indexOf("no alert") != -1) {
notify = "none";