Merge lp:~optimisme/pantheon-files/fix-1179137 into lp:~elementary-apps/pantheon-files/trunk

Proposed by Albert
Status: Merged
Approved by: Cody Garver
Approved revision: 1188
Merged at revision: 1186
Proposed branch: lp:~optimisme/pantheon-files/fix-1179137
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 101 lines (+12/-15)
1 file modified
src/View/LocationBar.vala (+12/-15)
To merge this branch: bzr merge lp:~optimisme/pantheon-files/fix-1179137
Reviewer Review Type Date Requested Status
Cody Garver (community) Needs Fixing
Review via email: mp+164679@code.launchpad.net

Commit message

Show icons for mounted filesystems to fix bug #1179137.

Description of the change

Organized protocols alphabetically and source cleaning.

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Now it's on 19, 27, 28 :(

Maybe try this

bzr branch lp:pantheon-files files
cd files
# make changes
bzr commit -m "Symbolic icon for mounted units"
bzr push lp:~optimisme/pantheon-files/fix-1179137 --overwrite

review: Needs Fixing
Revision history for this message
Albert (optimisme) wrote :

Hi Cody, I will remove this source since is for two different bugs and I will leave each bug clean.

1186. By Albert

Code cleaning 2

1187. By Albert

Code cleaning 2

1188. By Albert

Code cleaning 2

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/View/LocationBar.vala'
2--- src/View/LocationBar.vala 2013-05-19 17:05:41 +0000
3+++ src/View/LocationBar.vala 2013-05-20 08:14:25 +0000
4@@ -104,17 +104,15 @@
5 /* grab the UIManager */
6 this.ui = ui;
7 this.win = win;
8- /*add_icon({ Marlin.TRASH_URI, Marlin.ICON_TRASH, true, null, null, true, N_("Trash")});
9- add_icon({ Marlin.NETWORK_URI, Marlin.ICON_NETWORK, true, null, null, true, N_("Network")});*/
10 /* FIXME the string split of the path url is kinda too basic, we should use the Gile to split our uris and determine the protocol (if any) with g_uri_parse_scheme or g_file_get_uri_scheme */
11- add_icon({ "trash://", Marlin.ICON_TRASH_SYMBOLIC, true, null, null, null, true, _("Trash")});
12- add_icon({ "network://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("Network")});
13 add_icon({ "afp://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("AFP")});
14 add_icon({ "dav://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("DAV")});
15 add_icon({ "davs://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("DAVS")});
16 add_icon({ "ftp://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("FTP")});
17+ add_icon({ "network://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("Network")});
18 add_icon({ "sftp://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("SFTP")});
19 add_icon({ "smb://", Marlin.ICON_FOLDER_REMOTE_SYMBOLIC, true, null, null, null, true, _("SMB")});
20+ add_icon({ "trash://", Marlin.ICON_TRASH_SYMBOLIC, true, null, null, null, true, _("Trash")});
21
22 /* music */
23 string dir;
24@@ -125,7 +123,6 @@
25 icon.exploded[0] = "/";
26 add_icon(icon);
27 }
28-
29 /* image */
30 dir = Environment.get_user_special_dir(UserDirectory.PICTURES);
31 if(dir.contains("/"))
32@@ -134,7 +131,6 @@
33 icon.exploded[0] = "/";
34 add_icon(icon);
35 }
36-
37 /* movie */
38 dir = Environment.get_user_special_dir(UserDirectory.VIDEOS);
39 if(dir.contains("/"))
40@@ -143,7 +139,6 @@
41 icon.exploded[0] = "/";
42 add_icon(icon);
43 }
44-
45 /* downloads */
46 dir = Environment.get_user_special_dir(UserDirectory.DOWNLOAD);
47 if(dir.contains("/"))
48@@ -152,7 +147,6 @@
49 icon.exploded[0] = "/";
50 add_icon(icon);
51 }
52-
53 /* documents */
54 dir = Environment.get_user_special_dir(UserDirectory.DOCUMENTS);
55 if(dir.contains("/"))
56@@ -161,7 +155,6 @@
57 icon.exploded[0] = "/";
58 add_icon(icon);
59 }
60-
61 /* templates */
62 dir = Environment.get_user_special_dir(UserDirectory.TEMPLATES);
63 if(dir.contains("/"))
64@@ -170,7 +163,7 @@
65 icon.exploded[0] = "/";
66 add_icon(icon);
67 }
68-
69+ /* home */
70 dir = Environment.get_home_dir();
71 if(dir.contains("/"))
72 {
73@@ -178,8 +171,15 @@
74 icon.exploded[0] = "/";
75 add_icon(icon);
76 }
77-
78-
79+ /* media mounted volumes */
80+ dir = "/media";
81+ if(dir.contains("/"))
82+ {
83+ IconDirectory icon = {dir, Marlin.ICON_FILESYSTEM_SYMBOLIC, false, null, null, dir.split("/"), true, null};
84+ icon.exploded[0] = "/";
85+ add_icon(icon);
86+ }
87+ /* filesystem */
88 IconDirectory icon = {"/", Marlin.ICON_FILESYSTEM_SYMBOLIC, false, null, null, null, false, null};
89 icon.exploded = {"/"};
90 add_icon(icon);
91@@ -197,10 +197,7 @@
92 menu.show_all();
93
94 need_completion.connect(on_need_completion);
95-
96-
97 }
98-
99
100 protected void merge_in_clipboard_actions ()
101 {

Subscribers

People subscribed via source and target branches

to all changes: