summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2009-10-17 14:04:09 +0200
committermegabigbug <megabigbug@arrakis.(none)>2009-10-17 14:04:09 +0200
commitcd0f7e0a883472b3183320b43bab0e04c07d4aaf (patch)
tree3aa078d0c36f5d2cca566baa0b7c8c7a6f06791d /src/mainview.cpp
parentMerge commit 'refs/merge-requests/1827' of git://gitorious.org/rekonq/mainlin... (diff)
downloadrekonq-cd0f7e0a883472b3183320b43bab0e04c07d4aaf.tar.xz
reintroduce and fix recently closed tab feature
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp15
1 files changed, 15 insertions, 0 deletions
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();