summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
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();