summaryrefslogtreecommitdiff
path: root/src/webwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-08-08 14:25:40 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:04 +0100
commita118af29f0d10e732baa7fe364be4091ada06765 (patch)
tree88e1249b111cd20169cc817f2ce9e522fda30f2c /src/webwindow
parentUser agent management restored (diff)
downloadrekonq-a118af29f0d10e732baa7fe364be4091ada06765.tar.xz
Tools actions restored
Diffstat (limited to 'src/webwindow')
-rw-r--r--src/webwindow/webwindow.cpp39
-rw-r--r--src/webwindow/webwindow.h2
2 files changed, 36 insertions, 5 deletions
diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp
index 72bdc1e8..2dc476c1 100644
--- a/src/webwindow/webwindow.cpp
+++ b/src/webwindow/webwindow.cpp
@@ -29,8 +29,10 @@
#include "application.h"
+#include "adblockmanager.h"
#include "bookmarkmanager.h"
#include "iconmanager.h"
+#include "syncmanager.h"
#include "useragentmanager.h"
#include "webpage.h"
@@ -179,6 +181,7 @@ void WebWindow::setupActions()
KStandardAction::open(this, SLOT(fileOpen()), actionCollection());
KStandardAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
KStandardAction::print(_tab, SLOT(printFrame()), actionCollection());
+ KStandardAction::preferences(this, SLOT(preferences()), actionCollection());
KStandardAction::quit(rApp, SLOT(queryQuit()), actionCollection());
a = KStandardAction::fullScreen(this, SLOT(viewFullScreen(bool)), this, actionCollection());
@@ -235,6 +238,26 @@ void WebWindow::setupActions()
a->setMenu(uaMenu);
connect(uaMenu, SIGNAL(aboutToShow()), this, SLOT(populateUserAgentMenu()));
+ // Editable Page
+ a = new KAction(KIcon("document-edit"), i18n("Set Editable"), this);
+ a->setCheckable(true);
+ actionCollection()->addAction(QL1S("set_editable"), a);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(setEditable(bool)));
+
+ // Adblock
+ a = new KAction(KIcon("preferences-web-browser-adblock"), i18n("Ad Block"), this);
+ actionCollection()->addAction(QL1S("adblock"), a);
+ connect(a, SIGNAL(triggered(bool)), AdBlockManager::self(), SLOT(showSettings()));
+
+ // Web Applications
+ a = new KAction(KIcon("applications-internet"), i18n("Create application shortcut"), this);
+ actionCollection()->addAction(QL1S("webapp_shortcut"), a);
+ connect(a, SIGNAL(triggered(bool)), rApp, SLOT(createWebAppShortcut()));
+
+ // Sync action
+ a = new KAction(KIcon("tools-wizard"), i18n("Sync"), this); // FIXME sync icon!!
+ actionCollection()->addAction(QL1S("sync"), a);
+ connect(a, SIGNAL(triggered(bool)), SyncManager::self(), SLOT(showSettings()));
// <Menu name="rekonqMenu" noMerge="1">
// <Action name="new_tab" /> ---
@@ -252,15 +275,15 @@ void WebWindow::setupActions()
// <text>&amp;Tools</text>
// <Action name="clear_private_data" /> +
// <Separator/>
-// <Action name="webapp_shortcut" /> -------
+// <Action name="webapp_shortcut" /> +
// <Action name="web_inspector" /> ---------
// <Action name="page_source" /> +
// <Action name="net_analyzer" /> xxxxxxxxxxx
-// <Action name="set_editable" /> -------
+// <Action name="set_editable" /> +
// <Separator/>
-// <Action name="useragent" />
-// <Action name="sync" />
-// <Action name="adblock" />
+// <Action name="useragent" /> +
+// <Action name="sync" /> +
+// <Action name="adblock" /> +
// </Menu>
//
// <Separator/>
@@ -759,3 +782,9 @@ void WebWindow::populateUserAgentMenu()
UserAgentManager::self()->populateUAMenuForTabUrl(uaMenu, this);
}
+
+
+void WebWindow::setEditable(bool on)
+{
+ page()->setContentEditable(on);
+}
diff --git a/src/webwindow/webwindow.h b/src/webwindow/webwindow.h
index ed8a7f2b..ef8a502b 100644
--- a/src/webwindow/webwindow.h
+++ b/src/webwindow/webwindow.h
@@ -108,10 +108,12 @@ private Q_SLOTS:
void fileOpen();
void fileSaveAs();
+ // Tools Menu slots
void viewPageSource();
void viewFullScreen(bool enable);
void populateUserAgentMenu();
+ void setEditable(bool);
Q_SIGNALS:
void titleChanged(QString);