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

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:55:10 CEST 2013


The branch, twofactorauth has been updated
       via  e04b5cc0461a318a3623dc1bc84381ee8ad3666f (commit)
      from  4b911e852a469a1f717cf464da81f0209b439470 (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         |    2 ++
 pyhoca-gui               |    1 +
 pyhoca/wxgui/frontend.py |    7 +++++++
 pyhoca/wxgui/logon.py    |   26 +++++++++++++++++++++++---
 4 files changed, 33 insertions(+), 3 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 6ff87fc..2f2b0b0 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -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(
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