[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.0.38.0-60-gec03b42
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:28:08 CET 2014
The branch, build-baikal has been updated
via ec03b4296bee821de5082e51f5da918e6d262d83 (commit)
from 347395aecfda39e56dc78e99de4b4de01197e612 (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/backends/printing/_file.py | 42 ++++++++++++++++++++++++++++++++++++++-
x2go/defaults.py | 3 +++
2 files changed, 44 insertions(+), 1 deletion(-)
The diff of changes is:
diff --git a/x2go/backends/printing/_file.py b/x2go/backends/printing/_file.py
index 43e723c..ce9f086 100644
--- a/x2go/backends/printing/_file.py
+++ b/x2go/backends/printing/_file.py
@@ -98,7 +98,8 @@ class X2goClientPrintingFILE(inifiles.X2goIniFile):
self._print_action = printactions.X2goPrintActionPDFVIEW(client_instance=self.client_instance, pdfview_cmd=_view_command, logger=self.logger)
elif _general_pdfview and not _view_open:
- self._print_action = printactions.X2goPrintActionPDFSAVE(client_instance=self.client_instance, logger=self.logger)
+ _safe_folder = self.get('save', 'folder')
+ self._print_action = printactions.X2goPrintActionPDFSAVE(client_instance=self.client_instance, save_to_folder=_safe_folder, logger=self.logger)
elif not _general_pdfview and not _print_startcmd:
_cups_defaultprinter = self.get('CUPS', 'defaultprinter')
@@ -133,3 +134,42 @@ class X2goClientPrintingFILE(inifiles.X2goIniFile):
else:
return self._print_action
+ def set_print_action(self, print_action, **kwargs):
+ """\
+ STILL UNDOCUMENTED
+
+ """
+ if print_action == 'DIALOG':
+ self.update_value('General', 'showdialog', True)
+ else:
+ self.update_value('General', 'showdialog', False)
+
+ if print_action == 'PDFVIEW':
+ self.update_value('General', 'pdfview', True)
+ self.update_value('view', 'open', True)
+
+ elif print_action == 'PDFSAVE':
+ self.update_value('General', 'pdfview', True)
+ self.update_value('view', 'open', False)
+
+ elif print_action == 'PRINT':
+ self.update_value('General', 'pdfview', False)
+ self.update_value('print', 'startcmd', False)
+
+ elif print_action == 'PRINTCMD':
+ self.update_value('General', 'pdfview', False)
+ self.update_value('print', 'startcmd', True)
+
+ if kwargs.has_key('pdfview_cmd'):
+ self.update_value('view', 'command', kwargs['pdfview_cmd']
+
+ if kwargs.has_key('save_to_folder'):
+ self.update_value('save', 'folder', kwargs['save_to_folder']
+
+ if kwargs.has_key('printer'):
+ self.update_value('CUPS', 'defaultprinter', kwargs['printer']
+
+ if kwargs.has_key('print_cmd'):
+ self.update_value('print', 'command', kwargs['print_cmd']
+
+
diff --git a/x2go/defaults.py b/x2go/defaults.py
index d9c6940..ca43f63 100644
--- a/x2go/defaults.py
+++ b/x2go/defaults.py
@@ -203,6 +203,9 @@ X2GO_CLIENTPRINTING_DEFAULTS = {
# ignored in Python X2go
'ps': False,
},
+ 'save': {
+ # a path relative to the user's home directory
+ 'folder': 'PDF',
'view': {
# If General->pdfview is true:
# if open is true, the PDF viewer command is executed
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