[X2Go-Commits] pyhoca-gui.git - twofactorauth (branch) updated: 8fd894f6a7c5c51e98750e01c1defd9c9f302822
X2Go dev team
git-admin at x2go.org
Sat Sep 14 15:54:16 CEST 2013
The branch, twofactorauth has been updated
via 8fd894f6a7c5c51e98750e01c1defd9c9f302822 (commit)
from e6edae596b6c397d196d0db973dc1966e7001e85 (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:
pyhoca/wxgui/frontend.py | 33 ++++++++++++---------------------
pyhoca/wxgui/menus_taskbar.py | 20 +++++++++++++++-----
2 files changed, 27 insertions(+), 26 deletions(-)
The diff of changes is:
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 43113a9..ca59a30 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -118,22 +118,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
def startGUI(self):
"""\
- This routine starts all PyHoca-GUI processing. On startup PyHoca-GUI behaves
- as below:
-
- 1. If there is only one profile available, or if there is one (1) single
- profile that has the default switch, and the password has not been passed,
- the logon screen is shown immediately.
-
- 2. If there is only one profile available, or if there is one (1) single
- profile that has the default switch, and the password has been passed,
- the connection can be made immediately and the screens should not be shown,
- but if there is an error in the connection, the logon screen should be shown with an errormessage.
-
- 3. If there are more than one profile available, and there is no default,
- the list of available profiles should be shown. After the user chooses
- a profile, the connection should be made to that specific profile, turning
- it into a session. After that all screens should be minimized.
+ STILL UNDOCUMENTED
"""
# THIS HAS TO MOVE INTO Python X2go
@@ -267,17 +252,16 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
- profile_name = self._eventid_profilenames_map[evt.GetId()]
- self.current_profile_name = profile_name
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
session_uuid = self._X2goClient__register_session(profile_name=self.current_profile_name)
try:
self._X2goClient__connect_session(session_uuid)
self._post_authenticate(evt, session_uuid)
except x2go.AuthenticationException:
- _logon_window = logon.PyHocaGUI_DialogBoxPassword(self, profile_name, caller=self )
+ _logon_window = logon.PyHocaGUI_DialogBoxPassword(self, self.current_profile_name, caller=self )
self._sub_windows.append(_logon_window)
if self._X2goClient__is_session_connected(session_uuid):
- self.notifier.send('%s - connect' % profile_name, 'Public SSH key authentication has been successful.', timeout=4000)
+ self.notifier.send('%s - connect' % self.current_profile_name, 'Public SSH key authentication has been successful.', timeout=4000)
else:
self._pyhoca_logger('public SSH key authentication to server failed, trying next auth-mechanism', x2go.loglevel_INFO, )
@@ -287,6 +271,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
_query_session = self._X2goClient__client_registered_sessions_of_name(self.current_profile_name)[0]
session_uuid = self._X2goClient__register_session(profile_name=self.current_profile_name)
gevent.spawn(self._X2goClient__start_session, session_uuid)
@@ -298,6 +283,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
_control_session = self._X2goClient__client_registered_sessions_of_name(self.current_profile_name)[0]
session_uuid = _control_session.get_uuid()
session_name = self._eventid_sessionnames_map[evt.GetId()]
@@ -310,6 +296,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
_control_session = self._X2goClient__client_registered_sessions_of_name(self.current_profile_name)[0]
session_uuid = _control_session.get_uuid()
session_name = self._eventid_sessionnames_map[evt.GetId()]
@@ -325,6 +312,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
_control_session = self._X2goClient__client_registered_sessions_of_name(self.current_profile_name)[0]
session_uuid = _control_session.get_uuid()
session_name = self._eventid_sessionnames_map[evt.GetId()]
@@ -340,6 +328,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
_control_session = self._X2goClient__client_registered_sessions_of_name(self.current_profile_name)[0]
session_uuid = _control_session.get_uuid()
session_names = self._X2goClient__server_running_sessions(session_uuid) + self._X2goClient__server_suspended_sessions(session_uuid)
@@ -355,6 +344,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
_control_session = self._X2goClient__client_registered_sessions_of_name(self.current_profile_name)[0]
session_uuid = _control_session.get_uuid()
@@ -370,6 +360,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
+ self.current_profile_name = self._eventid_profilenames_map[evt.GetId()]
self._pyhoca_logger('adding new X2go session profile', x2go.loglevel_INFO, )
profilemanager.PyHocaGUI_ProfileManager(self._PyHocaGUI, 'ADD')
@@ -395,7 +386,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
STILL UNDOCUMENTED
"""
- self._pyhoca_logger('List Sessions started', x2go.loglevel_INFO, )
+ self._pyhoca_logger(',,List Sessions\'\' not implemented yet', x2go.loglevel_INFO, )
def OnClose(self, evt):
"""\
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index 93a7ce1..2aff5fb 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -97,7 +97,7 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
STILL UNDOCUMENTED
"""
- def __init__(self, _PyHocaGUI, caller=None, session_name=None, status=None):
+ def __init__(self, _PyHocaGUI, caller=None, profile_name=None, session_name=None, status=None):
"""\
STILL UNDOCUMENTED
@@ -111,7 +111,12 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
ID_SUSPENDSESSION = wx.NewId()
ID_TERMINATESESSION = wx.NewId()
- # preparing information for the main PyHocaGUI instance
+ # preparing profile_name information for the main PyHocaGUI instance
+ self._PyHocaGUI._eventid_profilenames_map[ID_RESUMESESSION] = \
+ self._PyHocaGUI._eventid_profilenames_map[ID_SUSPENDSESSION] = \
+ self._PyHocaGUI._eventid_profilenames_map[ID_TERMINATESESSION] = profile_name
+
+ # preparing session_name information for the main PyHocaGUI instance
self._PyHocaGUI._eventid_sessionnames_map[ID_RESUMESESSION] = \
self._PyHocaGUI._eventid_sessionnames_map[ID_SUSPENDSESSION] = \
self._PyHocaGUI._eventid_sessionnames_map[ID_TERMINATESESSION] = session_name
@@ -143,11 +148,15 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
wx.Menu.__init__(self)
- ID_CONNECT = wx.NewId()
ID_SESSIONSTART=wx.NewId()
ID_CLEANSESSIONS = wx.NewId()
ID_DISCONNECT = wx.NewId()
+ # preparing profile_name information for the main PyHocaGUI instance
+ self._PyHocaGUI._eventid_profilenames_map[ID_SESSIONSTART] = \
+ self._PyHocaGUI._eventid_profilenames_map[ID_CLEANSESSIONS] = \
+ self._PyHocaGUI._eventid_profilenames_map[ID_DISCONNECT] = profile_name
+
self.Append(id=ID_SESSIONSTART, text="Start &new Session")
_query_session = self._PyHocaGUI.client_registered_sessions_of_name(profile_name)[0]
@@ -165,7 +174,8 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
elif _session_list[session_name].status == 'S':
state = 'Suspended'
self.AppendMenu(id=_s_id, text='%s: »%s«' % (state, session_name),
- submenu=PyHocaGUI_Menu_TaskbarSessionActions(self._PyHocaGUI, caller=self,
+ submenu=PyHocaGUI_Menu_TaskbarSessionActions(self._PyHocaGUI, caller=self,
+ profile_name=profile_name,
session_name=session_name,
status=_session_list[session_name].status,
)
@@ -205,7 +215,7 @@ class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu):
_this_id = wx.NewId()
self._PyHocaGUI._eventid_profilenames_map[_this_id] = profile_name
if submenu is not None:
- self.AppendMenu(text=profile_name, id=_this_id, submenu=submenu(self._PyHocaGUI, caller=self))
+ self.AppendMenu(text=profile_name, id=_this_id, submenu=submenu(self._PyHocaGUI, caller=self, profile_name=profile_name))
else:
self.Append(text=profile_name, id=_this_id)
if bind_method is not None:
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