Merge lp:~jpakkane/unity-lens-files/nautilus-desktop-fix into lp:unity-lens-files

Proposed by Jussi Pakkanen
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 237
Merged at revision: 235
Proposed branch: lp:~jpakkane/unity-lens-files/nautilus-desktop-fix
Merge into: lp:unity-lens-files
Diff against target: 12 lines (+3/-0)
1 file modified
src/folder.vala (+3/-0)
To merge this branch: bzr merge lp:~jpakkane/unity-lens-files/nautilus-desktop-fix
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
Review via email: mp+122284@code.launchpad.net

Commit message

Filter out dummy 'x-desktop-nautilus' entry in .gtk-bookmarks.

Description of the change

Filter out dummy 'x-desktop-nautilus' entry in .gtk-bookmarks.

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

What if a bookmarked folder is named 'x-nautilus-desktop'? Wouldn't it be better to filter this out when reading ~/.gtk-bookmarks to support that case?
Can you add a short comment about why we need this workaround (+ link to the bug).

review: Needs Fixing
Revision history for this message
Jussi Pakkanen (jpakkane) wrote :

If that were the case, the uri string would start with 'bookmark:file' and would thus not match. Still, moved the filtering to file read function for clarity. Added comment too.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Works fine!

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/folder.vala'
--- src/folder.vala 2012-08-10 13:05:07 +0000
+++ src/folder.vala 2012-09-03 07:10:23 +0000
@@ -73,6 +73,9 @@
73 {73 {
74 if (uri == "")74 if (uri == "")
75 continue;75 continue;
76 // Filter out useless bookmark that is created by Nautilus.
77 // https://bugs.launchpad.net/unity-lens-files/+bug/1044309
78 if (uri.has_prefix("x-nautilus-desktop:")) continue;
76 79
77 if (uri == desktop_uri) has_desktop_in_favourites = true;80 if (uri == desktop_uri) has_desktop_in_favourites = true;
78 81

Subscribers

People subscribed via source and target branches