Fix various typos/bugs

This commit is contained in:
Florian Bruhin 2017-06-13 12:22:04 +02:00
parent 3e3685b68b
commit 1ed8df8903
4 changed files with 6 additions and 6 deletions

View File

@ -292,7 +292,7 @@ class HostBlocker:
message.info("adblock: Read {} hosts from {} sources.".format(
len(self._blocked_hosts), self._done_count))
@config.change_filter('content.host-blocking.lists')
@config.change_filter('content.host_blocking.lists')
def on_config_changed(self):
"""Update files when the config changed."""
if config.val.content.host_blocking.lists is None:

View File

@ -1054,7 +1054,7 @@ content.cookies.accept:
- never: "Don't accept cookies at all."
desc: Control which cookies to accept.
cookies.cookies.store:
content.cookies.store:
default: true
type: Bool
desc: Whether to store cookies. Note this option needs a restart with QtWebEngine

View File

@ -139,7 +139,7 @@ class NewConfigManager(QObject):
try:
val = self._values[option]
except KeyError as e:
raise configexc.NoOptionError(e)
raise configexc.NoOptionError(option)
return val.typ.from_py(val.default)
@ -173,7 +173,7 @@ class ConfigContainer:
if configdata.is_valid_prefix(name):
return ConfigContainer(manager=self._manager, prefix=name)
# If it's not a valid prefix, this will raise NoOptionError.
self._manager.get(name)
return self._manager.get(name)
def __setattr__(self, attr, value):
if attr.startswith('_'):

View File

@ -412,11 +412,11 @@ class TabBar(QTabBar):
self.setFont(config.val.fonts.tabbar)
self.set_icon_size()
@config.change_filter('tabs.favicon.scale')
@config.change_filter('tabs.favicons.scale')
def set_icon_size(self):
"""Set the tab bar favicon size."""
size = self.fontMetrics().height() - 2
size *= config.val.tabs.favicon.scale
size *= config.val.tabs.favicons.scale
self.setIconSize(QSize(size, size))
@config.change_filter('colors.tabs.bar.bg')