1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
diff -Nur gnome-cups-manager-0.31/libgnomecups/gnome-cups-ui-driver.c gnome-cups-manager-0.31.new/libgnomecups/gnome-cups-ui-driver.c
--- gnome-cups-manager-0.31/libgnomecups/gnome-cups-ui-driver.c 2006-05-18 11:58:51.000000000 +0200
+++ libgnomecups/gnome-cups-ui-driver.c 2006-05-18 11:58:56.000000000 +0200
@@ -267,6 +267,7 @@
static char const *dymo[] = { "Dymo-CoStar", "DYMO", NULL };
static char const *canon[] = { "Canon Inc. (Kosugi Offic", "CANON", NULL };
static char const *generic[] = { "Raw Queue", "Postscript", NULL };
+ static char const *oce[] = { "Océ", "Océ", NULL };
alias_to_vendor_map = g_hash_table_new (str_case_hash, str_case_equal);
vendor_to_alias_map = g_hash_table_new (str_case_hash, str_case_equal);
@@ -279,6 +280,7 @@
add_vendor_aliases ("HP", hp);
add_vendor_aliases ("Dymo", dymo);
add_vendor_aliases ("Canon", canon);
+ add_vendor_aliases ("Oce", oce);
add_vendor_aliases ("Generic", generic);
}
@@ -325,16 +327,26 @@
* <MODEL_IN_CAPS> - CUPS+Gimp-Print vm.n.o'
* The filename may have a subdirectory--treat the subdir as a language, and set
* the driver string accordingly. Use the regular driver string for the "C" language. */
- } else if (NULL != (tmp = strstr (without_vendor, " - CUPS+Gimp-Print v"))) {
+ } else if (NULL != (tmp = strstr (without_vendor, " - CUPS+Gimp-Print v"))
+ || NULL != (tmp = strstr (without_vendor, " - CUPS+Gutenprint v"))) {
+ char *ppd_filename = g_strdup(ppd->filename);
+ char *basename = strrchr (ppd_filename, '/');
+ if (basename)
+ *basename++ = '\0';
+ language = strrchr (ppd_filename, '/');
+ if (language)
+ *language++ = '\0';
+
+ //printf("FILENAME: %s | %s | %s\n", ppd_filename, language, basename);
model = g_strndup (without_vendor, tmp - without_vendor);
- if((NULL != (language_position = strstr (ppd->filename, "/"))) &&
- strncmp ("C/", ppd->filename, 2) &&
- strncmp ("stp/", ppd->filename, 4)) {
- language = g_strndup (ppd->filename, language_position - ppd->filename);
- driver = g_strdup_printf (_("High Quality Image (GIMP-Print) (%s)"), language);
- g_free(language);
+ if (language &&
+ strcmp("C", language) &&
+ (NULL != (language_position = strstr (ppd->filename, "/"))) &&
+ strncmp ("C/", ppd->filename, 2) &&
+ strncmp ("stp/", ppd->filename, 4)) {
+ driver = g_strdup_printf (_("High Quality Image (Gutenprint) (%s)"), language);
} else {
- driver = g_strdup (_("High Quality Image (GIMP-Print)"));
+ driver = g_strdup (_("High Quality Image (Gutenprint)"));
}
/* RH style entries
@@ -364,6 +376,7 @@
if (without_vendor != ppd->nickname)
g_free (without_vendor);
+ //printf("FILENAME: %s | %s | %s\n", ppd->filename, ppd->model, ppd->driver);
}
static int
|