Merge lp:~marcustomlinson/unity-scope-click/fix-scope-dir into lp:unity-scope-click

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 502
Merged at revision: 500
Proposed branch: lp:~marcustomlinson/unity-scope-click/fix-scope-dir
Merge into: lp:unity-scope-click
Diff against target: 23 lines (+10/-1)
1 file modified
scope/clickapps/apps-query.cpp (+10/-1)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scope-click/fix-scope-dir
Reviewer Review Type Date Requested Status
dobey (community) Approve
Paweł Stołowski (community) Approve
Review via email: mp+310269@code.launchpad.net

Commit message

Prepend $SNAP to the store scope icon path

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

+1

review: Approve
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scope/clickapps/apps-query.cpp'
--- scope/clickapps/apps-query.cpp 2016-11-04 13:30:52 +0000
+++ scope/clickapps/apps-query.cpp 2016-11-08 13:42:56 +0000
@@ -308,9 +308,18 @@
308308
309 const unity::scopes::CannedQuery store_scope(STORE_SCOPE_ID, querystr, querystr.empty() ? query().department_id() : "");309 const unity::scopes::CannedQuery store_scope(STORE_SCOPE_ID, querystr, querystr.empty() ? query().department_id() : "");
310310
311 auto get_snap_path = []() {
312 const char* env_snap = getenv("SNAP");
313 if (env_snap == nullptr) {
314 return "";
315 }
316 return env_snap;
317 };
318 static const std::string SNAP_PATH{get_snap_path()};
319
311 scopes::CategorisedResult res(cat);320 scopes::CategorisedResult res(cat);
312 res.set_title(title);321 res.set_title(title);
313 res.set_art(STORE_DATA_DIR "/store-scope-icon.svg");322 res.set_art(SNAP_PATH + STORE_DATA_DIR "/store-scope-icon.svg");
314 res.set_uri(store_scope.to_uri());323 res.set_uri(store_scope.to_uri());
315 res[click::apps::Query::ResultKeys::NAME] = title;324 res[click::apps::Query::ResultKeys::NAME] = title;
316 res[click::apps::Query::ResultKeys::DESCRIPTION] = "";325 res[click::apps::Query::ResultKeys::DESCRIPTION] = "";

Subscribers

People subscribed via source and target branches