From a118af29f0d10e732baa7fe364be4091ada06765 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 8 Aug 2012 14:25:40 +0200 Subject: Tools actions restored --- src/webwindow/webwindow.cpp | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'src/webwindow/webwindow.cpp') 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())); // // --- @@ -252,15 +275,15 @@ void WebWindow::setupActions() // &Tools // + // -// ------- +// + // --------- // + // xxxxxxxxxxx -// ------- +// + // -// -// -// +// + +// + +// + // // // @@ -759,3 +782,9 @@ void WebWindow::populateUserAgentMenu() UserAgentManager::self()->populateUAMenuForTabUrl(uaMenu, this); } + + +void WebWindow::setEditable(bool on) +{ + page()->setContentEditable(on); +} -- cgit v1.2.1