add styles back

This commit is contained in:
Damien Elmes 2011-12-08 05:11:08 +09:00
parent 08134c2462
commit 7ca5a23e7c
3 changed files with 6 additions and 21 deletions

View file

@ -305,7 +305,7 @@ class Browser(QMainWindow):
def __init__(self, mw): def __init__(self, mw):
QMainWindow.__init__(self, mw) QMainWindow.__init__(self, mw)
#applyStyles(self) applyStyles(self)
self.mw = mw self.mw = mw
self.col = self.mw.col self.col = self.mw.col
self.currentRow = None self.currentRow = None

View file

@ -518,8 +518,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
self.form.statusbar.showMessage(text, timeout) self.form.statusbar.showMessage(text, timeout)
def setupStyle(self): def setupStyle(self):
print "applystyles" applyStyles(self)
#applyStyles(self)
# Key handling # Key handling
########################################################################## ##########################################################################
@ -941,15 +940,4 @@ they will be lost. Are you sure you want to continue?"""))
def setupProxy(self): def setupProxy(self):
print "proxy" print "proxy"
return return
import urllib2 # need to bundle socksipy and install a default socket handler
if self.pm.profile['proxyHost']:
proxy = "http://"
if self.pm.profile['proxyUser']:
proxy += (self.pm.profile['proxyUser'] + ":" +
self.pm.profile['proxyPass'] + "@")
proxy += (self.pm.profile['proxyHost'] + ":" +
str(self.pm.profile['proxyPort']))
os.environ["http_proxy"] = proxy
proxy_handler = urllib2.ProxyHandler()
opener = urllib2.build_opener(proxy_handler)
urllib2.install_opener(opener)

View file

@ -310,12 +310,9 @@ def mungeQA(txt):
return txt return txt
def applyStyles(widget): def applyStyles(widget):
try: p = os.path.join(aqt.mw.pm.base, "style.css")
styleFile = open(os.path.join(aqt.mw.pm.profile.confDir, if os.path.exists(p):
"style.css")) widget.setStyleSheet(open(p).read())
widget.setStyleSheet(styleFile.read())
except (IOError, OSError):
pass
def getBase(col): def getBase(col):
base = None base = None