Merge lp:~mzanetti/unity-mir/strip-app-id into lp:unity-mir

Proposed by Michael Zanetti
Status: Work in progress
Proposed branch: lp:~mzanetti/unity-mir/strip-app-id
Merge into: lp:unity-mir
Diff against target: 18 lines (+8/-1)
1 file modified
src/modules/Unity/Application/desktopfilereader.cpp (+8/-1)
To merge this branch: bzr merge lp:~mzanetti/unity-mir/strip-app-id
Reviewer Review Type Date Requested Status
Mir development team Pending
Review via email: mp+214997@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

210. By Michael Zanetti

try the same workaround as for the launcher to deal with long app ids

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/modules/Unity/Application/desktopfilereader.cpp'
2--- src/modules/Unity/Application/desktopfilereader.cpp 2014-02-28 16:51:31 +0000
3+++ src/modules/Unity/Application/desktopfilereader.cpp 2014-04-09 17:20:32 +0000
4@@ -57,7 +57,14 @@
5 DLOG("DesktopFileReader::DesktopFileReader (this=%p, appId='%s')", this, appId.toLatin1().data());
6 DASSERT(appId != NULL);
7
8- file_ = findDesktopFile(appId);
9+ QString helper = appId;
10+ if (helper.startsWith("appid://")) {
11+ helper.remove("appid://");
12+ // Strip hook name and current-user-version in case its there
13+ helper = appId.split('/').first();
14+ }
15+
16+ file_ = findDesktopFile(helper);
17 loaded_ = loadDesktopFile(file_);
18 }
19

Subscribers

People subscribed via source and target branches