[X2Go-Commits] [pyhoca-gui] 02/02: pyhoca/wxgui/logon.py: Use wx.Cursor with wxgtk4.0.

git-admin at x2go.org git-admin at x2go.org
Fri Dec 27 13:43:07 CET 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository pyhoca-gui.

commit 9b06a33a4c355f603433770c641e0433ab7e29bf
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Dec 27 12:39:50 2019 +0000

    pyhoca/wxgui/logon.py: Use wx.Cursor with wxgtk4.0.
---
 debian/changelog      |  1 +
 pyhoca/wxgui/logon.py | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0d3c67a..e0a0041 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ pyhoca-gui (0.6.1.1-0x2go1) UNRELEASED; urgency=medium
   * New upstream version (0.6.1.1):
     - pyhoca/wxgui/frontend.py: Fix loading PyHocaGUI_DialogBoxPassphrase from
       wrong module (passphrase -> logon).
+    - pyhoca/wxgui/logon.py: Use wx.Cursor with wxgtk4.0.
 
  -- X2Go Release Manager <git-admin at x2go.org>  Fri, 27 Dec 2019 07:42:21 +0100
 
diff --git a/pyhoca/wxgui/logon.py b/pyhoca/wxgui/logon.py
index 9853299..bda4364 100644
--- a/pyhoca/wxgui/logon.py
+++ b/pyhoca/wxgui/logon.py
@@ -33,6 +33,8 @@ import wx
 import os
 import base64
 
+wx_major = int(wx.__version__.split('.')[0])
+
 if 'DESKTOP_SESSION' in os.environ:
     WINDOW_MANAGER = os.environ['DESKTOP_SESSION']
 else:
@@ -471,7 +473,10 @@ class PyHocaGUI_DialogBoxPassword(wx.Dialog):
                 raise
 
         self._PyHocaGUI.notifier.send(self.current_profile_name, context='AUTH_%s' % self.current_profile_name, timeout=4000)
-        wx.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
+        if wx_major >= 4:
+            wx.Cursor(wx.CURSOR_ARROW)
+        else:
+            wx.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
         # Windows's GUI is more picky then Linux's GTK GUI about EndBusyCursor if cursor is not busy...
         try: wx.EndBusyCursor()
         except: pass
@@ -805,7 +810,10 @@ class PyHocaGUI_DialogBoxPassphrase(wx.Dialog):
 
         self._PyHocaGUI.notifier.send(self.current_profile_name, context='AUTH_%s' % self.current_profile_name, timeout=4000)
 
-        wx.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
+        if wx_major >= 4:
+            wx.Cursor(wx.CURSOR_ARROW)
+        else:
+            wx.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
         # Windows's GUI is more picky then Linux's GTK GUI about EndBusyCursor if cursor is not busy...
         try: wx.EndBusyCursor()
         except: pass

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git


More information about the x2go-commits mailing list