Merge lp:~osomon/webbrowser-app/clipboard-push-url into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 1059
Merged at revision: 1067
Proposed branch: lp:~osomon/webbrowser-app/clipboard-push-url
Merge into: lp:webbrowser-app
Diff against target: 45 lines (+5/-5)
2 files modified
src/app/webbrowser/Browser.qml (+2/-2)
src/app/webcontainer/WebViewImplOxide.qml (+3/-3)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/clipboard-push-url
Reviewer Review Type Date Requested Status
Alexandre Abreu (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+261836@code.launchpad.net

Commit message

Actually push URLs to the clipboard.
For some reason setting the "text/url-list" mime type doesn’t seem to work (or other applications do not implement pasting this kind of data), but "text/plain" works well enough for this purpose.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

Looks ok to me,

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/webbrowser/Browser.qml'
2--- src/app/webbrowser/Browser.qml 2015-06-02 14:26:38 +0000
3+++ src/app/webbrowser/Browser.qml 2015-06-12 11:25:23 +0000
4@@ -749,7 +749,7 @@
5 }
6 Actions.CopyLink {
7 enabled: contextualData.href.toString()
8- onTriggered: Clipboard.push([contextualData.href])
9+ onTriggered: Clipboard.push(["text/plain", contextualData.href.toString()])
10 }
11 Actions.ShareLink {
12 enabled: (formFactor == "mobile") && contextualData.href.toString()
13@@ -761,7 +761,7 @@
14 }
15 Actions.CopyImage {
16 enabled: contextualData.img.toString()
17- onTriggered: Clipboard.push([contextualData.img])
18+ onTriggered: Clipboard.push(["text/plain", contextualData.img.toString()])
19 }
20 Actions.SaveImage {
21 enabled: contextualData.img.toString() && downloadLoader.status == Loader.Ready
22
23=== modified file 'src/app/webcontainer/WebViewImplOxide.qml'
24--- src/app/webcontainer/WebViewImplOxide.qml 2015-05-27 16:19:45 +0000
25+++ src/app/webcontainer/WebViewImplOxide.qml 2015-06-12 11:25:23 +0000
26@@ -1,5 +1,5 @@
27 /*
28- * Copyright 2014 Canonical Ltd.
29+ * Copyright 2014-2015 Canonical Ltd.
30 *
31 * This file is part of webbrowser-app.
32 *
33@@ -69,11 +69,11 @@
34 contextualActions: ActionList {
35 Actions.CopyLink {
36 enabled: webview.contextualData.href.toString()
37- onTriggered: Clipboard.push([webview.contextualData.href])
38+ onTriggered: Clipboard.push(["text/plain", webview.contextualData.href.toString()])
39 }
40 Actions.CopyImage {
41 enabled: webview.contextualData.img.toString()
42- onTriggered: Clipboard.push([webview.contextualData.img])
43+ onTriggered: Clipboard.push(["text/plain", webview.contextualData.img.toString()])
44 }
45 }
46

Subscribers

People subscribed via source and target branches

to status/vote changes: