diff --git a/qutebrowser/app.py b/qutebrowser/app.py index a8aecb562..9106fbcd4 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -98,7 +98,6 @@ class QuteBrowser(QApplication): else: confdir = self._args.confdir config.init(confdir) - style.init() self.commandparser = cmdutils.CommandParser() self.searchparser = cmdutils.SearchParser() diff --git a/qutebrowser/config/style.py b/qutebrowser/config/style.py index 119cbddbe..015c048e8 100644 --- a/qutebrowser/config/style.py +++ b/qutebrowser/config/style.py @@ -19,18 +19,6 @@ import qutebrowser.config.config as config -colordict = {} -fontdict = {} - -def init(): - """Initialize the global objects based on the config.""" - global colordict, fontdict - try: - colordict = ColorDict(config.config['colors']) - except KeyError: - colordict = ColorDict() - fontdict = FontDict(config.config['fonts']) - def get_stylesheet(template): """Format a stylesheet based on a template. @@ -42,7 +30,8 @@ def get_stylesheet(template): The formatted template as string. """ - return template.strip().format(color=colordict, font=fontdict) + return template.strip().format(color=ColorDict(config.config['colors']), + font=FontDict(config.config['fonts'])) class ColorDict(dict):