Don't use 0 as window ID for early messages.

The issue here was that only message calls with 'current' as window get cached
if the window is unavailable. We used 0 instead.

Fixes #815.
See #812.
This commit is contained in:
Florian Bruhin 2015-07-14 18:36:12 +02:00
parent 60b6652006
commit 63ff39ad65
2 changed files with 6 additions and 5 deletions

View File

@ -272,8 +272,8 @@ def process_pos_args(args, via_ipc=False, cwd=None):
try:
url = urlutils.fuzzy_url(cmd, cwd, relative=True)
except urlutils.FuzzyUrlError as e:
message.error(0, "Error in startup argument '{}': {}".format(
cmd, e))
message.error('current', "Error in startup argument '{}': "
"{}".format(cmd, e))
else:
open_target = config.get('general', 'new-instance-open-target')
background = open_target in ('tab-bg', 'tab-bg-silent')
@ -302,8 +302,8 @@ def _open_startpage(win_id=None):
try:
url = urlutils.fuzzy_url(urlstr, do_search=False)
except urlutils.FuzzyUrlError as e:
message.error(0, "Error when opening startpage: {}".format(
e))
message.error('current', "Error when opening startpage: "
"{}".format(e))
tabbed_browser.tabopen(QUrl('about:blank'))
else:
tabbed_browser.tabopen(url)

View File

@ -75,7 +75,8 @@ class QuickmarkManager(QObject):
try:
key, url = line.rsplit(maxsplit=1)
except ValueError:
message.error(0, "Invalid quickmark '{}'".format(line))
message.error('current', "Invalid quickmark '{}'".format(
line))
else:
self.marks[key] = url
filename = os.path.join(standarddir.config(), 'quickmarks')