Initialize profiles with spellchecking turn on by default.
This commit is contained in:
parent
fd9a5fa334
commit
4bac2f3e44
@ -137,7 +137,9 @@ class DictionaryLanguageSetter(DefaultProfileSetter):
|
||||
def _find_installed(self, code):
|
||||
installed_file = spell.installed_file(code)
|
||||
if not installed_file:
|
||||
message.warning('Language {} is not installed.'.format(code))
|
||||
message.warning(
|
||||
'Language {} is not installed - see scripts/install_dict.py '
|
||||
'in qutebrowser\'s sources'.format(code))
|
||||
return installed_file
|
||||
|
||||
def _set(self, value, settings=None):
|
||||
@ -219,6 +221,10 @@ def _init_profiles():
|
||||
_init_stylesheet(private_profile)
|
||||
_set_http_headers(private_profile)
|
||||
|
||||
if qtutils.version_check('5.8'):
|
||||
default_profile.setSpellCheckEnabled(True)
|
||||
private_profile.setSpellCheckEnabled(True)
|
||||
|
||||
|
||||
def init(args):
|
||||
"""Initialize the global QWebSettings."""
|
||||
|
@ -149,7 +149,7 @@ def install_lang(lang):
|
||||
print('Installing {}: {}'.format(lang.code, lang.name))
|
||||
lang_url = urllib.parse.urljoin(API_URL, lang.file_path, '?format=TEXT')
|
||||
if not os.path.isdir(spell.dictionary_dir()):
|
||||
warn_msg = 'WARN: {} does not exist, creating the directory'
|
||||
warn_msg = '{} does not exist, creating the directory'
|
||||
print(warn_msg.format(spell.dictionary_dir()))
|
||||
os.makedirs(spell.dictionary_dir())
|
||||
print('Downloading {}'.format(lang_url))
|
||||
|
Loading…
Reference in New Issue
Block a user