From 4b363ed35e880a6a74ac7784fcad713c62902f3a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 3 Jan 2012 18:31:13 +0100 Subject: improve closed tabs management - remove reopened tabs from the closed tabs list. - limit them to MAX 8 elements (it seems enough to me) - save history also when there is just one tab closed - DON'T save history when you opened a "rekonq" page BUG:271224 --- 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 01310bfb..98936e96 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2008-2011 by Andrea Diamantini +* Copyright (C) 2008-2012 by Andrea Diamantini * Copyright (C) 2009 by Paweł Prażak * Copyright (C) 2009-2011 by Lionel Chauvin * Copyright (C) 2010 by Matthieu Gicquel @@ -451,9 +451,10 @@ void MainWindow::setupActions() connect(a, SIGNAL(triggered(bool)), m_view, SLOT(previousTab())); a = new KAction(KIcon("tab-new"), i18n("Open Last Closed Tab"), this); + a->setData(0); // last tab has always index = 0 a->setShortcut(KShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_T)); actionCollection()->addAction(QL1S("open_last_closed_tab"), a); - connect(a, SIGNAL(triggered(bool)), m_view, SLOT(openLastClosedTab())); + connect(a, SIGNAL(triggered(bool)), m_view, SLOT(openClosedTab())); // Closed Tabs Menu KActionMenu *closedTabsMenu = new KActionMenu(KIcon("tab-new"), i18n("Closed Tabs"), this); -- cgit v1.2.1