diff options
| -rw-r--r-- | src/webview.cpp | 40 | 
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)      { | 
