Fix getting URL for startup commands.

This commit is contained in:
Florian Bruhin 2014-09-29 19:56:37 +02:00
parent 42a1d7028d
commit 45ac2e4835

View File

@ -32,10 +32,12 @@ def replace_variables(win_id, arglist):
args = []
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=win_id)
url = tabbed_browser.current_url().toString(QUrl.FullyEncoded |
QUrl.RemovePassword)
for arg in arglist:
if arg == '{url}':
# Note we have to do this in here as the user gets an error message
# by current_url if no URL is open yet.
url = tabbed_browser.current_url().toString(QUrl.FullyEncoded |
QUrl.RemovePassword)
args.append(url)
else:
args.append(arg)