summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-06-29 10:44:00 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-06-29 10:44:00 +0200
commit2ec308ff8e12a3896c47e839670e2339ca279ee7 (patch)
tree174203dd2cb1242d049b59fd93afc31b9b12a6d0 /src/webview.cpp
parentHide "loading..." and "done" strings after 0.5 sec.. (diff)
downloadrekonq-2ec308ff8e12a3896c47e839670e2339ca279ee7.tar.xz
Show everywhere the needed "Inspect Element" action
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 41729908..9bbd45fc 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -137,6 +137,9 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
KMenu menu(this);
QAction *a;
+ KAction *inspectAction = new KAction(KIcon("layer-visible-on"), i18n("Inspect Element"), this);
+ connect(inspectAction, SIGNAL(triggered(bool)), this, SLOT(inspect()));
+
// is a link?
if (!result.linkUrl().isEmpty())
{
@@ -153,7 +156,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(pageAction(KWebPage::DownloadLinkToDisk));
menu.addAction(pageAction(KWebPage::CopyLinkToClipboard));
- menu.addSeparator();
+ menu.addSeparator();
}
// is content editable && selected? Add CUT
@@ -200,6 +203,8 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
}
menu.addSeparator();
+
+ menu.addAction(inspectAction);
// TODO Add translate, show translation
}
@@ -217,6 +222,8 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(pageAction(KWebPage::DownloadImageToDisk));
menu.addAction(pageAction(KWebPage::CopyImageToClipboard));
menu.addSeparator();
+
+ menu.addAction(inspectAction);
}
// Open url text in new tab/window
@@ -251,7 +258,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu.addSeparator();
}
-
}
// page actions
@@ -308,9 +314,7 @@ 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);
+ menu.addAction(inspectAction);
a = Application::bookmarkProvider()->actionByName("rekonq_add_bookmark");
menu.addAction(a);