Skip to content
Permalink
Browse files

Obey landscape and portrait parameters

  • Loading branch information
simoncadman committed Oct 6, 2013
1 parent f123739 commit cc5e1391ea41c1f52250bfdb7d07352e75f79d69
Showing with 19 additions and 8 deletions.
  1. +1 −1 backend.py
  2. +1 −1 deleteaccount.py
  3. +1 −1 dynamicppd.py
  4. +1 −1 listcloudprinters.py
  5. +11 −0 printer.py
  6. +1 −1 reportissues.py
  7. +1 −1 setupcloudprint.py
  8. +1 −1 submitjob.py
  9. +1 −1 upgrade.py
@@ -20,7 +20,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print CUPS Backend Version " + CCPVersion
sys.exit(0)

@@ -20,7 +20,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print Delete Account Script Version " + CCPVersion
sys.exit(0)

@@ -19,7 +19,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print Dynamic PPD Generator Version " + CCPVersion
sys.exit(0)

@@ -21,7 +21,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print Printer Lister Version " + CCPVersion
sys.exit(0)

@@ -297,6 +297,13 @@ def getCapabilities ( self, gcpid, cupsprintername, overrideoptionsstring ) :
option = optionparts[0]
value = optionparts[1]
overridecapabilities[option] = value
# portrait
if optiontext == 'portrait':
overridecapabilities['Orientation'] = 'Portrait'

# landscape
if optiontext == 'landscape':
overridecapabilities['Orientation'] = 'Landscape'

overrideDefaultDefaults = { 'Duplex' : 'None' }

@@ -421,12 +428,16 @@ def getInternalName ( self, details, internalType, capabilityName = None, existi
fixedNameMap['psk:OneSided'] = "None"
fixedNameMap['psk:TwoSidedShortEdge'] = "DuplexTumble"
fixedNameMap['psk:TwoSidedLongEdge'] = "DuplexNoTumble"
if capabilityName == "psk:PageOrientation":
fixedNameMap['psk:Landscape'] = "Landscape"
fixedNameMap['psk:Portrait'] = "Portrait"
else:
# capability
fixedNameMap['ns1:Colors'] = "ColorModel"
fixedNameMap['ns1:PrintQualities'] = "OutputMode"
fixedNameMap['ns1:InputBins'] = "InputSlot"
fixedNameMap['psk:JobDuplexAllDocumentsContiguously'] = "Duplex"
fixedNameMap['psk:PageOrientation'] = "Orientation"

for itemName in fixedNameMap:
if details['name'] == itemName:
@@ -19,7 +19,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print Issue Reporting Script Version " + CCPVersion
sys.exit(0)

@@ -21,7 +21,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print Setup Script Version " + CCPVersion
sys.exit(0)

@@ -21,7 +21,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print Submit Job Version " + CCPVersion
sys.exit(0)

@@ -22,7 +22,7 @@

if len(sys.argv) == 2 and sys.argv[1] == 'version':
# line below is replaced on commit
CCPVersion = "20131005 215654"
CCPVersion = "20131006 154219"
print "CUPS Cloud Print Upgrade Script Version " + CCPVersion
sys.exit(0)

0 comments on commit cc5e139

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