summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-16 01:50:19 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-16 01:50:19 +0200
commit5e581fc1fa5a1d1d23fe8c4e3fe94fb2fc9250ab (patch)
tree793f486c85d6c62465bb761e5dac3c6d0a0072d2 /src/mainwindow.cpp
parentMerge commit 'refs/merge-requests/139' of git://gitorious.org/rekonq/mainline (diff)
downloadrekonq-5e581fc1fa5a1d1d23fe8c4e3fe94fb2fc9250ab.tar.xz
This commit changes rekonq behavior on "closed tabs" management.
The problem comes when too much sites are listed as closed tabs, so I though to create the contextual menu just on request and to clean out the sites that are reopened. (They are NO MORE closed tabs..) This and the next commit should fast a lot rekonq about that
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 90a650cf..2d0ed7dd 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -656,6 +656,7 @@ void MainWindow::preferences()
void MainWindow::updateActions()
{
+ kDebug() << "updating actions..";
bool rekonqPage = currentTab()->page()->isOnRekonqPage();
QAction *historyBackAction = actionByName(KStandardAction::name(KStandardAction::Back));
@@ -666,27 +667,6 @@ void MainWindow::updateActions()
QAction *historyForwardAction = actionByName(KStandardAction::name(KStandardAction::Forward));
historyForwardAction->setEnabled(currentTab()->view()->history()->canGoForward());
-
- QAction *openClosedTabsAction = actionByName( QL1S("open_closed_tabs") );
- openClosedTabsAction->setEnabled(mainView()->recentlyClosedTabs().size() > 0);
-
- // update closed tabs menu
- KActionMenu *am = dynamic_cast<KActionMenu *>(actionByName( QL1S("closed_tab_menu") ));
- if (!am)
- return;
-
- am->setEnabled(mainView()->recentlyClosedTabs().size() > 0);
-
- if (am->menu())
- am->menu()->clear();
-
- foreach (const HistoryItem &item, mainView()->recentlyClosedTabs())
- {
- KAction *a = new KAction(Application::icon(item.url), item.title, this);
- a->setData(item.url);
- connect(a, SIGNAL(triggered()), m_view, SLOT(openClosedTab()));
- am->addAction(a);
- }
}