From cb8b9e4ffd504ced209fb21ee0c4c577f3ae3554 Mon Sep 17 00:00:00 2001 From: stippi Date: Fri, 19 Mar 2010 13:03:26 +0000 Subject: [PATCH] Some notifications are now channeled through BWebPage, the loading progress and status. This allows the browser to set those properties to the current page when switching pages. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@333 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/BrowserWindow.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 55cac2f605..ad6a19b6e1 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -832,7 +832,7 @@ BrowserWindow::CreateNewTab(const BString& url, bool select, BWebView* webView) if (select) { fTabManager->SelectTab(fTabManager->CountTabs() - 1); SetCurrentWebView(webView); - NavigationCapabilitiesChanged(false, false, false, webView); + webView->WebPage()->ResendNotifications(); if (fURLTextControl) { fURLTextControl->SetText(url.String()); fURLTextControl->MakeFocus(true); @@ -880,7 +880,7 @@ BrowserWindow::LoadNegotiating(const BString& url, BWebView* view) { BString status("Requesting: "); status << url; - StatusChanged(status, view); + view->WebPage()->SetStatusMessage(status); } @@ -896,7 +896,7 @@ BrowserWindow::LoadCommitted(const BString& url, BWebView* view) BString status("Loading: "); status << url; - StatusChanged(status, view); + view->WebPage()->SetStatusMessage(status); } @@ -909,6 +909,8 @@ BrowserWindow::LoadProgress(float progress, BWebView* view) if (fLoadingProgressBar) { if (progress < 100 && fLoadingProgressBar->IsHidden()) fLoadingProgressBar->Show(); + else if (progress == 100 && !fLoadingProgressBar->IsHidden()) + fLoadingProgressBar->Hide(); fLoadingProgressBar->SetTo(progress); } } @@ -922,7 +924,7 @@ BrowserWindow::LoadFailed(const BString& url, BWebView* view) BString status(url); status << " failed."; - StatusChanged(status, view); + view->WebPage()->SetStatusMessage(status); if (fLoadingProgressBar && !fLoadingProgressBar->IsHidden()) fLoadingProgressBar->Hide(); } @@ -936,7 +938,7 @@ BrowserWindow::LoadFinished(const BString& url, BWebView* view) BString status(url); status << " finished."; - StatusChanged(status, view); + view->WebPage()->SetStatusMessage(status); if (fLoadingProgressBar && !fLoadingProgressBar->IsHidden()) fLoadingProgressBar->Hide();