From 88a5c9816cd6a07240a4a94820e0a809aecd074a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 16 Feb 2011 01:47:08 +0100 Subject: Cleans up "tab switch" management and expecially the use of signals on that. This, expecially to avoid double calls on functions to manage tab switching and info updating. Reviewed by NOBODY (oops...) --- src/mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 35f47701..24dc8658 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -311,7 +311,6 @@ void MainWindow::postLaunch() connect(m_view, SIGNAL(openNextInHistory()), this, SLOT(openNext())); // update toolbar actions signals - connect(m_view, SIGNAL(tabsChanged()), this, SLOT(updateActions())); connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(updateActions())); //Change window icon according to tab icon @@ -408,7 +407,6 @@ void MainWindow::setupActions() actionCollection()->addAction(QL1S("stop_reload") , m_stopReloadAction); m_stopReloadAction->setShortcutConfigurable(false); connect(m_view, SIGNAL(browserTabLoading(bool)), this, SLOT(browserLoading(bool))); - browserLoading(false); //first init for blank start page a = new KAction(i18n("Open Location"), this); KShortcut openLocationShortcut(Qt::CTRL + Qt::Key_L); @@ -981,6 +979,7 @@ WebTab *MainWindow::currentTab() const void MainWindow::browserLoading(bool v) { + kDebug() << "-------------------------------------------------------------------"; QAction *stop = actionCollection()->action( QL1S("stop") ); QAction *reload = actionCollection()->action( QL1S("view_redisplay") ); if (v) @@ -1000,6 +999,8 @@ void MainWindow::browserLoading(bool v) m_stopReloadAction->setText(i18n("Reload")); connect(m_stopReloadAction, SIGNAL(triggered(bool)), reload, SIGNAL(triggered(bool))); stop->setEnabled(false); + + updateActions(); } } -- cgit v1.2.1