19077
|
1 |
diff -urN libgnomeprint-2.12.1/libgnomeprint/gnome-print-transport.c ../SUNWgnome-print-2.14.0.hacked/libgnomeprint-2.12.1/libgnomeprint/gnome-print-transport.c
|
|
2 |
--- libgnomeprint-2.12.1/libgnomeprint/gnome-print-transport.c 2005-09-22 20:27:10.000000000 +0100
|
|
3 |
+++ ../SUNWgnome-print-2.14.0.hacked/libgnomeprint-2.12.1/libgnomeprint/gnome-print-transport.c 2006-04-25 18:21:16.465274000 +0100
|
|
4 |
@@ -392,10 +392,12 @@
|
|
5 |
gnome_print_transport_exists_by_name (const char *name)
|
|
6 |
{
|
|
7 |
GnomePrintTransport *trans;
|
|
8 |
+ GnomePrintConfig *config;
|
|
9 |
|
|
10 |
g_return_val_if_fail (name != NULL, FALSE);
|
|
11 |
|
|
12 |
- trans = gnome_print_transport_new_from_module_name (name, NULL);
|
|
13 |
+ config = gnome_print_config_default ();
|
|
14 |
+ trans = gnome_print_transport_new(config);
|
|
15 |
if (trans != NULL) {
|
|
16 |
g_object_unref (trans);
|
|
17 |
return TRUE;
|
|
18 |
diff -urN libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi-transport.c ../SUNWgnome-print-2.14.0.hacked/libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi-transport.c
|
|
19 |
--- libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi-transport.c 2004-05-18 02:53:09.000000000 +0100
|
|
20 |
+++ ../SUNWgnome-print-2.14.0.hacked/libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi-transport.c 2006-04-25 18:19:35.557131000 +0100
|
|
21 |
@@ -153,9 +153,11 @@
|
|
22 |
g_free (transport->printer);
|
|
23 |
transport->printer = NULL;
|
|
24 |
|
|
25 |
- papiAttributeListFree (transport->attributes);
|
|
26 |
- transport->attributes = NULL;
|
|
27 |
-
|
|
28 |
+ /* We do not free attributes here anymore because it is being freed by
|
|
29 |
+ papiJobFree() in the gp_transport_papi_close(). This happens
|
|
30 |
+ because transport->attributes is being passed to the lpd backend
|
|
31 |
+ as job in papiJobStreamOpen ().
|
|
32 |
+ */
|
|
33 |
G_OBJECT_CLASS (parent_class)->finalize (object);
|
|
34 |
}
|
|
35 |
|
|
36 |
@@ -181,6 +183,7 @@
|
|
37 |
return GNOME_PRINT_ERROR_UNKNOWN;
|
|
38 |
}
|
|
39 |
|
|
40 |
+g_print ("gp_transport_papi_construct: transport->printer is %s\n", value);
|
|
41 |
transport->printer = value;
|
|
42 |
|
|
43 |
status = papiServiceCreate (&service, transport->printer, NULL, NULL,
|
|
44 |
@@ -191,18 +194,6 @@
|
|
45 |
}
|
|
46 |
transport->service = service;
|
|
47 |
|
|
48 |
- value = (char *)gnome_print_config_get (gp_transport->config,
|
|
49 |
- (unsigned char *)GNOME_PRINT_KEY_NUM_COPIES);
|
|
50 |
- errno = 0;
|
|
51 |
- valint = strtol ((char *)value, NULL, 10);
|
|
52 |
- if (errno == 0)
|
|
53 |
- papiAttributeListAddInteger (&attributes, PAPI_ATTR_EXCL,
|
|
54 |
- "copies", valint);
|
|
55 |
- else
|
|
56 |
- papiAttributeListAddInteger (&attributes, PAPI_ATTR_EXCL,
|
|
57 |
- "copies", 1);
|
|
58 |
- g_free (value);
|
|
59 |
-
|
|
60 |
/*
|
|
61 |
* We really ought to pull this value from somewhere. It probably will
|
|
62 |
* be "application/postscript" most of the time, but at least with
|
|
63 |
@@ -339,11 +330,11 @@
|
|
64 |
(const papi_attribute_t **)transport->attributes, NULL,
|
|
65 |
(const char **)&filename, &job);
|
|
66 |
|
|
67 |
- papiJobFree(job);
|
|
68 |
-
|
|
69 |
if (status != PAPI_OK)
|
|
70 |
return GNOME_PRINT_ERROR_UNKNOWN;
|
|
71 |
|
|
72 |
+ papiJobFree(job);
|
|
73 |
+
|
|
74 |
return GNOME_PRINT_OK;
|
|
75 |
}
|
|
76 |
|
|
77 |
diff -urN libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi.c ../SUNWgnome-print-2.14.0.hacked/libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi.c
|
|
78 |
--- libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi.c 2006-04-25 18:18:12.454945000 +0100
|
|
79 |
+++ ../SUNWgnome-print-2.14.0.hacked/libgnomeprint-2.12.1/libgnomeprint/modules/papi/gnome-print-papi.c 2006-04-25 18:19:52.346914000 +0100
|
|
80 |
@@ -45,7 +45,7 @@
|
|
81 |
#include <libgnomeprint/gpa/gpa-settings.h>
|
|
82 |
|
|
83 |
#define d(x)
|
|
84 |
-#define GENERIC_PPD_FILE "file://localhost/usr/lib/lp/model/ppd/Generic/Generic-PostScript_Printer-Postscript.ppd.gz"
|
|
85 |
+#define GENERIC_PPD_FILE "file://localhost/usr/lib/lp/model/ppd/system/foomatic/Generic/Generic-PostScript_Printer-Postscript.ppd.gz"
|
|
86 |
|
|
87 |
/* Argument order: id, name */
|
|
88 |
|
|
89 |
@@ -77,7 +77,11 @@
|
|
90 |
" </Option>"
|
|
91 |
" <Option Id=\"Job\">"
|
|
92 |
" <Option Id=\"NumCopies\" Type=\"String\" Default=\"1\"/>"
|
|
93 |
+" <Option Id=\"NonCollatedCopiesHW\" Type=\"String\" Default=\"true\"/>"
|
|
94 |
+" <Option Id=\"CollatedCopiesHW\" Type=\"String\" Default=\"false\"/>"
|
|
95 |
" <Option Id=\"Collate\" Type=\"String\" Default=\"false\"/>"
|
|
96 |
+" <Option Id=\"Duplex\" Type=\"String\" Default=\"false\"/>"
|
|
97 |
+" <Option Id=\"Tumble\" Type=\"String\" Default=\"false\"/>"
|
|
98 |
" <Option Id=\"PrintToFile\" Type=\"String\" Default=\"false\" Locked=\"true\"/>"
|
|
99 |
" <Option Id=\"FileName\" Type=\"String\" Default=\"\"/>"
|
|
100 |
" </Option>"
|
|
101 |
@@ -686,6 +690,11 @@
|
|
102 |
return;
|
|
103 |
}
|
|
104 |
|
|
105 |
+ if (!printers) {
|
|
106 |
+ papiServiceDestroy (service);
|
|
107 |
+ return;
|
|
108 |
+ }
|
|
109 |
+
|
|
110 |
for (i = 0; printers[i] != NULL; i++)
|
|
111 |
;
|
|
112 |
|