summaryrefslogtreecommitdiffstats
path: root/print/libgnomecups/files/patch-25_browsed_ppds
diff options
context:
space:
mode:
Diffstat (limited to 'print/libgnomecups/files/patch-25_browsed_ppds')
-rw-r--r--print/libgnomecups/files/patch-25_browsed_ppds50
1 files changed, 50 insertions, 0 deletions
diff --git a/print/libgnomecups/files/patch-25_browsed_ppds b/print/libgnomecups/files/patch-25_browsed_ppds
new file mode 100644
index 000000000..902eb029d
--- /dev/null
+++ b/print/libgnomecups/files/patch-25_browsed_ppds
@@ -0,0 +1,50 @@
+diff -Nur libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.c libgnomecups-0.2.2.new/libgnomecups/gnome-cups-printer.c
+--- libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.c 2006-09-18 10:23:13.000000000 +0200
++++ libgnomecups/gnome-cups-printer.c 2006-09-18 10:23:18.000000000 +0200
+@@ -1105,7 +1105,7 @@
+ return NULL;
+ }
+
+- host = _gnome_cups_printer_get_host (printer);
++ host = _gnome_cups_printer_get_ppd_host (printer);
+ ppdpath = get_ppd_uri_path (printer);
+
+ gnome_cups_request_file (host, ppdpath, fd, &error);
+@@ -1976,3 +1976,26 @@
+
+ return host;
+ }
++
++gchar *
++_gnome_cups_printer_get_ppd_host (GnomeCupsPrinter *printer)
++{
++ gchar *host = NULL;
++
++ if (printer->details->printer_uri) {
++ gchar *x, *y;
++
++ x = strstr (printer->details->printer_uri, "://");
++
++ if (x) {
++ x += 3;
++ y = strpbrk (x, ":/");
++ if (y)
++ host = g_strndup (x, y - x);
++ else
++ host = g_strdup (x);
++ }
++ }
++
++ return host;
++}
+diff -Nur libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.h libgnomecups-0.2.2.new/libgnomecups/gnome-cups-printer.h
+--- libgnomecups-0.2.2/libgnomecups/gnome-cups-printer.h 2005-03-04 14:43:33.000000000 +0100
++++ libgnomecups/gnome-cups-printer.h 2006-09-18 10:23:18.000000000 +0200
+@@ -184,6 +184,7 @@
+ /* Private */
+ void _gnome_cups_printer_init (void);
+ gchar *_gnome_cups_printer_get_host (GnomeCupsPrinter *printer);
++gchar *_gnome_cups_printer_get_ppd_host (GnomeCupsPrinter *printer);
+
+ G_END_DECLS
+