From c83775cf294d40ffd0b684dfc61aead14d7e9d69 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 18 Mar 2015 20:20:04 +0100 Subject: [PATCH] Update icon db path when private-browsing changed. --- qutebrowser/config/websettings.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/qutebrowser/config/websettings.py b/qutebrowser/config/websettings.py index 8fc4f1084..61873bd01 100644 --- a/qutebrowser/config/websettings.py +++ b/qutebrowser/config/websettings.py @@ -394,9 +394,15 @@ def init(): def update_settings(section, option): """Update global settings when qwebsettings changed.""" - try: - mapping = MAPPINGS[section][option] - except KeyError: - return - value = config.get(section, option) - mapping.set(value) + if (section, option) == ('general', 'private-browsing'): + if config.get('general', 'private-browsing'): + QWebSettings.setIconDatabasePath('') + else: + QWebSettings.setIconDatabasePath(standarddir.cache()) + else: + try: + mapping = MAPPINGS[section][option] + except KeyError: + return + value = config.get(section, option) + mapping.set(value)