Merge lp:~paulliu/unity8/fix-genericpreview-2 into lp:~unity-team/unity8/fix-genericpreview

Proposed by Ying-Chun Liu
Status: Merged
Merged at revision: 373
Proposed branch: lp:~paulliu/unity8/fix-genericpreview-2
Merge into: lp:~unity-team/unity8/fix-genericpreview
Diff against target: 29 lines (+10/-2)
1 file modified
Dash/Movie/MoviePreview.qml (+10/-2)
To merge this branch: bzr merge lp:~paulliu/unity8/fix-genericpreview-2
Reviewer Review Type Date Requested Status
Unity Team Pending
Review via email: mp+188594@code.launchpad.net

Description of the change

Small fix for video preview.

To post a comment you must log in.
373. By Ying-Chun Liu

Add logic to open the video.
Make sure it doesn't divide by zero.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Dash/Movie/MoviePreview.qml'
--- Dash/Movie/MoviePreview.qml 2013-09-30 21:03:51 +0000
+++ Dash/Movie/MoviePreview.qml 2013-10-01 13:32:08 +0000
@@ -39,7 +39,7 @@
39 id: urlLoader39 id: urlLoader
40 anchors.left: parent.left40 anchors.left: parent.left
41 anchors.right: parent.right41 anchors.right: parent.right
42 height: width * previewImage.sourceSize.height / previewImage.sourceSize.width42 height: previewImage.sourceSize.width != 0 ? width * previewImage.sourceSize.height / previewImage.sourceSize.width : 0
43 radius: "medium"43 radius: "medium"
44 visible: height > 044 visible: height > 0
45 image: Image {45 image: Image {
@@ -62,7 +62,15 @@
62 MouseArea {62 MouseArea {
63 id: previewImageMouseArea63 id: previewImageMouseArea
64 anchors.fill: parent64 anchors.fill: parent
65 onClicked: shell.activateApplication('/usr/share/applications/mediaplayer-app.desktop', previewData.imageSourceUri);65 onClicked: {
66 if (previewData.result.uri.indexOf("http") == 0) {
67 Qt.openUrlExternally(previewData.result.uri);
68 } else if (previewData.result.uri.indexOf("file") == 0) {
69 shell.activateApplication('/usr/share/applications/mediaplayer-app.desktop', previewData.result.uri);
70 } else {
71 Qt.openUrlExternally(previewData.result.uri);
72 }
73 }
66 }74 }
67 }75 }
68 }76 }

Subscribers

People subscribed via source and target branches

to all changes: