[X2Go-Commits] [pyhoca-gui] 03/03: (Now really) Support Python wxWidgets 3.0.

git-admin at x2go.org git-admin at x2go.org
Tue Sep 30 15:02:01 CEST 2014


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

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

commit b5dada2c7fd772e90d148c0a1403aef43138ea23
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Sep 30 15:01:52 2014 +0200

    (Now really) Support Python wxWidgets 3.0.
---
 debian/changelog               |    2 +-
 pyhoca-gui                     |    5 +++++
 pyhoca/wxgui/about.py          |    5 -----
 pyhoca/wxgui/brokerlogon.py    |    7 -------
 pyhoca/wxgui/frontend.py       |    8 --------
 pyhoca/wxgui/launcher.py       |   14 +++++---------
 pyhoca/wxgui/listdesktops.py   |    7 -------
 pyhoca/wxgui/logon.py          |    7 -------
 pyhoca/wxgui/menus_taskbar.py  |    5 -----
 pyhoca/wxgui/messages.py       |    5 -----
 pyhoca/wxgui/notify.py         |    5 -----
 pyhoca/wxgui/passphrase.py     |    5 -----
 pyhoca/wxgui/printingprefs.py  |    5 -----
 pyhoca/wxgui/profilemanager.py |    5 -----
 pyhoca/wxgui/serverinfo.py     |    7 -------
 pyhoca/wxgui/sessiontitle.py   |    7 -------
 pyhoca/wxgui/splash.py         |    5 -----
 pyhoca/wxgui/taskbar.py        |    7 -------
 18 files changed, 11 insertions(+), 100 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b742784..58bc84d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low
 
   [ Mike Gabriel ]
   * New upstream version (0.5.0.0):
-    - Support Python wxWidgets 3.0.
+    - (Now really) Support Python wxWidgets 3.0.
     - Add X2Go Session Broker support.
     - Adapt to new backend concept found in Python X2Go (>= 0.5.0.0).
     - Move most code of the pyhoca-gui executable into a dedicated class
diff --git a/pyhoca-gui b/pyhoca-gui
index c45acca..f1d2c0c 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -22,6 +22,11 @@
 import os
 import sys
 
+try:
+    import wxversion
+    wxversion.select(['3.0', '2.9', '2.8'])
+except: pass
+
 PROG_NAME = "PyHoca-GUI"
 try:
     from pyhoca.wxgui.mswin_logging import setup_mswinlog
diff --git a/pyhoca/wxgui/about.py b/pyhoca/wxgui/about.py
index ea846b1..ad9349e 100644
--- a/pyhoca/wxgui/about.py
+++ b/pyhoca/wxgui/about.py
@@ -22,11 +22,6 @@ modules ={}
 
 import os
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
diff --git a/pyhoca/wxgui/brokerlogon.py b/pyhoca/wxgui/brokerlogon.py
index 29d2ec7..47e7f0a 100644
--- a/pyhoca/wxgui/brokerlogon.py
+++ b/pyhoca/wxgui/brokerlogon.py
@@ -20,18 +20,11 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
 # gevent
 import gevent
-import gevent.monkey
-gevent.monkey.patch_all()
 
 import wx
 import os
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 53347af..6aba1de 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -20,18 +20,11 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import os
 
 # Python X2Go
 import x2go
 import gevent
-import gevent.monkey
-gevent.monkey.patch_all()
 
 import wx
 
@@ -238,7 +231,6 @@ class PyHocaGUI(wx.App, x2go.X2GoClient):
         x2go.X2GoClient.__init__(self, **_x2goclient_kwargs)
 
         wx.App.__init__(self, redirect=False, clearSigInt=False)
-
         #SetExitHandler(self._exit_handler)
 
         if not self.args.disable_splash:
diff --git a/pyhoca/wxgui/launcher.py b/pyhoca/wxgui/launcher.py
index 340d8ca..152d239 100644
--- a/pyhoca/wxgui/launcher.py
+++ b/pyhoca/wxgui/launcher.py
@@ -29,16 +29,13 @@ import gettext
 import subprocess
 import copy
 
-import gevent.monkey
-gevent.monkey.patch_all()
-
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import wx
 
+# we need to register a wx.App() instance before we load any
+# of the X2Go modules. When importing x2go.*, gevent.monkey_patch_all()
+# is called which seems to break wxPython 3.0...
+_dummy_app = wx.App(redirect=False, clearSigInt=False)
+
 from x2go import X2GOCLIENT_OS
 from x2go import CURRENT_LOCAL_USER
 from x2go import BACKENDS
