Add warning for dead_actute warning.
Yo dawg, I herd you like warnings!
This commit is contained in:
parent
6a6807fde9
commit
3b2ae6bcf1
@ -65,7 +65,8 @@ from qutebrowser.config.iniparsers import ReadWriteConfigParser
|
||||
from qutebrowser.config.lineparser import LineConfigParser
|
||||
from qutebrowser.browser.cookies import CookieJar
|
||||
from qutebrowser.utils.message import MessageBridge
|
||||
from qutebrowser.utils.misc import dotted_getattr, get_standard_dir
|
||||
from qutebrowser.utils.misc import (dotted_getattr, get_standard_dir,
|
||||
actute_warning)
|
||||
from qutebrowser.utils.debug import set_trace # pylint: disable=unused-import
|
||||
|
||||
|
||||
@ -122,6 +123,7 @@ class QuteBrowser(QApplication):
|
||||
self._args = self._parse_args()
|
||||
self._init_log()
|
||||
self._init_misc()
|
||||
actute_warning()
|
||||
self._init_config()
|
||||
self._init_modes()
|
||||
websettings.init()
|
||||
|
@ -155,3 +155,18 @@ def get_standard_dir(typ):
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
return path
|
||||
|
||||
|
||||
def actute_warning():
|
||||
"""Display a warning about the dead_actute issue if needed."""
|
||||
if not (sys.platform.startswith('linux') and
|
||||
os.path.exists('/usr/share/X11/locale/en_US.UTF-8/Compose')):
|
||||
return
|
||||
with open('/usr/share/X11/locale/en_US.UTF-8/Compose', 'r') as f:
|
||||
for line in f:
|
||||
if '<dead_actute>' in line:
|
||||
print("Note: If you got a 'dead_actute' warning above, that "
|
||||
"is not a bug in qutebrowser! See "
|
||||
"https://bugs.freedesktop.org/show_bug.cgi?id=69476 for "
|
||||
"details.")
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user