summaryrefslogtreecommitdiff
path: root/src/mainview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-05-11 11:41:59 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-05-11 11:41:59 +0200
commitc27d8ff5790382daa69829be74457b919ee06cd6 (patch)
treef225cca68cf60674d7de2b15ea4e8b02d6a7b49a /src/mainview.cpp
parent(Re)-open closed tabs (diff)
downloadrekonq-c27d8ff5790382daa69829be74457b919ee06cd6.tar.xz
Load old closed tabs from session manager.
This let me think about the need of reimplementing it and all History to support more infos (eg: zoom) closing one bug and opening another :) BUG:228480
Diffstat (limited to 'src/mainview.cpp')
-rw-r--r--src/mainview.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index e703976d..84b87956 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -109,6 +109,18 @@ MainView::~MainView()
void MainView::postLaunch()
{
+ QStringList list = Application::sessionManager()->closedSites();
+ foreach(const QString &line, list)
+ {
+ if(line.startsWith( QL1S("about") ))
+ break;
+ QString title = line;
+ QString url = title;
+ HistoryItem item(url, QDateTime::currentDateTime(), title);
+ m_recentlyClosedTabs.removeAll(item);
+ m_recentlyClosedTabs.prepend(item);
+ }
+
// Session Manager
connect(this, SIGNAL(tabsChanged()), Application::sessionManager(), SLOT(saveSession()));
@@ -493,8 +505,7 @@ void MainView::closeTab(int index, bool del)
return;
}
- // store close tab except homepage
- if (!tab->url().prettyUrl().startsWith(QL1S("about:")) && !tab->url().isEmpty())
+ if (!tab->url().isEmpty())
{
QString title = tab->view()->title();
QString url = tab->url().prettyUrl();