summaryrefslogtreecommitdiff
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-05-14 10:11:26 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-05-14 10:11:26 +0200
commitcf501ead612195b14b42a5351085e36a4d56a6f9 (patch)
tree44a904e8ec30712d0741270b1cf5543d0a1e21e4 /src/webview.cpp
parentMerge branch 'master' of git@gitorious.org:rekonq/mainline (diff)
downloadrekonq-cf501ead612195b14b42a5351085e36a4d56a6f9.tar.xz
Fixed unusual cut/copy/paste actions on top of menu
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 055f2f7d..ddfd986f 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -375,9 +375,27 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
addBookmarkAction->setData(QVariant());
KMenu menu(this);
+ // link actions
+ bool linkIsEmpty = result.linkUrl().isEmpty();
+ if (!linkIsEmpty)
+ {
+ menu.addAction(webActions()->action("open_link_in_new_tab"));
+ }
+ else
+ {
+ menu.addAction(mainwindow->actionByName("new_tab"));
+ }
+ menu.addAction(mainwindow->actionByName("view_redisplay"));
+ menu.addSeparator();
+
+ // Developer Extras actions
+ if (page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled))
+ {
+ menu.addAction(webActions()->action("inspect_element"));
+ menu.addSeparator();
+ }
// cut - copy - paste Actions.
- // If someone selects text perhaps wanna work with it..
bool b = false;
if (result.isContentSelected() && result.isContentEditable())
@@ -403,26 +421,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu.addSeparator();
}
- // link actions
- bool linkIsEmpty = result.linkUrl().isEmpty();
- if (!linkIsEmpty)
- {
- menu.addAction(webActions()->action("open_link_in_new_tab"));
- }
- else
- {
- menu.addAction(mainwindow->actionByName("new_tab"));
- }
- menu.addAction(mainwindow->actionByName("view_redisplay"));
- menu.addSeparator();
-
- // Developer Extras actions
- if (page()->settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled))
- {
- menu.addAction(webActions()->action("inspect_element"));
- menu.addSeparator();
- }
-
// save/copy link actions
if (!linkIsEmpty)
{