From 78ff4dc03d8315d23b5a3a1282d31a788a4733e7 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 23 Dec 2011 16:48:23 +0200 Subject: [PATCH] Show the list of proxies detected from system settings (informative only) --- .../pyfaGlobalPreferences.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gui/builtinPreferenceViews/pyfaGlobalPreferences.py b/gui/builtinPreferenceViews/pyfaGlobalPreferences.py index be8523ad8..7578f2828 100644 --- a/gui/builtinPreferenceViews/pyfaGlobalPreferences.py +++ b/gui/builtinPreferenceViews/pyfaGlobalPreferences.py @@ -1,5 +1,6 @@ import wx import service +import urllib2 from gui.preferenceView import PreferenceView from gui import bitmapLoader @@ -85,6 +86,23 @@ class PFGlobalPref ( PreferenceView): psetSizer.Add( self.editProxySettings, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) mainSizer.Add( psetSizer, 0, wx.EXPAND, 5) + self.stPSAutoDetected = wx.StaticText( panel, wx.ID_ANY, u"Auto-detected: ", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.stPSAutoDetected.Wrap( -1 ) + mainSizer.Add( self.stPSAutoDetected, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 ) + + ps = urllib2.ProxyHandler().proxies + txt = "Auto-detected: " + + for type in ps: + txt += ps[type] + txt += " " + + if len(ps) == 0: + txt += "None" + + self.stPSAutoDetected.SetLabel(txt) + self.stPSAutoDetected.Disable() + cChar = service.Character.getInstance() charList = cChar.getCharacterList()