示例#1
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    if (section, option) == ('general', 'private-browsing'):
        _init_private_browsing()
    elif section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _set_user_stylesheet()

    websettings.update_mappings(MAPPINGS, section, option)
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    cache_path = standarddir.cache()
    if (section, option) == ('general', 'private-browsing'):
        if config.get('general', 'private-browsing') or cache_path is None:
            QWebSettings.setIconDatabasePath('')
        else:
            QWebSettings.setIconDatabasePath(cache_path)
    websettings.update_mappings(MAPPINGS, section, option)
示例#3
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    cache_path = standarddir.cache()
    if (section, option) == ('general', 'private-browsing'):
        if config.get('general', 'private-browsing') or cache_path is None:
            QWebSettings.setIconDatabasePath('')
        else:
            QWebSettings.setIconDatabasePath(cache_path)
    websettings.update_mappings(MAPPINGS, section, option)
示例#4
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, section, option)
    if section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _init_stylesheet(default_profile)
        _init_stylesheet(private_profile)
    elif section == 'network' and option == 'user-agent':
        _set_user_agent(default_profile)
        _set_user_agent(private_profile)
示例#5
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, section, option)
    if section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _init_stylesheet(default_profile)
        _init_stylesheet(private_profile)
    elif section == 'network' and option == 'user-agent':
        _set_user_agent(default_profile)
        _set_user_agent(private_profile)
示例#6
0
def _update_settings(option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, option)
    if option in ['scrolling.bar', 'content.user_stylesheets']:
        _init_stylesheet(default_profile)
        _init_stylesheet(private_profile)
    elif option in ['content.headers.user_agent',
                    'content.headers.accept_language']:
        _set_http_headers(default_profile)
        _set_http_headers(private_profile)
示例#7
0
def _update_settings(option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, option)
    if option in ['scrolling.bar', 'content.user_stylesheets']:
        _init_stylesheet(default_profile)
        _init_stylesheet(private_profile)
    elif option in ['content.headers.user_agent',
                    'content.headers.accept_language']:
        _set_http_headers(default_profile)
        _set_http_headers(private_profile)
示例#8
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    if (section, option) == ('general', 'private-browsing'):
        cache_path = standarddir.cache()
        if config.get('general', 'private-browsing') or cache_path is None:
            QWebSettings.setIconDatabasePath('')
        else:
            QWebSettings.setIconDatabasePath(cache_path)
    elif section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _set_user_stylesheet()

    websettings.update_mappings(MAPPINGS, section, option)
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    if (section, option) == ('general', 'private-browsing'):
        cache_path = standarddir.cache()
        if config.get('general', 'private-browsing') or cache_path is None:
            QWebSettings.setIconDatabasePath('')
        else:
            QWebSettings.setIconDatabasePath(cache_path)
    elif section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _set_user_stylesheet()

    websettings.update_mappings(MAPPINGS, section, option)
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, section, option)
    profile = QWebEngineProfile.defaultProfile()
    if section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _init_stylesheet(profile)
示例#11
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, section, option)
    profile = QWebEngineProfile.defaultProfile()
    if section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _init_stylesheet(profile)
示例#12
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, section, option)
def _update_settings(option):
    """Update global settings when qwebsettings changed."""
    if option in ['scrollbar.hide', 'content.user_stylesheets']:
        _set_user_stylesheet()
    websettings.update_mappings(MAPPINGS, option)
示例#14
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    websettings.update_mappings(MAPPINGS, section, option)
示例#15
0
def update_settings(section, option):
    """Update global settings when qwebsettings changed."""
    if section == 'ui' and option in ['hide-scrollbar', 'user-stylesheet']:
        _set_user_stylesheet()

    websettings.update_mappings(MAPPINGS, section, option)