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):
QMainWindow.__init__(self, mw)
#applyStyles(self)
applyStyles(self)
self.mw = mw
self.col = self.mw.col
self.currentRow = None

View file

@ -518,8 +518,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
self.form.statusbar.showMessage(text, timeout)
def setupStyle(self):
print "applystyles"
#applyStyles(self)
applyStyles(self)
# Key handling
##########################################################################
@ -941,15 +940,4 @@ they will be lost. Are you sure you want to continue?"""))
def setupProxy(self):
print "proxy"
return
import urllib2
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)
# need to bundle socksipy and install a default socket handler

View file

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