[rekonq] web inspector patch
mark at dinicola.id.au
mark at dinicola.id.au
Fri Jun 4 08:59:50 CEST 2010
Hi all,
Attached is a patch that changes when Inspect Element shows in the context
menu (basically all the time) so every element can be easily inspected.
Mark
-------------- next part --------------
From a8d8de8cf91dd4e91b0e24d93e179b1b72c194ed Mon Sep 17 00:00:00 2001
From: Mark Di Nicola <mark at dinicola.id.au>
Date: Fri, 4 Jun 2010 16:34:06 +1000
Subject: [PATCH] changed when Inspect Element displays in conectxt menu so any element can easily be inspected
---
src/webview.cpp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/webview.cpp b/src/webview.cpp
index 061dd25..cbfaf52 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -230,6 +230,15 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
}
+ //web inspector
+ if (!result.isNull()) {
+ a = new KAction(KIcon("layer-visible-on"), i18n("Inspect Element"), this);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(inspect()));
+ menu.addAction(a);
+
+ menu.addSeparator();
+ }
+
// page actions
if (!result.isContentSelected() && result.linkUrl().isEmpty())
{
@@ -284,10 +293,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(mainwindow->actionByName("page_source"));
- a = new KAction(KIcon("layer-visible-on"), i18n("Inspect Element"), this);
- connect(a, SIGNAL(triggered(bool)), this, SLOT(inspect()));
- menu.addAction(a);
-
a = Application::bookmarkProvider()->actionByName("rekonq_add_bookmark");
menu.addAction(a);
}
--
1.7.0.4
More information about the rekonq
mailing list