diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2009-12-09 18:36:59 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2009-12-09 18:36:59 +0000 |
commit | ef55b7453303a9a2b20590815c967d044a13da1d (patch) | |
tree | 948eaac8dcc2bfdff77ca367ea8ff058cda8c109 /ppdc/ppdc-driver.cxx | |
parent | 3fb9c47ea669977c856ad82b3ea593ec76d136ec (diff) | |
download | cups-ef55b7453303a9a2b20590815c967d044a13da1d.tar.gz |
Merge changes from CUPS 1.5svn-r8916.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1766 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'ppdc/ppdc-driver.cxx')
-rw-r--r-- | ppdc/ppdc-driver.cxx | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/ppdc/ppdc-driver.cxx b/ppdc/ppdc-driver.cxx index f720e0bf0..8c113d322 100644 --- a/ppdc/ppdc-driver.cxx +++ b/ppdc/ppdc-driver.cxx @@ -690,7 +690,7 @@ ppdcDriver::write_ppd_file( for (int i = 0; i < 9; i ++) _cupsStrFormatd(profile[i], profile[i] + sizeof(profile[0]), p->profile[i], loc); - + cupsFilePrintf(fp, "*cupsColorProfile %s/%s: \"%s %s %s %s %s %s %s %s %s %s " "%s\"%s", p->resolution->value, p->media_type->value, @@ -1026,7 +1026,7 @@ ppdcDriver::write_ppd_file( if (!o->choices->count) continue; - if (!o->text->value || !strcmp(o->name->value, o->text->value)) + if (!o->text->value) cupsFilePrintf(fp, "*OpenUI *%s/%s: ", o->name->value, catalog->find_message(o->name->value)); else @@ -1093,9 +1093,9 @@ ppdcDriver::write_ppd_file( c = (ppdcChoice *)o->choices->next()) { // Write this choice... - if (!c->text->value || !strcmp(c->name->value, c->text->value)) - cupsFilePrintf(fp, "*%s %s: \"%s\"%s", o->name->value, - catalog->find_message(c->name->value), + if (!c->text->value) + cupsFilePrintf(fp, "*%s %s/%s: \"%s\"%s", o->name->value, + c->name->value, catalog->find_message(c->name->value), c->code->value, lf); else cupsFilePrintf(fp, "*%s %s/%s: \"%s\"%s", o->name->value, @@ -1138,10 +1138,11 @@ ppdcDriver::write_ppd_file( if (!a->selector->value || !a->selector->value[0]) cupsFilePrintf(fp, "*%s", a->name->value); else if (!a->text->value || !a->text->value[0]) - cupsFilePrintf(fp, "*%s %s", a->name->value, a->selector->value); + cupsFilePrintf(fp, "*%s %s/%s", a->name->value, a->selector->value, + catalog->find_message(a->selector->value)); else cupsFilePrintf(fp, "*%s %s/%s", a->name->value, a->selector->value, - a->text->value); + catalog->find_message(a->text->value)); cupsFilePrintf(fp, ": %s%s", a->value->value, lf); } @@ -1278,12 +1279,8 @@ ppdcDriver::write_ppd_file( // Finally the localizable attributes... for (a = (ppdcAttr *)attrs->first(); a; a = (ppdcAttr *)attrs->next()) { - if ((!a->text || !a->text->value || !a->text->value[0]) && - strncmp(a->name->value, "Custom", 6) && - strncmp(a->name->value, "ParamCustom", 11)) - continue; - if (!a->localizable && + (!a->text || !a->text->value || !a->text->value[0]) && strcmp(a->name->value, "APCustomColorMatchingName") && strcmp(a->name->value, "APPrinterPreset") && strcmp(a->name->value, "cupsICCProfile") && @@ -1291,7 +1288,7 @@ ppdcDriver::write_ppd_file( strcmp(a->name->value, "cupsMarkerName") && strncmp(a->name->value, "Custom", 6) && strncmp(a->name->value, "ParamCustom", 11)) - continue; + continue; cupsFilePrintf(fp, "*%s.%s %s/%s: \"%s\"%s", locale->value, a->name->value, a->selector->value, |