[X2go-Commits] pyhoca-gui.git - master (branch) updated: 0.1.0.10-178-g3ac15cc

X2Go dev team git-admin at x2go.org
Wed Apr 11 03:47:39 CEST 2012


The branch, master has been updated
       via  3ac15ccee45500132843039fae9ffdd521f95a1a (commit)
      from  65b6557b68a0cae496fe931ebc1cd87e1da5e910 (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 -----------------------------------------------------------------
commit 3ac15ccee45500132843039fae9ffdd521f95a1a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Apr 11 03:47:34 2012 +0200

    Drop unused cmdline option --username. Introduce new cmdline option --remember-username.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog         |    2 ++
 pyhoca-gui               |    5 +----
 pyhoca/wxgui/frontend.py |    1 +
 pyhoca/wxgui/logon.py    |    8 ++++++++
 4 files changed, 12 insertions(+), 4 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index f4b2642..42c44af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -94,6 +94,8 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
     - Be more precise on error causes during SSH authentication.
     - Fix cmdline option --restricted-trayicon.
     - Add cmdline option --disable-notifications.
+    - Drop unused cmdline option --username. Introduce new cmdline option
+      --remember-username.
   * Depend on Python X2Go 0.1.2.0.
   * Install GNOME icons via dh_links.
   * Install X2Go icons with explicit install paths.
diff --git a/pyhoca-gui b/pyhoca-gui
index 4364be4..1207bec 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -195,8 +195,8 @@ debug_options =  [
                    {'args':['-V', '--version'], 'default': False, 'action': 'store_true', 'help': 'print version number and exit', },
                  ]
 x2go_gui_options = [
-                   {'args':['-u','--username'], 'default': None, 'metavar': '<username>', 'help': 'username for the session (default: current user)', },
                    {'args':['-P','--session-profile'], 'default': None, 'metavar': '<profile-name>', 'help': 'directly connect to a session profile', },
+                   {'args':['--remember-username'], 'default': False, 'action': 'store_true', 'help': 'for profiles with interactive authentication, remember the last-used username', },
                    {'args':['--non-interactive'], 'default': False, 'action': 'store_true', 'help': 'run the session manager in non-interactive mode, this option sets the following options to true: --restricted-trayicon, --start-on-connect, --resume-all-on-connect, --exit-on-disconnect, --disconnect-on-suspend and --disconnect-on-terminate', },
                    {'args':['--auto-connect'], 'default': False, 'action': 'store_true', 'help': 'connect sessions via SSH pubkey authentication if possible', },
                    {'args':['--show-profile-metatypes'], 'default': False, 'action': 'store_true', 'help': 'show descriptive meta information on session profiles in menus (NOTE: this makes menus appear a bit more sluggish, use it mostly for debugging)', },
@@ -296,9 +296,6 @@ def parseargs():
     if a.version:
         version()
 
-    if a.username is None:
-        a.username = _CURRENT_LOCAL_USER
-
     if a.single_session_profile and a.session_profile is None:
         runtime_error('The --single-session-profile option requires naming of a specific session profile!', parser=p)
 
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index ac7a798..aa7d061 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -235,6 +235,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
         self.show_profile_metatypes = self.args.show_profile_metatypes
         self.restricted_trayicon = self.args.restricted_trayicon
         self.disable_notifications = self.args.disable_notifications
+        self.remember_username = self.args.remember_username
 
         self._pyhoca_logger('PyHoca GUI is starting up', loglevel=x2go.log.loglevel_INFO, )
         self._pyhoca_logger('registering PyHocaGUI control sessions', loglevel=x2go.log.loglevel_INFO, )
diff --git a/pyhoca/wxgui/logon.py b/pyhoca/wxgui/logon.py
index 5fd4985..bed3a69 100644
--- a/pyhoca/wxgui/logon.py
+++ b/pyhoca/wxgui/logon.py
@@ -283,6 +283,14 @@ class PyHocaGUI_DialogBoxPassword(wx.Dialog):
                                                  title=_(u'%s - connect') % self.current_profile_name,
                                                  text=_(u'Authentication has been successful.'),
                                                  icon='auth_success')
+                if self._PyHocaGUI.remember_username:
+                    _sp = self._PyHocaGUI.session_profiles
+                    if username:
+                        _sp.update_value(_sp.to_profile_id(self.current_profile_name), 'user', username)
+                    if sshproxy_user:
+                        _sp.update_value(_sp.to_profile_id(self.current_profile_name), 'sshproxyuser', sshproxy_user)
+                    _sp.write_user_config = True
+                    _sp.write()
 
         except x2go.AuthenticationException:
             if self.sshproxy_auth and (not self.sshproxy_started):


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