diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2009-07-26 17:34:11 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2009-07-26 17:34:11 +0200 | 
| commit | 9396689860939143bafcd0247fbaaf3e01efbf39 (patch) | |
| tree | 1218970a66283433efd8f74d94a193518b7ea5cc /src | |
| parent | Wikipedia && Google contextual actions (diff) | |
| download | rekonq-9396689860939143bafcd0247fbaaf3e01efbf39.tar.xz | |
Fixing picture menu images as Lionel suggested
Diffstat (limited to 'src')
| -rw-r--r-- | src/webview.cpp | 27 | 
1 files changed, 13 insertions, 14 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 97c2f325..9c55750a 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -221,6 +221,19 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)          // TODO Add translate, show translation      } +    else if (!result.pixmap().isNull()) +    { +        menu.addSeparator(); + +        // TODO Add "View Image" && remove copy_this_image action +        a = pageAction(QWebPage::DownloadImageToDisk); +        a->setIcon(KIcon("document-save")); +        menu.addAction(a); + +        a = pageAction(QWebPage::CopyImageToClipboard); +        a->setIcon(KIcon("edit-copy")); +        menu.addAction(a); +    }      else      {          //page actions @@ -235,20 +248,6 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)          menu.addAction(mainwindow->actionByName("history_back"));          menu.addAction(mainwindow->actionByName("history_forward"));          menu.addAction(mainwindow->actionByName("view_redisplay")); - -        if (!result.pixmap().isNull()) -        { -            menu.addSeparator(); - -            // TODO Add "View Image" && remove copy_this_image action -            a = pageAction(QWebPage::DownloadImageToDisk); -            a->setIcon(KIcon("document-save")); -            menu.addAction(a); - -            a = pageAction(QWebPage::CopyImageToClipboard); -            a->setIcon(KIcon("edit-copy")); -            menu.addAction(a); -        }          menu.addSeparator();  | 
