diff options
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 5b08e17a..efabf0f1 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -327,6 +327,12 @@ void MainView::slotCurrentChanged(int index) currentUrlBar()->setUrl(webView->url()); emit showStatusBarMessage(webView->lastStatusBarText()); + // notify UI to eventually switch stop/reload button + if(currentUrlBar()->isLoading()) + emit browserTabLoading(true); + else + emit browserTabLoading(false); + // set focus to the current webview webView->setFocus(); } @@ -361,6 +367,10 @@ WebView *MainView::webView(int index) const } +// FIXME (0.3 target, after OneUrlBar). Divide in 2 functions: +// 1. the slot void newTab() to create a "new empty focused tab" +// 2. the public method WebView *newWebView() to just create a new webview +// without working with the focus and loading an url WebView *MainView::newTab(bool focused) { // line edit @@ -541,7 +551,7 @@ void MainView::webViewLoadStarted() } } - emit browserLoading(true); + emit browserTabLoading(true); if (index != currentIndex()) return; @@ -564,7 +574,7 @@ void MainView::webViewLoadFinished(bool ok) } webViewIconChanged(); - emit browserLoading(false); + emit browserTabLoading(false); // don't display messages for background tabs if (index != currentIndex()) |