[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.5

X2Go dev team git-admin at x2go.org
Tue Aug 27 13:21:42 CEST 2013


The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
       via  c336e8a87da20287a0631a78e37a74118dc9c06f (commit)
      from  8658a5d95d59612b985c418444d488edc33ab3ed (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         |    3 ++-
 debian/control           |    2 +-
 pyhoca/wxgui/frontend.py |   29 +++++++++++++++++------------
 3 files changed, 20 insertions(+), 14 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 40f671c..461ee18 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,8 +12,9 @@ pyhoca-gui (0.1.0.5-0~x2go1) UNRELEASED; urgency=low
       hit in logon window.
     - Make tab traversal work in logon window.
     - Update i18n (en, de, nl).
+    - Fix session auto-connecting.
   * React to bug #627990, prefer man2html-base over man2html.
-
+  * Depend on Python X2go 0.1.1.2
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 24 Jun 2011 16:39:24 +0200
 
diff --git a/debian/control b/debian/control
index d2af9ba..23b5475 100644
--- a/debian/control
+++ b/debian/control
@@ -27,7 +27,7 @@ Architecture: all
 Depends: 
  ${misc:Depends},
  python,
- python-x2go (>=0.1.1.0-0~0),
+ python-x2go (>=0.1.1.2-0~0),
  python-argparse,
  python-notify,
  python-setproctitle,
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index d28c79d..a5cd682 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -226,12 +226,6 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
         self._temp_disabled_profile_names = []
         self._temp_disabled_session_names = {}
 
-        if self.args.auto_connect:
-
-            for _session in self._X2goClient__client_registered_sessions(return_objects=True):
-                self._pyhoca_logger('auto-connecting to %s session profile' % _session.get_profile_name(), loglevel=x2go.log.loglevel_NOTICE)
-                gevent.spawn(self._auto_connect, _session())
-
         self.profilemanager_disabled = self.args.disable_profilemanager
         self.printingprefs_disabled = self.args.disable_printingprefs
 
@@ -244,6 +238,9 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
             self._pyhoca_logger('the current release of %s does not support client configuration' % self.appname, loglevel=x2go.log.loglevel_WARN)
             self.options_disabled = True
 
+        if self.args.auto_connect:
+            gevent.spawn(self._auto_connect)
+
         if self.args.session_profile:
             for profile_name in self.args.session_profile.split(','):
                 if not self._X2goClient__client_registered_sessions_of_profile_name(profile_name):
@@ -257,13 +254,21 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
                 self._pyhoca_logger('opening default session profile %s' % profile_name, loglevel=x2go.log.loglevel_NOTICE)
                 self.OnSessionAuthenticate(evt)
 
-    def _auto_connect(self, session_uuid):
+    def _auto_connect(self):
 
-        try:
-            self._X2goClient__connect_session(session_uuid)
-            self._pyhoca_logger('auto-connected session profile %s' % self._X2goClient__get_session_profile_name(session_uuid), loglevel=x2go.log.loglevel_NOTICE)
-        except x2go.AuthenticationException:
-            self._pyhoca_logger('no pubkey authentication available for session profile %s' % self._X2goClient__get_session_profile_name(session_uuid), loglevel=x2go.log.loglevel_NOTICE)
+        # wait for splash to appear
+        if not self.args.disable_splash:
+            gevent.sleep(1)
+        for session_uuid in self._X2goClient__client_registered_sessions(return_objects=False):
+            if self._X2goClient__session_can_auto_connect(session_uuid):
+                self._pyhoca_logger('auto-connecting to %s session profile' % self.get_session_profile_name(session_uuid), loglevel=x2go.log.loglevel_NOTICE)
+
+                # create a dummy event and call OnAuthenticate
+                _dummy_id = wx.NewId()
+                self._eventid_profilenames_map[_dummy_id] = self.get_session_profile_name(session_uuid)
+                evt = wx.CommandEvent()
+                evt.SetId(_dummy_id)
+                self.OnSessionAuthenticate(evt)
 
     # wx.App's OnExit method
     def OnExit(self):


hooks/post-receive
-- 
pyhoca-gui.git (Python X2Go Client (wxPython GUI))

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 "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).




More information about the x2go-commits mailing list