Merge lp://qastaging/~angeloc/unity-lens-files/fix-for-837810 into lp://qastaging/unity-lens-files

Proposed by Angelo Compagnucci
Status: Rejected
Rejected by: Michal Hruby
Proposed branch: lp://qastaging/~angeloc/unity-lens-files/fix-for-837810
Merge into: lp://qastaging/unity-lens-files
Diff against target: 41 lines (+12/-1)
1 file modified
src/folder.vala (+12/-1)
To merge this branch: bzr merge lp://qastaging/~angeloc/unity-lens-files/fix-for-837810
Reviewer Review Type Date Requested Status
Michal Hruby (community) Needs Fixing
Review via email: mp+97924@code.qastaging.launchpad.net

Description of the change

Added desktop to favourites in files and folders lens.

To post a comment you must log in.
Revision history for this message
Michal Hruby (mhr3) wrote :

Thanks for this! A couple of comments:

8 + string uri_desktop = "file://" + @"$(Environment.get_user_special_dir(UserDirectory.DESKTOP))";

Don't do this pls, use Gio's File.new_for_path and the get_uri () method in the File interface.

17 + var desktop_display_name = Uri.unescape_string (uri_desktop);
18 + desktop_display_name = Filename.display_basename (desktop_display_name);

Eeek, again, we have File.get_parse_name()

I also think that the desktop bookmark (which isn't a bookmark) should be last in the list, so it doesn't stick out.

review: Needs Fixing
Revision history for this message
Angelo Compagnucci (angeloc) wrote :

Done!

modified:
    src/folder.vala
    - Using File.new_for_path instead path string concatenation
    - Moved desktop folder to the end of favourites list

223. By Angelo Compagnucci

modified:
  src/folder.vala
  - Using File.new_for_path instead path string concatenation
  - Moved desktop folder to the end of favourites list

224. By Angelo Compagnucci

modified:
  src/folder.vala
  - Using get_parse_name() to get desktop folder name.

Revision history for this message
Angelo Compagnucci (angeloc) wrote :

Done

modified:
  src/folder.vala
  - Using get_parse_name() to get desktop folder name.

Revision history for this message
Michal Hruby (mhr3) wrote :

10 + File uri_desktop_file = File.new_for_path (@"$(Environment.get_user_special_dir(UserDirectory.DESKTOP))");

Can you please remove the string template, it's useless in this case.

36 + var desktop_display_name = Filename.display_basename (uri_desktop_file.get_parse_name());

This should be just Path.get_basename, not Filename.display_basename (Filename.display_basename doesn't expect utf-8 string).

25 + if (uri == uri_desktop)
26 + continue;

If the user has Desktop in favourites, we shouldn't mess with the order, and this should be just a flag "if (uri == uri_desktop) add_desktop_bookmark = false;".

review: Needs Fixing
Revision history for this message
Michal Hruby (mhr3) wrote :

Fixed the remaining issues and proposed in https://code.launchpad.net/~mhr3/unity-lens-files/fix-837810/+merge/100986 Thanks!

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches