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

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


The branch, release/0.4.0.x has been updated
       via  5c9240773522ae67692763d9061ea800b19000b7 (commit)
      from  b1b59d162cb5a937618553242f5d520b9eabb94f (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/backends/terminal/_stdout.py |   12 +++++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index afd805d..f79952c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -21,6 +21,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
       the master session can mount/unmount client-side shared folders.
     - Fix IndexError if x2gomountdirs did not deliver any of the expected
       results to stdout.
+    - Handle session titles that just contain blanks (e.g. " ") gracefully.
   * Depend on python-xlib.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sat, 28 Sep 2012 01:44:21 +0100
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index 4cf0891..0918ec8 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -754,10 +754,13 @@ class X2goTerminalSessionSTDOUT(object):
         """
         return self.params.depth
 
-    def auto_session_window_title(self):
+    def auto_session_window_title(self, dont_set=False):
 
         _generic_title = 'X2GO-%s' % self.session_info.name
 
+        # no blanks at beginning or end, no blanks-only...
+        self.session_title = self.session_title.strip()
+
         if self.params.session_type == 'D':
             if self.set_session_title:
 
@@ -772,7 +775,7 @@ class X2goTerminalSessionSTDOUT(object):
             # do nothing for rootless sessions
             self.session_title = _generic_title
 
-        if self.session_title != _generic_title:
+        if self.session_title != _generic_title and not dont_set:
             self.set_session_window_title(title=self.session_title)
 
     def find_session_window(self, timeout=30):
@@ -817,12 +820,15 @@ class X2goTerminalSessionSTDOUT(object):
         @type timeout: C{int}
 
         """
-        gevent.spawn(self._set_session_window_title, title=title, timeout=timeout)
+        gevent.spawn(self._set_session_window_title, title=title.strip(), timeout=timeout)
 
     def _set_session_window_title(self, title, timeout=0):
 
         self.session_title = title
 
+        if not self.session_title:
+            self.auto_session_title(dont_set=True)
+
         timeout += 1
         while timeout:
 


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