From cd0f7e0a883472b3183320b43bab0e04c07d4aaf Mon Sep 17 00:00:00 2001 From: megabigbug Date: Sat, 17 Oct 2009 14:04:09 +0200 Subject: reintroduce and fix recently closed tab feature --- src/mainview.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index 8c6ba19b..dbd59e91 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -181,6 +181,8 @@ void MainView::clear() // What exactly do we need to clear here? m_urlBar->clearHistory(); m_urlBar->clear(); + + m_recentlyClosedTabs.clear(); } @@ -414,6 +416,13 @@ void MainView::slotCloseTab(int index) return; } hasFocus = tab->hasFocus(); + + //store close tab except homepage + if (!tab->url().prettyUrl().startsWith("rekonq:") && !tab->url().isEmpty()) + { + m_recentlyClosedTabs.removeAll(tab->url()); + m_recentlyClosedTabs.prepend(tab->url()); + } } QWidget *webView = widget(index); @@ -573,6 +582,12 @@ QLabel *MainView::animatedLoading(int index, bool addMovie) } +KUrl::List MainView::recentlyClosedTabs() +{ + return m_recentlyClosedTabs; +} + + void MainView::resizeEvent(QResizeEvent *event) { updateTabBar(); -- cgit v1.2.1