[X2Go-Commits] python-x2go.git - brokerclient (branch) updated: 0.0.39.0-89-gaab9bfe

X2Go dev team git-admin at x2go.org
Tue Jan 7 16:20:18 CET 2014


The branch, brokerclient has been updated
       via  aab9bfe109c3957ed5002f76d1dcc524c3b001ce (commit)
      from  84dc17b50657f585252a6b84492581144a01bf35 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2go/defaults.py     |    4 ++++
 x2go/printactions.py |    9 +++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/x2go/defaults.py b/x2go/defaults.py
index 46883b6..1086b0c 100644
--- a/x2go/defaults.py
+++ b/x2go/defaults.py
@@ -222,6 +222,10 @@ X2GO_CLIENTPRINTING_DEFAULTS = {
         },
     }
 if X2GOCLIENT_OS == 'Windows':
+    X2GO_CLIENTPRINTING_DEFAULTS['print'].update({'gsprint': os.path.join(os.environ['%ProgramFiles%'], 'GhostGum', 'gsview', 'gsprint.exe'), })
+
+
+if X2GOCLIENT_OS == 'Windows':
     X2GO_CLIENTXCONFIG_DEFAULTS = {
         'XServers': {
             'known_xservers': ['VcXsrv', 'Xming', 'Cygwin-X', ],
diff --git a/x2go/printactions.py b/x2go/printactions.py
index 63b0030..46f8050 100644
--- a/x2go/printactions.py
+++ b/x2go/printactions.py
@@ -311,8 +311,13 @@ class X2goPrintActionPRINT(X2goPrintAction):
             try:
                 _stdin = file('nul', 'r')
                 _shell = True
-                _program_files = os.environ['ProgramFiles']
-                _gsprint_bin = os.path.normpath(os.path.join(_program_files, 'ghostgum', 'gsview', 'gsprint.exe',))
+                if self.client_instance:
+                    _gsprint_bin = self.client_instance.client_printing.get_value('print', 'gsprint')
+                    self.logger('Using gsprint.exe path from printing config file: %s' % _gsprint_bin, loglevel=log.loglevel_DEBUG)
+                else:
+                    _program_files = os.environ['ProgramFiles']
+                    _gsprint_bin = os.path.normpath(os.path.join(_program_files, 'ghostgum', 'gsview', 'gsprint.exe',))
+                    self.logger('Using hard-coded gsprint.exe path: %s' % _gsprint_bin, loglevel=log.loglevel_DEBUG)
                 self.logger('Trying Ghostgum tool ,,gsprint.exe'' for printing first (full path: %s)' % _gsprint_bin, loglevel=log.loglevel_DEBUG)
                 p = subprocess.Popen([_gsprint_bin, pdf_file, ],
                                      stdin=_stdin,


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list