Merge lp:~zhangew401/unity-scope-soundcloud/support-content-sharing into lp:unity-scope-soundcloud

Proposed by Zhang Enwei
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 42
Merged at revision: 42
Proposed branch: lp:~zhangew401/unity-scope-soundcloud/support-content-sharing
Merge into: lp:unity-scope-soundcloud
Diff against target: 38 lines (+9/-1)
2 files modified
CMakeLists.txt (+1/-1)
src/scope/preview.cpp (+8/-0)
To merge this branch: bzr merge lp:~zhangew401/unity-scope-soundcloud/support-content-sharing
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
Pete Woods Pending
Review via email: mp+288263@code.launchpad.net

Description of the change

The change is simple, only adding attributes for image widgets in Preview.

To post a comment you must log in.
Revision history for this message
Paweł Stołowski (stolowski) wrote :

Looks good to me, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-01-26 09:12:49 +0000
3+++ CMakeLists.txt 2016-03-07 10:53:42 +0000
4@@ -55,7 +55,7 @@
5 set(UBUNTU_PROJECT_TYPE "Scope" CACHE INTERNAL "Tells QtCreator this is a Scope project")
6
7 # Important project paths
8-set(SCOPE_VERSION "1.6.0-${BZR_REVNO}")
9+set(SCOPE_VERSION "1.6.1-${BZR_REVNO}")
10 set(CMAKE_INSTALL_PREFIX /)
11 set(SCOPE_INSTALL_DIR "/soundcloud")
12 set(GETTEXT_PACKAGE "unity-scope-soundcloud")
13
14=== modified file 'src/scope/preview.cpp'
15--- src/scope/preview.cpp 2016-02-11 12:52:17 +0000
16+++ src/scope/preview.cpp 2016-03-07 10:53:42 +0000
17@@ -75,6 +75,10 @@
18 boost::replace_all(artwork_url, "large", "t500x500");
19 sc::PreviewWidget art("art", "image");
20 art.add_attribute_value("source", sc::Variant(artwork_url));
21+ sc::VariantMap share_data;
22+ share_data["uri"] = res["art"];
23+ share_data["content-type"] = sc::Variant("pictures");
24+ art.add_attribute_value("share-data", sc::Variant(share_data));
25 widgets.emplace_back(art);
26
27 sc::PreviewWidget statistics("statistics", "header");
28@@ -123,6 +127,10 @@
29 boost::replace_all(artwork_url, "large", "t500x500");
30 sc::PreviewWidget art("art", "image");
31 art.add_attribute_value("source", sc::Variant(artwork_url));
32+ sc::VariantMap share_data;
33+ share_data["uri"] = res["art"];
34+ share_data["content-type"] = sc::Variant("pictures");
35+ art.add_attribute_value("share-data", sc::Variant(share_data));
36 widgets.emplace_back(art);
37
38 sc::PreviewWidget statistics("statistics", "header");

Subscribers

People subscribed via source and target branches

to all changes: