From 4c7fc6692b94c1239114801d07b59fd428a585f5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 14 Mar 2013 17:37:04 +0100 Subject: Restore Session Manager updates on current tab changed && on window close. Lindsay, I probably "forgot" one your mail about Session Management NOT working properly (sorry). Hope this will fix it! Let me know :) CCMAIL: lindsay.mathieson@gmail.com --- src/application.cpp | 3 ++- src/autosaver.cpp | 4 ++-- src/tabwindow/tabwidget.cpp | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/application.cpp b/src/application.cpp index 002f19d1..a2d428d7 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -495,6 +495,7 @@ bool Application::eventFilter(QObject* watched, QEvent* event) RekonqWindow *window = qobject_cast(watched); if (window) { + SessionManager::self()->saveSession(); m_rekonqWindows.removeOne(window); #ifdef HAVE_KACTIVITIES QString currentActivity = m_activityConsumer->currentActivity(); @@ -714,7 +715,7 @@ void Application::queryQuit() } } - // in case of just one window... + SessionManager::self()->setSessionManagementEnabled(false); quit(); } diff --git a/src/autosaver.cpp b/src/autosaver.cpp index ee84e299..8459884b 100644 --- a/src/autosaver.cpp +++ b/src/autosaver.cpp @@ -36,8 +36,8 @@ #include -const int AUTOSAVE_TIME = 1000 * 3; // seconds -const int MAX_TIME_LIMIT = 1000 * 15; // seconds +const int AUTOSAVE_TIME = 1000 * 2; // seconds +const int MAX_TIME_LIMIT = 1000 * 5; // seconds AutoSaver::AutoSaver(QObject *parent) diff --git a/src/tabwindow/tabwidget.cpp b/src/tabwindow/tabwidget.cpp index 9494fad4..d74f0778 100644 --- a/src/tabwindow/tabwidget.cpp +++ b/src/tabwindow/tabwidget.cpp @@ -188,6 +188,7 @@ void TabWidget::init() _addTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly); connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int))); + connect(this, SIGNAL(currentChanged(int)), SessionManager::self(), SLOT(saveSession())); // ---------------------------------------------------------------------------------------------- RekonqWindow *rw = qobject_cast(parent()); @@ -398,8 +399,6 @@ void TabWidget::pageCreated(WebPage *page) void TabWidget::currentChanged(int newIndex) { - _lastCurrentTabIndex = newIndex; - _openedTabsCounter = 0; tabBar()->setTabHighlighted(newIndex, false); -- cgit v1.2.1