Skip to content
Permalink
Browse files

Removed gcp_ prefix for capabilities

  • Loading branch information
simoncadman committed Sep 8, 2013
1 parent fc765e3 commit a9f730a0328eb38005290b49d34ee11750489d46
Showing with 8 additions and 8 deletions.
  1. +6 −6 dynamicppd.py
  2. +2 −2 printer.py
@@ -139,10 +139,10 @@ def showUsage():

engCapabilityName = printer.sanitizeText(capability['name'])
if capability['type'] == 'Feature':
ppddetails += '*OpenUI *GCP_' + internalcapabilityName + '/' + internalcapabilityName +': PickOne' + "\n"
ppddetails += '*OpenUI *' + internalcapabilityName + '/' + internalcapabilityName +': PickOne' + "\n"

# translation of capability, allows use of 8 bit chars
ppddetails += '*' + language + '.Translation' + ' GCP_' + internalcapabilityName + '/' + originCapabilityName + ": \"\"\n"
ppddetails += '*' + language + '.Translation' + ' ' + internalcapabilityName + '/' + originCapabilityName + ": \"\"\n"

for option in capability['options']:
originOptionName = None
@@ -155,13 +155,13 @@ def showUsage():
engOptionName = printer.sanitizeText(option['name'])
internalOptionName = printer.getInternalName(option, 'option', capability['name'])
if 'default' in option and option['default'] == True:
ppddetails += '*DefaultGCP_' + internalcapabilityName + ': ' + internalOptionName + "\n"
ppddetails += '*GCP_' + internalcapabilityName + ' ' + internalOptionName + ':' + internalOptionName + "\n"
ppddetails += '*Default' + internalcapabilityName + ': ' + internalOptionName + "\n"
ppddetails += '*' + internalcapabilityName + ' ' + internalOptionName + ':' + internalOptionName + "\n"

# translation of option, allows use of 8 bit chars
ppddetails += '*' + language + '.GCP_' + internalcapabilityName + ' ' + internalOptionName + "/" + originOptionName + ": \"\"\n"
ppddetails += '*' + language + '.' + internalcapabilityName + ' ' + internalOptionName + "/" + originOptionName + ": \"\"\n"

ppddetails += '*CloseUI: *GCP_' + internalcapabilityName + "\n"
ppddetails += '*CloseUI: *' + internalcapabilityName + "\n"
elif capability['type'] == 'ParameterDef':
pass

@@ -291,10 +291,10 @@ def getCapabilities ( self, gcpid, cupsprintername, overrideoptionsstring ) :

attrs = cups.PPD(connection.getPPD(cupsprintername)).attributes
for attr in attrs:
if attr.name.startswith('DefaultGCP_'):
if attr.name.startswith('Default'):
# gcp setting, reverse back to GCP capability
gcpname = None
hashname = attr.name.replace('DefaultGCP_', '')
hashname = attr.name.replace('Default', '')

# find item name from hashes
details = self.getPrinterDetails( gcpid )

0 comments on commit a9f730a

Please sign in to comment.
You can’t perform that action at this time.