summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainwindow.cpp12
-rw-r--r--src/mainwindow.h3
2 files changed, 14 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f226c9ee..2ed8fef5 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -245,6 +245,7 @@ void MainWindow::updateToolsMenu()
m_developerMenu->addAction(actionByName(QL1S("web_inspector")));
m_developerMenu->addAction(actionByName(QL1S("page_source")));
m_developerMenu->addAction(actionByName(QL1S("net_analyzer")));
+ m_developerMenu->addAction(actionByName(QL1S("set_editable")));
m_toolsMenu->addAction(m_developerMenu);
if (!ReKonfig::showDeveloperTools())
@@ -544,6 +545,11 @@ void MainWindow::setupActions()
a = new KAction(KIcon("preferences-web-browser-identification"), i18n("Browser Identification"), this);
actionCollection()->addAction(QL1S("UserAgentSettings"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(showUserAgentSettings()));
+
+ a = new KAction(KIcon(""), i18n("set editable"), this);
+ a->setCheckable(true);
+ actionCollection()->addAction(QL1S("set_editable"), a);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(setEditable(bool)));
}
@@ -1578,3 +1584,9 @@ void MainWindow::resizeEvent(QResizeEvent *event)
KMainWindow::resizeEvent(event);
}
+
+
+void MainWindow::setEditable(bool on)
+{
+ currentTab()->page()->setContentEditable(on);
+}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 9853ca39..2f59211c 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -180,7 +180,8 @@ private Q_SLOTS:
void showUserAgentSettings();
void enableNetworkAnalysis(bool);
-
+ void setEditable(bool);
+
void initBookmarkBar();
void updateToolsMenu();