From 142e0d44a8b8ef1f639aaf772aa9631d220d0275 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Sun, 19 Sep 2010 17:58:29 +0200 Subject: Change the behavior of Ctrl+Maj+T to open only the last closed tab Previously, the action of Ctrl+Maj+T was opening all the closed tabs. This was differing from Firefox and Chrome, which can be confusing for users. This patch change the behavior to open only the last closed tab, making the behavior more like the other browsers. --- src/mainview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index f020fb53..3daee339 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -633,13 +633,13 @@ void MainView::previousTab() } -void MainView::openClosedTabs() +void MainView::openLastClosedTab() { - foreach (const HistoryItem &item, recentlyClosedTabs()) - { - Application::instance()->loadUrl( KUrl(item.url), Rekonq::NewTab); - } - m_recentlyClosedTabs.clear(); + if (m_recentlyClosedTabs.isEmpty()) + return; + + const HistoryItem item = m_recentlyClosedTabs.takeFirst(); + Application::instance()->loadUrl(KUrl(item.url), Rekonq::NewTab); } -- cgit v1.2.1