summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-05-11 23:52:52 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-05-11 23:52:52 +0200
commit23ae10d14ab7fec087f358af187ae60d6c50812b (patch)
tree9f5e524ecd47b149af8893e8ed273defe618ed80
parentConvert these extracomment to comment (diff)
downloadrekonq-23ae10d14ab7fec087f358af187ae60d6c50812b.tar.xz
Developer tool: set content editable.
-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();