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
|
from qutebrowser.browser import webpage, hints, webelem
|
||||||
|
|
||||||
|
|
||||||
LoadStatus = usertypes.enum('LoadStatus', ['none', 'success', 'success_https', 'error', 'warn',
|
LoadStatus = usertypes.enum('LoadStatus', ['none', 'success', 'success_https',
|
||||||
'loading'])
|
'error', 'warn', 'loading'])
|
||||||
|
|
||||||
|
|
||||||
tab_id_gen = itertools.count(0)
|
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
|
# Note this has entries for success/error/warn from widgets.webview:LoadStatus
|
||||||
UrlType = usertypes.enum('UrlType', ['success', 'success_https', ' error', 'warn', 'hover',
|
UrlType = usertypes.enum('UrlType', ['success', 'success_https', ' error',
|
||||||
'normal'])
|
'warn', 'hover', 'normal'])
|
||||||
|
|
||||||
|
|
||||||
class UrlText(textbase.TextBase):
|
class UrlText(textbase.TextBase):
|
||||||
@ -120,8 +120,10 @@ class UrlText(textbase.TextBase):
|
|||||||
status_str: The LoadStatus as string.
|
status_str: The LoadStatus as string.
|
||||||
"""
|
"""
|
||||||
status = webview.LoadStatus[status_str]
|
status = webview.LoadStatus[status_str]
|
||||||
if status in (webview.LoadStatus.success, webview.LoadStatus.success_https,
|
if status in (webview.LoadStatus.success,
|
||||||
webview.LoadStatus.error, webview.LoadStatus.warn):
|
webview.LoadStatus.success_https,
|
||||||
|
webview.LoadStatus.error,
|
||||||
|
webview.LoadStatus.warn):
|
||||||
self._normal_url_type = UrlType[status_str]
|
self._normal_url_type = UrlType[status_str]
|
||||||
else:
|
else:
|
||||||
self._normal_url_type = UrlType.normal
|
self._normal_url_type = UrlType.normal
|
||||||
|
Loading…
Reference in New Issue
Block a user