Merge lp:~donadigo/pantheon-files/fix-1593748-navigation-items-path into lp:~elementary-apps/pantheon-files/trunk

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Jeremy Wootten
Approved revision: 2200
Merged at revision: 2200
Proposed branch: lp:~donadigo/pantheon-files/fix-1593748-navigation-items-path
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 21 lines (+2/-2)
1 file modified
libwidgets/Chrome/TopMenu.vala (+2/-2)
To merge this branch: bzr merge lp:~donadigo/pantheon-files/fix-1593748-navigation-items-path
Reviewer Review Type Date Requested Status
Jeremy Wootten Approve
Review via email: mp+297781@code.launchpad.net

Commit message

* Fix #1593748: "Navigation button items begin with 'file://'".

Description of the change

Fixes #1593748: "Navigation button items begin with 'file://'".

Instead of using GLib method, use the Files one to display correct path to the file, not URI.

To post a comment you must log in.
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Works fine, thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libwidgets/Chrome/TopMenu.vala'
2--- libwidgets/Chrome/TopMenu.vala 2016-02-11 11:12:03 +0000
3+++ libwidgets/Chrome/TopMenu.vala 2016-06-17 14:42:20 +0000
4@@ -118,7 +118,7 @@
5 * in the closure, resulting in a value of n which would always be n=1. So
6 * by introducting a new variable I can bypass this anoyance.
7 */
8- var item = new Gtk.MenuItem.with_label (GLib.Uri.unescape_string (path));
9+ var item = new Gtk.MenuItem.with_label (PF.FileUtils.sanitize_path (path));
10 item.activate.connect (() => {
11 back(cn);
12 });
13@@ -135,7 +135,7 @@
14 var n = 1;
15 foreach (string path in path_list) {
16 int cn = n++; /* For explanation look up */
17- var item = new Gtk.MenuItem.with_label (GLib.Uri.unescape_string (path));
18+ var item = new Gtk.MenuItem.with_label (PF.FileUtils.sanitize_path (path));
19 item.activate.connect (() => {
20 forward (cn);
21 });

Subscribers

People subscribed via source and target branches

to all changes: