diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-03-30 11:26:07 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-03-30 11:26:07 +0200 |
commit | 80b37fa28d6c4e148ac0c69e91e07c1679866c54 (patch) | |
tree | 53f3ba9d14e2da053fd01c2dfa4dd7fc54aa5c31 /src/mainview.cpp | |
parent | fixing crash on manual rules saving (diff) | |
download | rekonq-80b37fa28d6c4e148ac0c69e91e07c1679866c54.tar.xz |
Cleaning urlbar API and improving animation
WARNING:
This is the best animation I could provide with the KComboBox class.
In the KLineEdit derived it works perfectly. In the Combos there are some
shadows on top :(
Squashed commit of the following:
commit 01e72a1996161028f8dbdc4e355daf00f954eace
commit 8bc032d98a4987d3b01566ac520f5e8a1a095dd0
commit bc5cfd9f7d1b34f5af06dd7af6de8d3b2edb277b
commit 73b4deac84d91fece407b9c700dcc61e36a34327
commit c55b753913b2619607c6aa11cabbf77ca3c84e3e
commit b901fbe71b7539f65260c4fa9bbfb22f4ea997b9
commit 1de363d9614c1309ac1ac4a8eea7e70be7f2f3ed
commit 76d6373f8b6c41f5c27b8404db2074f9bfc309c9
commit d741aa7109db016abc292d49fb45d15bb09e6c01
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index 6643becb..a00325fb 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -275,41 +275,31 @@ void MainView::currentChanged(int index) m_currentTabIndex = index; if (oldTab) - { - // disconnecting webview from urlbar - disconnect(oldTab->view(), SIGNAL(loadProgress(int)), urlBar(), SLOT(updateProgress(int))); - disconnect(oldTab->view(), SIGNAL(loadFinished(bool)), urlBar(), SLOT(loadFinished(bool))); - disconnect(oldTab->view(), SIGNAL(urlChanged(const QUrl &)), urlBar(), SLOT(setUrl(const QUrl &))); - + { // disconnecting webpage from mainview disconnect(oldTab->page(), SIGNAL(statusBarMessage(const QString&)), this, SIGNAL(showStatusBarMessage(const QString&))); disconnect(oldTab->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)), this, SIGNAL(linkHovered(const QString&))); } - - // connecting webview with urlbar - connect(tab->view(), SIGNAL(loadProgress(int)), urlBar(), SLOT(updateProgress(int))); - connect(tab->view(), SIGNAL(loadFinished(bool)), urlBar(), SLOT(loadFinished(bool))); - connect(tab->view(), SIGNAL(urlChanged(const QUrl &)), urlBar(), SLOT(setUrl(const QUrl &))); connect(tab->page(), SIGNAL(statusBarMessage(const QString&)), this, SIGNAL(showStatusBarMessage(const QString&))); connect(tab->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)), this, SIGNAL(linkHovered(const QString&))); - emit setCurrentTitle(tab->view()->title()); - urlBar()->setUrl(tab->view()->url()); - urlBar()->setProgress(tab->progress()); - + emit currentTitle(tab->view()->title()); + urlBar()->setCurrentTab(tab); + // clean up "status bar" emit showStatusBarMessage( QString() ); // notify UI to eventually switch stop/reload button - if(urlBar()->isLoading()) - emit browserTabLoading(true); - else + int progr = tab->progress(); + if(progr == 0) emit browserTabLoading(false); + else + emit browserTabLoading(true); // update zoom slider if(!Application::instance()->mainWindowList().isEmpty()) @@ -613,7 +603,7 @@ void MainView::webViewTitleChanged(const QString &title) } if (currentIndex() == index) { - emit setCurrentTitle(tabTitle); + emit currentTitle(tabTitle); } Application::historyManager()->updateHistoryEntry(view->url(), tabTitle); } |