Merge lp:~osomon/unity-2d/respectDesktopFileCase into lp:unity-2d/3.0

Proposed by Olivier Tilloy
Status: Merged
Approved by: Florian Boucault
Approved revision: 440
Merged at revision: 440
Proposed branch: lp:~osomon/unity-2d/respectDesktopFileCase
Merge into: lp:unity-2d/3.0
Diff against target: 52 lines (+9/-4)
3 files modified
launcher/UnityApplications/place.cpp (+6/-1)
places/RendererGrid.qml (+1/-1)
places/UnityDefaultRenderer.qml (+2/-2)
To merge this branch: bzr merge lp:~osomon/unity-2d/respectDesktopFileCase
Reviewer Review Type Date Requested Status
Florian Boucault (community) Approve
Review via email: mp+52986@code.launchpad.net

Commit message

[dash] Do not store the URLs returned by the place daemons as QUrl objects, this converts the host name to lower case,
thus breaking the launch of application:// URLs containing uppercase letters (such as SearchAndRescue.desktop).

Description of the change

Note to the reviewer: I tested with SearchAndRescue (`apt-get install searchandrescue`), for which the applications place daemon doesn’t provide an icon: this is a separate issue, not addressed by this branch.

The important thing to test is that the application can now be launched from the dash, and more generally that this change doesn’t introduce regressions in launching applications and opening files and folders from the dash.

To post a comment you must log in.
Revision history for this message
Florian Boucault (fboucault) wrote :

places/UnityFileInfoRenderer.qml needs to be adapted as well lines 21 and 33.

review: Needs Fixing
Revision history for this message
Florian Boucault (fboucault) wrote :

Forget that last comment that does not make sense.

Good to go!

(Tested using FBReader)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/UnityApplications/place.cpp'
2--- launcher/UnityApplications/place.cpp 2011-03-10 09:41:12 +0000
3+++ launcher/UnityApplications/place.cpp 2011-03-11 09:27:15 +0000
4@@ -395,7 +395,12 @@
5
6 if (url.scheme() == "application") {
7 LauncherApplication application;
8- application.setDesktopFile(url.host());
9+ /* Cannot set the desktop file to url.host(), because the QUrl constructor
10+ converts the host name to lower case to conform to the Nameprep
11+ RFC (see http://doc.qt.nokia.com/qurl.html#FormattingOption-enum).
12+ Ref: http://bugs.launchpad.net/unity-2d/+bug/723604 */
13+ QString desktopFile = uri.right(uri.size() - uri.indexOf("://") - 3);
14+ application.setDesktopFile(desktopFile);
15 application.activate();
16 return;
17 }
18
19=== modified file 'places/RendererGrid.qml'
20--- places/RendererGrid.qml 2011-02-21 21:04:36 +0000
21+++ places/RendererGrid.qml 2011-03-11 09:27:15 +0000
22@@ -124,7 +124,7 @@
23 height: results.cellHeight
24
25 Loader {
26- property url uri: column_0
27+ property string uri: column_0
28 property string iconHint: column_1
29 property string groupId: column_2
30 property string mimetype: column_3
31
32=== modified file 'places/UnityDefaultRenderer.qml'
33--- places/UnityDefaultRenderer.qml 2011-03-09 15:50:03 +0000
34+++ places/UnityDefaultRenderer.qml 2011-03-11 09:27:15 +0000
35@@ -8,7 +8,7 @@
36
37 cellRenderer: Component {
38 Button {
39- property url uri
40+ property string uri
41 property string iconHint
42 property string mimetype
43 property string displayName
44@@ -16,7 +16,7 @@
45
46 onClicked: {
47 dashView.active = false
48- placeEntryModel.place.activate(decodeURIComponent(uri.toString()))
49+ placeEntryModel.place.activate(decodeURIComponent(uri))
50 }
51
52 Image {

Subscribers

People subscribed via source and target branches