Web+: Update URL on LoadFinished and LoadCommitted

* LoadFinished is called after redirects have taken place, so we can
show the final URL. It's also called for navigation inside a document
(jumping to anchors), whereas LoadCommitted is not.
* LoadCommitted is called earlier so we also want to set the URL there.
This commit is contained in:
Adrien Destugues 2014-09-04 16:29:43 +02:00
parent 6e38076e81
commit f59dadc4d4

View File

@ -1520,6 +1520,8 @@ BrowserWindow::LoadFinished(const BString& url, BWebView* view)
if (view != CurrentWebView()) if (view != CurrentWebView())
return; return;
fURLInputGroup->SetText(url.String());
BString status(B_TRANSLATE_COMMENT("%url finished", "Loading URL " BString status(B_TRANSLATE_COMMENT("%url finished", "Loading URL "
"finished. Don't translate variable %url.")); "finished. Don't translate variable %url."));
status.ReplaceFirst("%url", url); status.ReplaceFirst("%url", url);