[X2Go-Commits] python-x2go.git - release/0.4.0.x (branch) updated: 0.1.1.4-120-gf6eae3f

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


The branch, release/0.4.0.x has been updated
       via  f6eae3f1599dd39cd7fe4628b1d28e0f8d288def (commit)
      from  ed6cc9d89628e50501bda74af5926acd2f97f4d5 (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:
 debian/changelog       |    1 +
 x2go/mimeboxactions.py |   22 ++++++++++++++++++----
 2 files changed, 19 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 4468f70..a9e01f8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -35,6 +35,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
     - Fix faking of WindowsError exception object in printactions.py and
       mimeboxactions.py.
     - Run print actions in background (gevent.spawn).
+    - Run MIME box actions in background (gevent.spawn).
   * Depend on python-xlib.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sat, 28 Sep 2012 01:44:21 +0100
diff --git a/x2go/mimeboxactions.py b/x2go/mimeboxactions.py
index 2e247c1..319369f 100644
--- a/x2go/mimeboxactions.py
+++ b/x2go/mimeboxactions.py
@@ -29,6 +29,7 @@ __NAME__ = 'x2gomimeboxactions-pylib'
 import os
 import copy
 import time
+import gevent
 
 from defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS
 if _X2GOCLIENT_OS in ("Windows"):
@@ -93,7 +94,7 @@ class X2goMIMEboxAction(object):
         """
         return self.__description__
 
-    def do_process(self, mimebox_file, mimebox_dir, ):
+    def _do_process(self, mimebox_file, mimebox_dir, ):
         """\
         Perform the defined MIME box action (doing nothing in L{X2goMIMEboxAction} parent class).
 
@@ -105,6 +106,19 @@ class X2goMIMEboxAction(object):
         """
         pass
 
+    def do_process(self, mimebox_file, mimebox_dir, ):
+        """\
+        Wrapper (using C{gevent.spawn()}) method for the actual processing of MIME
+        box actions.
+
+        @param mimebox_file: file name as placed in to the X2Go MIME box directory
+        @type mimebox_file: C{str}
+        @param mimebox_dir: location of the X2Go sessions's MIME box directory
+        @type mimebox_dir: C{str}
+
+        """
+        gevent.spawn(self._do_process, mimebox_file, mimebox_dir, )
+
 
 class X2goMIMEboxActionOPEN(X2goMIMEboxAction):
     """\
@@ -129,7 +143,7 @@ class X2goMIMEboxActionOPEN(X2goMIMEboxAction):
         self.client_instance = client_instance
         X2goMIMEboxAction.__init__(self, logger=logger, loglevel=loglevel)
 
-    def do_process(self, mimebox_file, mimebox_dir, ):
+    def _do_process(self, mimebox_file, mimebox_dir, ):
         """\
         Open an incoming MIME box file in the system's default application.
 
@@ -184,7 +198,7 @@ class X2goMIMEboxActionOPENWITH(X2goMIMEboxAction):
         self.client_instance = client_instance
         X2goMIMEboxAction.__init__(self, logger=logger, loglevel=loglevel)
 
-    def do_process(self, mimebox_file, mimebox_dir, ):
+    def _do_process(self, mimebox_file, mimebox_dir, ):
         """\
         Open an incoming MIME box file in the system's default application.
 
@@ -242,7 +256,7 @@ class X2goMIMEboxActionSAVEAS(X2goMIMEboxAction):
             raise x2go_exceptions.X2goMIMEboxActionException('the SAVEAS MIME box action needs to know the X2goClient instance (client=<instance>)')
         X2goMIMEboxAction.__init__(self, client_instance=client_instance, logger=logger, loglevel=loglevel)
 
-    def do_process(self, mimebox_file, mimebox_dir):
+    def _do_process(self, mimebox_file, mimebox_dir):
         """\
         Call an L{X2goClient} hook method (C{HOOK_open_mimebox_saveas_dialog}) that
         can handle the MIME box's SAVEAS action.


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