[X2go-Commits] pyhoca-gui.git - master (branch) updated: 0.1.0.4-5-ge04b5cc

X2go dev team git-admin at x2go.org
Mon Jun 27 08:37:19 CEST 2011


The branch, master has been updated
       via  e04b5cc0461a318a3623dc1bc84381ee8ad3666f (commit)
       via  4b911e852a469a1f717cf464da81f0209b439470 (commit)
      from  ed2e9bd9da856f86fc6d885a7d0c040c782941ee (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 e04b5cc0461a318a3623dc1bc84381ee8ad3666f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Jun 27 08:37:45 2011 +0200

    Add --logon-window-position option that allows custom placing of the logon window on your desktop.

commit 4b911e852a469a1f717cf464da81f0209b439470
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Jun 27 08:34:49 2011 +0200

    add explicit metavar names to cmd args

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

Summary of changes:
 debian/changelog         |    2 ++
 pyhoca-gui               |   29 +++++++++++++++--------------
 pyhoca/wxgui/frontend.py |    7 +++++++
 pyhoca/wxgui/logon.py    |   26 +++++++++++++++++++++++---
 4 files changed, 47 insertions(+), 17 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index a7f11cf..fefe06e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ pyhoca-gui (0.1.0.5-0~x2go1) UNRELEASED; urgency=low
     - bugfix release
     - Fix for new color depth filter feature if the session is not registered 
       any more.
+    - Add --logon-window-position option that allows custom placing of the logon
+      window on your desktop.
   * React to bug #627990, prefer man2html-base over man2html.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 24 Jun 2011 16:39:24 +0200
diff --git a/pyhoca-gui b/pyhoca-gui
index e41d346..2f2b0b0 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -166,8 +166,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, 'help': 'username for the session (default: current user)', },
-                   {'args':['-P','--session-profile'], 'default': None, 'help': 'directly connect to a session profile', },
+                   {'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':['--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)', },
@@ -184,6 +184,7 @@ x2go_gui_options = [
                    {'args':['--disable-printingprefs'], 'default': False, 'action': 'store_true', 'help': 'disable the client\'s printing preferences window', },
                    {'args':['--disable-profilemanager'], 'default': False, 'action': 'store_true', 'help': 'disable the session profile manager window', },
                    {'args':['--display'], 'default': None, 'metavar': '<hostname>:<screennumber>', 'help': 'set the DISPLAY environment variable to <hostname>:<screennumber>', },
+                   {'args':['--logon-window-position'], 'default': None, 'metavar': '<x-pos>x<y-pos>', 'help': 'give a custom position for the logon window, use negative values to position relative to right/bottom border', },
                  ]
 if _X2GOCLIENT_OS == 'Windows':
     x2go_gui_options.append(
@@ -191,27 +192,27 @@ if _X2GOCLIENT_OS == 'Windows':
         )
 
 backend_options = [
-                   {'args':['--backend-controlsession'], 'default': None, 'metavar': 'CONTROLSESSION_BACKEND', 'choices': BACKENDS_CONTROLSESSION.keys(), 'help': 'force usage of a certain CONTROLSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
-                   {'args':['--backend-terminalsession'], 'default': None, 'metavar': 'TERMINALSESSION_BACKEND', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain TERMINALSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
-                   {'args':['--backend-serversessioninfo'], 'default': None, 'metavar': 'SERVERSESSIONINFO_BACKEND', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain SERVERSESSIONINFO_BACKEND (do not use this unless you know exactly what you are doing)', },
-                   {'args':['--backend-serversessionlist'], 'default': None, 'metavar': 'SERVERSESSIONLIST_BACKEND', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain SERVERSESSIONLIST_BACKEND (do not use this unless you know exactly what you are doing)', },
-                   {'args':['--backend-proxy'], 'default': None, 'metavar': 'PROXY_BACKEND', 'choices': BACKENDS_PROXY.keys(), 'help': 'force usage of a certain PROXY_BACKEND (do not use this unless you know exactly what you are doing)', },
-                   {'args':['--backend-sessionprofiles'], 'default': None, 'metavar': 'SESSIONPROFILES_BACKEND', 'choices': _config_backends, 'help': 'use given backend for accessing session profiles, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _profiles_backend_default), },
-                   {'args':['--backend-clientsettings'], 'default': None, 'metavar': 'CLIENTSETTINGS_BACKEND', 'choices': _config_backends, 'help': 'use given backend for accessing the client settings configuration, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _settings_backend_default), },
-                   {'args':['--backend-clientprinting'], 'default': None, 'metavar': 'CLIENTPRINTING_BACKEND', 'choices': _config_backends, 'help': 'use given backend for accessing the client printing configuration, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _printing_backend_default), },
+                   {'args':['--backend-controlsession'], 'default': None, 'metavar': '<CONTROLSESSION_BACKEND>', 'choices': BACKENDS_CONTROLSESSION.keys(), 'help': 'force usage of a certain CONTROLSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
+                   {'args':['--backend-terminalsession'], 'default': None, 'metavar': '<TERMINALSESSION_BACKEND>', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain TERMINALSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
+                   {'args':['--backend-serversessioninfo'], 'default': None, 'metavar': '<SERVERSESSIONINFO_BACKEND>', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain SERVERSESSIONINFO_BACKEND (do not use this unless you know exactly what you are doing)', },
+                   {'args':['--backend-serversessionlist'], 'default': None, 'metavar': '<SERVERSESSIONLIST_BACKEND>', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain SERVERSESSIONLIST_BACKEND (do not use this unless you know exactly what you are doing)', },
+                   {'args':['--backend-proxy'], 'default': None, 'metavar': '<PROXY_BACKEND>', 'choices': BACKENDS_PROXY.keys(), 'help': 'force usage of a certain PROXY_BACKEND (do not use this unless you know exactly what you are doing)', },
+                   {'args':['--backend-sessionprofiles'], 'default': None, 'metavar': '<SESSIONPROFILES_BACKEND>', 'choices': _config_backends, 'help': 'use given backend for accessing session profiles, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _profiles_backend_default), },
+                   {'args':['--backend-clientsettings'], 'default': None, 'metavar': '<CLIENTSETTINGS_BACKEND>', 'choices': _config_backends, 'help': 'use given backend for accessing the client settings configuration, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _settings_backend_default), },
+                   {'args':['--backend-clientprinting'], 'default': None, 'metavar': '<CLIENTPRINTING_BACKEND>', 'choices': _config_backends, 'help': 'use given backend for accessing the client printing configuration, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _printing_backend_default), },
                   ]
 
 if _X2GOCLIENT_OS == 'Windows':
     contrib_options = [
                        {'args':['--start-xserver'], 'default': False, 'action': 'store_true', 'help': 'start the XServer before starting the session manager application, detect best XServer automatically, if more than one XServer is installed on your system', },
-                       {'args':['-X', '--preferred-xserver'], 'default': None, 'metavar': 'XSERVER', 'choices': _known_xservers, 'help': 'start either of the currently supported XServers: %s -- make sure your preferred XServer is installed on your system' % _known_xservers, },
+                       {'args':['-X', '--preferred-xserver'], 'default': None, 'metavar': '<XSERVER>', 'choices': _known_xservers, 'help': 'start either of the currently supported XServers: %s -- make sure your preferred XServer is installed on your system' % _known_xservers, },
                        {'args':['--start-pulseaudio'], 'default': False, 'action': 'store_true', 'help': 'start the PulseAudio server before starting the session manager application', },
                       ]
 
 portable_options = [
-                   {'args':['--client-rootdir'], 'default': None, 'help': 'define an alternative location where to find plain text config files (default: <HOME>/.x2goclient). This option will set ,,--backend-profiles FILE\'\', ,,--backend-clientsettings FILE\'\' and ,,--backend-clientprinting FILE\'\'', },
-                   {'args':['--sessions-rootdir'], 'default': None, 'help': 'define an alternative location for session runtime files'},
-                   {'args':['--ssh-rootdir'], 'default': None, 'help': 'define an alternative location for SSH files', },
+                   {'args':['--client-rootdir'], 'default': None, 'metavar': '</path/to/.x2goclient/dir>', 'help': 'define an alternative location where to find plain text config files (default: <HOME>/.x2goclient). This option will set ,,--backend-profiles FILE\'\', ,,--backend-clientsettings FILE\'\' and ,,--backend-clientprinting FILE\'\'', },
+                   {'args':['--sessions-rootdir'], 'default': None, 'metavar': '</path/to/.x2go/dir>', 'help': 'define an alternative location for session runtime files'},
+                   {'args':['--ssh-rootdir'], 'default': None, 'metavar': '</path/to/.ssh/dir>', 'help': 'define an alternative location for SSH files', },
                   ]
 
 
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index ce8244a..3d71b9d 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -130,6 +130,13 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
         if x2go.X2GOCLIENT_OS == 'Windows' and self.args.start_pulseaudio and os.environ.has_key('PYHOCAGUI_DEVELOPMENT') and os.environ['PYHOCAGUI_DEVELOPMENT'] == '1':
             _x2goclient_kwargs['pulseaudio_installdir'] = os.path.dirname(basepath.pulseaudio_binary)
 
+        try:
+            if self.args.logon_window_position:
+                self.logon_window_position_x = int(self.args.logon_window_position.split('x')[0])
+                self.logon_window_position_y = int(self.args.logon_window_position.split('x')[1])
+        except:
+            self.logon_window_position_x = self.logon_window_position_y = None
+
         x2go.X2goClient.__init__(self, **_x2goclient_kwargs)
         # We register one session per available session profile.
         # These registered sessions will be used to access the profile's 
diff --git a/pyhoca/wxgui/logon.py b/pyhoca/wxgui/logon.py
index 7010d6f..bc3d526 100644
--- a/pyhoca/wxgui/logon.py
+++ b/pyhoca/wxgui/logon.py
@@ -190,11 +190,31 @@ class PyHocaGUI_DialogBoxPassword(wx.Frame):
 
         maxX, maxY = wx.GetDisplaySize()
 
-        if (x2go.X2GOCLIENT_OS == 'Linux') and (WINDOW_MANAGER in ('gnome', 'awesome',)):
-            self.Move((maxX - (self.GetSize().GetWidth() + 20), 35))
+        if self._PyHocaGUI.logon_window_position_x and self._PyHocaGUI.logon_window_position_y:
+
+            # allow positioning of logon window via command line option
+            if self._PyHocaGUI.logon_window_position_x < 0:
+                move_x = maxX - (self.GetSize().GetWidth() + self._PyHocaGUI.logon_window_position_x)
+            else:
+                move_x = self._PyHocaGUI.logon_window_position_x
+            if self._PyHocaGUI.logon_window_position_y < 0:
+                move_y = maxX - (self.GetSize().GetHeight() + self._PyHocaGUI.logon_window_position_y)
+            else:
+                move_y = self._PyHocaGUI.logon_window_position_y
+
+        elif (x2go.X2GOCLIENT_OS == 'Linux') and (WINDOW_MANAGER in ('gnome', 'awesome',)):
+
+            # automatically place logon Window for GNOME, awesome
+            move_x = maxX - (self.GetSize().GetWidth() + 20)
+            move_y = 35
+
         else:
-            self.Move((maxX - (self.GetSize().GetWidth() + 20), maxY - (self.GetSize().GetHeight() + 70), ))
 
+            # automatically place logon Window for KDE4, LXDE, etc.
+            move_x = maxX - (self.GetSize().GetWidth() + 20)
+            move_y = maxY - (self.GetSize().GetHeight() + 70)
+
+        self.Move((move_x, move_y))
         self.Show()
 
     def OnLogin(self, evt):


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