Skip to content

Commit

Permalink
Developer tool: set content editable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Diamantini committed May 11, 2011
1 parent a7f7abf commit 23ae10d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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)));
}


Expand Down Expand Up @@ -1578,3 +1584,9 @@ void MainWindow::resizeEvent(QResizeEvent *event)

KMainWindow::resizeEvent(event);
}


void MainWindow::setEditable(bool on)
{
currentTab()->page()->setContentEditable(on);
}
3 changes: 2 additions & 1 deletion src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ private Q_SLOTS:
void showUserAgentSettings();

void enableNetworkAnalysis(bool);

void setEditable(bool);

void initBookmarkBar();
void updateToolsMenu();

Expand Down

0 comments on commit 23ae10d

Please sign in to comment.