style.
This commit is contained in:
parent
e78b00cce2
commit
4876bdf7ce
@ -35,8 +35,8 @@ from qutebrowser.utils import message, log, usertypes, utils, qtutils, objreg
|
||||
from qutebrowser.browser import webpage, hints, webelem
|
||||
|
||||
|
||||
LoadStatus = usertypes.enum('LoadStatus', ['none', 'success', 'success_https', 'error', 'warn',
|
||||
'loading'])
|
||||
LoadStatus = usertypes.enum('LoadStatus', ['none', 'success', 'success_https',
|
||||
'error', 'warn', 'loading'])
|
||||
|
||||
|
||||
tab_id_gen = itertools.count(0)
|
||||
|
@ -28,8 +28,8 @@ from qutebrowser.utils import usertypes
|
||||
|
||||
|
||||
# Note this has entries for success/error/warn from widgets.webview:LoadStatus
|
||||
UrlType = usertypes.enum('UrlType', ['success', 'success_https', ' error', 'warn', 'hover',
|
||||
'normal'])
|
||||
UrlType = usertypes.enum('UrlType', ['success', 'success_https', ' error',
|
||||
'warn', 'hover', 'normal'])
|
||||
|
||||
|
||||
class UrlText(textbase.TextBase):
|
||||
@ -120,8 +120,10 @@ class UrlText(textbase.TextBase):
|
||||
status_str: The LoadStatus as string.
|
||||
"""
|
||||
status = webview.LoadStatus[status_str]
|
||||
if status in (webview.LoadStatus.success, webview.LoadStatus.success_https,
|
||||
webview.LoadStatus.error, webview.LoadStatus.warn):
|
||||
if status in (webview.LoadStatus.success,
|
||||
webview.LoadStatus.success_https,
|
||||
webview.LoadStatus.error,
|
||||
webview.LoadStatus.warn):
|
||||
self._normal_url_type = UrlType[status_str]
|
||||
else:
|
||||
self._normal_url_type = UrlType.normal
|
||||
|
Loading…
Reference in New Issue
Block a user