@@ -393,7 +390,6 @@ VERSION: %s
 
         if self.check_running():
             sys.stderr.write("\n###############################\n### %s: already running for user %s\n###############################\n" % (self.PROG_NAME, CURRENT_LOCAL_USER))
-            _dummy_app = wx.App()
             _dummy_app.appname = self.PROG_NAME
             m = PyHoca_MessageWindow_Ok(_dummy_app, shortmsg='ALREADY_RUNNING', title=u'%s (%s)...' % (self.PROG_NAME, self.VERSION), icon='{progname}_trayicon'.format(progname=self.PROG_NAME))
             m.ShowModal()
diff --git a/pyhoca/wxgui/listdesktops.py b/pyhoca/wxgui/listdesktops.py
index 8d553f0..d6010cf 100644
--- a/pyhoca/wxgui/listdesktops.py
+++ b/pyhoca/wxgui/listdesktops.py
@@ -20,18 +20,11 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
 # gevent
 import gevent
-import gevent.monkey
-gevent.monkey.patch_all()
 
 import wx
 import os
diff --git a/pyhoca/wxgui/logon.py b/pyhoca/wxgui/logon.py
index dc35875..d02c108 100644
--- a/pyhoca/wxgui/logon.py
+++ b/pyhoca/wxgui/logon.py
@@ -20,18 +20,11 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
 # gevent
 import gevent
-import gevent.monkey
-gevent.monkey.patch_all()
 
 import wx
 import os
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index 0451227..2a1a674 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -18,11 +18,6 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import os.path
 import wx
 import re
diff --git a/pyhoca/wxgui/messages.py b/pyhoca/wxgui/messages.py
index 15ce000..c1a7330 100644
--- a/pyhoca/wxgui/messages.py
+++ b/pyhoca/wxgui/messages.py
@@ -21,11 +21,6 @@
 #     Dick Kniep <dick.kniep at lindix.nl>
 
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import wx
 import os
 
diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index 4e15251..db1ceba 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -18,11 +18,6 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import wx
 from x2go import X2GOCLIENT_OS
 from x2go import log
diff --git a/pyhoca/wxgui/passphrase.py b/pyhoca/wxgui/passphrase.py
index 6929445..9b3c029 100644
--- a/pyhoca/wxgui/passphrase.py
+++ b/pyhoca/wxgui/passphrase.py
@@ -20,11 +20,6 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
diff --git a/pyhoca/wxgui/printingprefs.py b/pyhoca/wxgui/printingprefs.py
index 49c1129..e3e72da 100644
--- a/pyhoca/wxgui/printingprefs.py
+++ b/pyhoca/wxgui/printingprefs.py
@@ -21,11 +21,6 @@
 import os
 import re
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import wx
 
 import x2go.log as log
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index 7fa9c83..1aae3d2 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -18,11 +18,6 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import wx
 import os
 import copy
diff --git a/pyhoca/wxgui/serverinfo.py b/pyhoca/wxgui/serverinfo.py
index 2a095b1..6e5bdd8 100644
--- a/pyhoca/wxgui/serverinfo.py
+++ b/pyhoca/wxgui/serverinfo.py
@@ -20,18 +20,11 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
 # gevent
 import gevent
-import gevent.monkey
-gevent.monkey.patch_all()
 
 import wx
 import os
diff --git a/pyhoca/wxgui/sessiontitle.py b/pyhoca/wxgui/sessiontitle.py
index e9781a0..14edff8 100644
--- a/pyhoca/wxgui/sessiontitle.py
+++ b/pyhoca/wxgui/sessiontitle.py
@@ -20,18 +20,11 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
 # gevent
 import gevent
-import gevent.monkey
-gevent.monkey.patch_all()
 
 import wx
 import os
diff --git a/pyhoca/wxgui/splash.py b/pyhoca/wxgui/splash.py
index cf9ff4c..4dc9531 100644
--- a/pyhoca/wxgui/splash.py
+++ b/pyhoca/wxgui/splash.py
@@ -18,11 +18,6 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 import wx
 import os
 
diff --git a/pyhoca/wxgui/taskbar.py b/pyhoca/wxgui/taskbar.py
index d14b181..e8847cf 100644
--- a/pyhoca/wxgui/taskbar.py
+++ b/pyhoca/wxgui/taskbar.py
@@ -20,17 +20,10 @@
 
 modules ={}
 
-try:
-    import wxversion
-    wxversion.select(['3.0', '2.9', '2.8'])
-except: pass
-
 # Python X2Go
 import x2go
 
 import gevent
-import gevent.monkey
-gevent.monkey.patch_all()
 
 import wx
 

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git


More information about the x2go-commits mailing list