[X2Go-Commits] [pyhoca-gui] 01/01: drop unnecessary wxPython 2.6 code

git-admin at x2go.org git-admin at x2go.org
Wed Sep 24 12:53:13 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 fc7bda670b07eb7f4ade16280476e1a5d25ea57c
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Wed Sep 24 12:53:07 2014 +0200

    drop unnecessary wxPython 2.6 code
---
 pyhoca/wxgui/frontend.py       |    2 --
 pyhoca/wxgui/printingprefs.py  |    7 +------
 pyhoca/wxgui/profilemanager.py |   18 +++---------------
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index c353587..53347af 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -57,8 +57,6 @@ import listdesktops
 import serverinfo
 
 wx.SetDefaultPyEncoding("utf-8")
-if wx.__version__.startswith('2.'):
-    wx.InitAllImageHandlers()
 
 #def SetExitHandler(func):
 #    """\
diff --git a/pyhoca/wxgui/printingprefs.py b/pyhoca/wxgui/printingprefs.py
index 5ddbc3f..49c1129 100644
--- a/pyhoca/wxgui/printingprefs.py
+++ b/pyhoca/wxgui/printingprefs.py
@@ -409,15 +409,10 @@ class PyHocaGUI_PrintingPreferences(wx.Dialog):
         @type evt: C{obj}
 
         """
-        if wx.__version__.startswith('2.'):
-            _style = wx.OPEN | wx.CHANGE_DIR
-        else:
-            _style = wx.FD_OPEN | wx.FD_CHANGE_DIR
-
         wildcard = "All files (*.*)|*"
         dlg = wx.FileDialog(
             self, message=_(u"Choose PDF viewer application"), defaultDir=_LOCAL_HOME,
-            defaultFile="", wildcard=wildcard, style=_style )
+            defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
         # Show the dialog and retrieve the user response. If it is the OK response,
         # process the data.
         if dlg.ShowModal() == wx.ID_OK:
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index be1e5d9..7fa9c83 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -1509,13 +1509,9 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
             iconsdir = os.getcwd()
         wildcard = _(u"Icon Files (*.png)|*.png|" \
                      u"All files (*.*)|*")
-        if wx.__version__.startswith('2.'):
-            _style = wx.OPEN | wx.CHANGE_DIR
-        else:
-            _style = wx.FD_OPEN | wx.FD_CHANGE_DIR
         dlg = wx.FileDialog(
             self, message=_(u"Choose an icon for this session profile"), defaultDir=iconsdir,
-            defaultFile="", wildcard=wildcard, style=_style )
+            defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
         # Show the dialog and retrieve the user response. If it is the OK response,
         # process the data.
         if dlg.ShowModal() == wx.ID_OK:
@@ -1964,13 +1960,9 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         if not os.path.exists(sshdir):
             sshdir = os.getcwd()
         wildcard = _(u"All files (*.*)|*")
-        if wx.__version__.startswith('2.'):
-            _style = wx.OPEN | wx.CHANGE_DIR
-        else:
-            _style = wx.FD_OPEN | wx.FD_CHANGE_DIR
         dlg = wx.FileDialog(
             self, message=_(u"Choose a public SSH key"), defaultDir=sshdir,
-            defaultFile="", wildcard=wildcard, style=_style )
+            defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
         # Show the dialog and retrieve the user response. If it is the OK response,
         # process the data.
         if dlg.ShowModal() == wx.ID_OK:
@@ -1992,13 +1984,9 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
         if not os.path.exists(sshdir):
             sshdir = os.getcwd()
         wildcard = "All files (*.*)|*"
-        if wx.__version__.startswith('2.'):
-            _style = wx.OPEN | wx.CHANGE_DIR
-        else:
-            _style = wx.FD_OPEN | wx.FD_CHANGE_DIR
         dlg = wx.FileDialog(
             self, message=_(u"Choose a public SSH key"), defaultDir=sshdir,
-            defaultFile="", wildcard=wildcard, style=_style )
+            defaultFile="", wildcard=wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR )
         # Show the dialog and retrieve the user response. If it is the OK response,
         # process the data.
         if dlg.ShowModal() == wx.ID_OK:

--
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