summaryrefslogtreecommitdiff
path: root/src/webwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-03-30 00:33:23 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-04-02 09:22:58 +0200
commit34050a0c87ff606b3ee56fe83dfdab0afde67a7d (patch)
treebdbf221d9af5c27b4818fee0c240a6dba5bef6a1 /src/webwindow
parentSVN_SILENT made messages (.desktop file) (diff)
downloadrekonq-34050a0c87ff606b3ee56fe83dfdab0afde67a7d.tar.xz
Managing sessions, first bits
This code is based on the patch from mayank jha about session saving. Will be used as "first part" of the session saving support in rekonq. CCMAIL: mjnovice@gmail.com
Diffstat (limited to 'src/webwindow')
-rw-r--r--src/webwindow/rekonqui.rc7
-rw-r--r--src/webwindow/webwindow.cpp10
2 files changed, 17 insertions, 0 deletions
diff --git a/src/webwindow/rekonqui.rc b/src/webwindow/rekonqui.rc
index 90c5c192..72ae6672 100644
--- a/src/webwindow/rekonqui.rc
+++ b/src/webwindow/rekonqui.rc
@@ -30,6 +30,13 @@
<text>&amp;Tools</text>
<Action name="clear_private_data" />
<Separator/>
+
+ <Menu name="sessionMenu" noMerge="1">
+ <text>&amp;Sessions</text>
+ <Action name="session_save" />
+ <Action name="session_manage" />
+ </Menu>
+
<Action name="webapp_shortcut" />
<Action name="web_inspector" />
<Action name="page_source" />
diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp
index 1225fb07..da7a1bc5 100644
--- a/src/webwindow/webwindow.cpp
+++ b/src/webwindow/webwindow.cpp
@@ -40,6 +40,7 @@
#include "iconmanager.h"
#include "syncmanager.h"
#include "useragentmanager.h"
+#include "sessionmanager.h"
#include "webpage.h"
#include "webtab.h"
@@ -279,6 +280,15 @@ void WebWindow::setupActions()
actionCollection()->addAction(QL1S("open_location"), a);
connect(a, SIGNAL(triggered(bool)) , this, SLOT(openLocation()));
+ // User sessions management
+ a = new KAction(KIcon("document-save"), i18n("&Save Session"), this);
+ actionCollection()->addAction(QL1S("session_save"), a);
+ connect(a, SIGNAL(triggered(bool)), SessionManager::self(), SLOT(saveYourSession()));
+
+ a = new KAction(KIcon("view-choose"), i18n("&Manage Session"), this);
+ actionCollection()->addAction(QL1S("session_manage"), a);
+ connect(a, SIGNAL(triggered(bool)), SessionManager::self(), SLOT(restoreYourSession()));
+
// ===== Tools Actions =================================
a = new KAction(i18n("View Page S&ource"), this);
a->setIcon(KIcon("application-xhtml+xml"));