1811.1.1
by Jeremy Wootten
Code clean: tabs, trailing space, headers, comments |
1 |
/***
|
2432.1.1
by Leonardo Lemos
Bump copyright years |
2 |
Copyright (c) 2015-2017 elementary LLC (http://launchpad.net/elementary)
|
1811.1.1
by Jeremy Wootten
Code clean: tabs, trailing space, headers, comments |
3 |
|
4 |
This program is free software: you can redistribute it and/or modify it
|
|
5 |
under the terms of the GNU Lesser General Public License version 3, as published
|
|
6 |
by the Free Software Foundation.
|
|
7 |
||
8 |
This program is distributed in the hope that it will be useful, but
|
|
9 |
WITHOUT ANY WARRANTY; without even the implied warranties of
|
|
10 |
MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
|
|
11 |
PURPOSE. See the GNU General Public License for more details.
|
|
12 |
||
13 |
You should have received a copy of the GNU General Public License along
|
|
14 |
with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
15 |
||
16 |
Authors :
|
|
17 |
***/
|
|
18 |
||
465
by am.monkeyd at gmail
icons: use GENERIC_FALLBACK, vala/C use common const string from Ressources.vala, change MARLIN_ICON_FILESYSTEM to drive-harddisk-system |
19 |
namespace Marlin { |
2201.1.1
by jeremy at elementaryos
Change desktop file name and make other associated changes for consistency |
20 |
public const string APP_ID = "org.pantheon.files"; |
21 |
public const string APP_DESKTOP = APP_ID + ".desktop"; |
|
2218.1.1
by Corentin Noël
Fixed translation |
22 |
public const string APP_TITLE = N_("Files"); |
2141.1.1
by jeremy at elementaryos
Fix copyright assignment where necessary |
23 |
public const string COPYRIGHT = APP_YEARS + " elementary LLC (http://launchpad.net/elementary)"; |
2432.1.1
by Leonardo Lemos
Bump copyright years |
24 |
public const string APP_YEARS = "2013-2017"; |
620
by am.monkeyd at gmail
baygon vert |
25 |
public const string LAUNCHPAD_LABEL = "Website"; |
801.2.1
by Mario Guerriero
fixed bug #995691 |
26 |
public const string LAUNCHPAD_URL = "http://launchpad.net/pantheon-files"; |
27 |
public const string HELP_URL = "https://answers.launchpad.net/pantheon-files"; |
|
28 |
public const string BUG_URL = "https://bugs.launchpad.net/pantheon-files/+filebug"; |
|
29 |
public const string TRANSLATE_URL = "https://translations.launchpad.net/pantheon-files"; |
|
2218.1.1
by Corentin Noël
Fixed translation |
30 |
public const string COMMENTS = N_("A simple and powerful file manager"); |
2309.2.4
by Jeremy Wootten
Ignore invalid tab name; remove redundant code; correct format |
31 |
public const string INVALID_TAB_NAME = "----"; |
1266.3.4
by David Gomes
Stripped trailing whitespace from src/. |
32 |
|
33 |
public const string[] AUTHORS = { |
|
35
by am.monkeyd at gmail
various + UIManager |
34 |
"ammonkey <am.monkeyd@gmail.com>", |
586.1.1
by am.monkeyd at gmail
prepare the migration to granite |
35 |
"Lucas Baudin <xapantu@gmail.com>", |
36
by am.monkeyd at gmail
reindenting all vala file tab=4 space char |
36 |
"Mathijs Henquet <mathijs.henquet@gmail.com>", |
391
by xapantu
Update Authors ;) |
37 |
"Robert Roth", |
38 |
"Vadim Rutkovsky", |
|
39 |
"Rico Tzschichholz", |
|
871
by Mario Guerriero
fixed bug #1005287 |
40 |
"Mario Guerriero <mario@elementaryos.org>", |
2141.1.1
by jeremy at elementaryos
Fix copyright assignment where necessary |
41 |
"Julián Unrrein <junrrein@gmail.com>", |
1459.1.193
by jeremy at elementaryos
Remove unnecessary comment lines, remove redundant files, remove or revise TODOs and FIXMEs, update about dialog authors list and AUTHORS file |
42 |
"Jeremy Wootten <jeremy@elementaryos.org>", |
35
by am.monkeyd at gmail
various + UIManager |
43 |
null
|
44 |
};
|
|
1266.3.4
by David Gomes
Stripped trailing whitespace from src/. |
45 |
|
46 |
public const string[] ARTISTS = { |
|
35
by am.monkeyd at gmail
various + UIManager |
47 |
"Daniel Foré <daniel.p.fore@gmail.com>", |
48 |
null
|
|
49 |
};
|
|
50 |
||
2218.1.1
by Corentin Noël
Fixed translation |
51 |
public const string TRANSLATORS = N_("translator-credits"); |
596
by Cody Garver
Fix for commit 590 |
52 |
|
2208.1.1
by jeremy at elementaryos
Send operation completion notification from ProgressUIHandler |
53 |
public const string ICON_APP_LOGO = "system-file-manager"; |
1170.1.4
by Cody Garver
Revert drive-harddisk-system changes because it specifically refers to /. |
54 |
public const string ICON_FILESYSTEM = "drive-harddisk-system"; |
1170.1.1
by Cody Garver
Refactor icon variables and implement some more symbolics to fix bug #1087694. |
55 |
public const string ICON_FILESYSTEM_SYMBOLIC = "drive-harddisk-symbolic"; |
56 |
public const string ICON_FOLDER = "folder"; |
|
57 |
public const string ICON_FOLDER_DOCUMENTS_SYMBOLIC = "folder-documents-symbolic"; |
|
1559.1.1
by Daniel Foré
change folder-downloads to folder-download |
58 |
public const string ICON_FOLDER_DOWNLOADS_SYMBOLIC = "folder-download-symbolic"; |
1170.1.1
by Cody Garver
Refactor icon variables and implement some more symbolics to fix bug #1087694. |
59 |
public const string ICON_FOLDER_MUSIC_SYMBOLIC = "folder-music-symbolic"; |
60 |
public const string ICON_FOLDER_PICTURES_SYMBOLIC = "folder-pictures-symbolic"; |
|
1978
by Cody Garver
Make sure Public dir gets a symbolic icon in LocationBar |
61 |
public const string ICON_FOLDER_PUBLICSHARE_SYMBOLIC = "folder-publicshare-symbolic"; |
1170.1.1
by Cody Garver
Refactor icon variables and implement some more symbolics to fix bug #1087694. |
62 |
public const string ICON_FOLDER_REMOTE = "folder-remote"; |
63 |
public const string ICON_FOLDER_REMOTE_SYMBOLIC = "folder-remote-symbolic"; |
|
64 |
public const string ICON_FOLDER_TEMPLATES_SYMBOLIC = "folder-templates-symbolic"; |
|
65 |
public const string ICON_FOLDER_VIDEOS_SYMBOLIC = "folder-videos-symbolic"; |
|
66 |
public const string ICON_GO_HOME_SYMBOLIC = "go-home-symbolic"; |
|
465
by am.monkeyd at gmail
icons: use GENERIC_FALLBACK, vala/C use common const string from Ressources.vala, change MARLIN_ICON_FILESYSTEM to drive-harddisk-system |
67 |
public const string ICON_HOME = "user-home"; |
1953.2.1
by Jeremy Wootten
Rebuild location bar and associated widgets; make consequent changes to TopMenu and Window |
68 |
public const string ICON_NETWORK_SYMBOLIC = "network-workgroup-symbolic"; |
1170.1.1
by Cody Garver
Refactor icon variables and implement some more symbolics to fix bug #1087694. |
69 |
public const string ICON_NETWORK = "network-workgroup"; |
1953.2.1
by Jeremy Wootten
Rebuild location bar and associated widgets; make consequent changes to TopMenu and Window |
70 |
public const string ICON_NETWORK_SERVER_SYMBOLIC = "network-server-symbolic"; |
1170.1.1
by Cody Garver
Refactor icon variables and implement some more symbolics to fix bug #1087694. |
71 |
public const string ICON_NETWORK_SERVER = "network-server"; |
465
by am.monkeyd at gmail
icons: use GENERIC_FALLBACK, vala/C use common const string from Ressources.vala, change MARLIN_ICON_FILESYSTEM to drive-harddisk-system |
72 |
public const string ICON_TRASH = "user-trash"; |
73 |
public const string ICON_TRASH_FULL = "user-trash-full"; |
|
1170.1.1
by Cody Garver
Refactor icon variables and implement some more symbolics to fix bug #1087694. |
74 |
public const string ICON_TRASH_SYMBOLIC = "user-trash-symbolic"; |
1740.1.1
by Fabio Zaramella
check if gvfs recent is supported, if yes make use of recent:/// as nemo and nautilus do |
75 |
public const string ICON_RECENT = "document-open-recent"; |
76 |
public const string ICON_RECENT_SYMBOLIC = "document-open-recent-symbolic"; |
|
1953.2.1
by Jeremy Wootten
Rebuild location bar and associated widgets; make consequent changes to TopMenu and Window |
77 |
public const string ICON_PATHBAR_PRIMARY_FIND_SYMBOLIC = "edit-find-symbolic"; |
78 |
public const string ICON_PATHBAR_PRIMARY_PATH_SYMBOLIC = "emblem-documents-symbolic"; |
|
79 |
public const string ICON_PATHBAR_SECONDARY_NAVIGATE_SYMBOLIC = "go-jump-symbolic"; |
|
80 |
public const string ICON_PATHBAR_SECONDARY_REFRESH_SYMBOLIC = "view-refresh-symbolic"; |
|
465
by am.monkeyd at gmail
icons: use GENERIC_FALLBACK, vala/C use common const string from Ressources.vala, change MARLIN_ICON_FILESYSTEM to drive-harddisk-system |
81 |
|
1459.1.92
by jeremy at elementaryos
Do not hard code XDG path, implement <Ctrl><Shift>N hot key |
82 |
public const string OPEN_IN_TERMINAL_DESKTOP_ID = "open-pantheon-terminal-here.desktop"; |
1643.2.36
by jeremy at elementaryos
Show correct tab names for protocols and shares |
83 |
|
84 |
public const string PROTOCOL_NAME_AFP = _("AFP"); |
|
85 |
public const string PROTOCOL_NAME_DAV = _("DAV"); |
|
86 |
public const string PROTOCOL_NAME_DAVS = _("DAVS"); |
|
87 |
public const string PROTOCOL_NAME_FTP = _("FTP"); |
|
88 |
public const string PROTOCOL_NAME_NETWORK = _("Network"); |
|
89 |
public const string PROTOCOL_NAME_SFTP = _("SFTP"); |
|
90 |
public const string PROTOCOL_NAME_SMB = _("SMB"); |
|
91 |
public const string PROTOCOL_NAME_TRASH = _("Trash"); |
|
1740.1.10
by Fabio Zaramella
implement [Restore All] in trash toolbar |
92 |
public const string PROTOCOL_NAME_RECENT = _("Recent"); |
1949.2.2
by Jeremy Wootten
Correct breadcrumb elements to path function |
93 |
public const string PROTOCOL_NAME_MTP = _("MTP"); |
94 |
public const string PROTOCOL_NAME_FILE = _("File System"); |
|
95 |
||
96 |
public const double MINIMUM_LOCATION_BAR_ENTRY_WIDTH = 36; |
|
1953.2.1
by Jeremy Wootten
Rebuild location bar and associated widgets; make consequent changes to TopMenu and Window |
97 |
public const uint LOCATION_BAR_ANIMATION_TIME_MSEC = 300; |
98 |
public const uint FRAME_RATE_HZ = 60; |
|
99 |
public const uint BUTTON_LONG_PRESS = 300; |
|
2044.2.1
by Jeremy Wootten
Limit time spent loading resolution in OverlayBar; remember results; skip .JP2 |
100 |
|
101 |
public const string[] SKIP_IMAGES = {"image/svg+xml", "image/tiff", "image/jp2"}; |
|
1953.2.1
by Jeremy Wootten
Rebuild location bar and associated widgets; make consequent changes to TopMenu and Window |
102 |
|
1643.2.36
by jeremy at elementaryos
Show correct tab names for protocols and shares |
103 |
public string protocol_to_name (string protocol) { |
104 |
/* Deal with protocol with or without : or / characters at the end */
|
|
105 |
string s = protocol.delimit (":/", ' ').chomp (); |
|
106 |
||
107 |
switch (s) { |
|
1740.1.17
by Fabio Zaramella
name for recent tab |
108 |
case "recent": |
109 |
return Marlin.PROTOCOL_NAME_RECENT; |
|
1643.2.36
by jeremy at elementaryos
Show correct tab names for protocols and shares |
110 |
case "trash": |
111 |
return Marlin.PROTOCOL_NAME_TRASH; |
|
112 |
case "network": |
|
113 |
return Marlin.PROTOCOL_NAME_NETWORK; |
|
1811.1.1
by Jeremy Wootten
Code clean: tabs, trailing space, headers, comments |
114 |
case "smb": |
1643.2.36
by jeremy at elementaryos
Show correct tab names for protocols and shares |
115 |
return Marlin.PROTOCOL_NAME_SMB; |
1811.1.1
by Jeremy Wootten
Code clean: tabs, trailing space, headers, comments |
116 |
case "ftp": |
1643.2.36
by jeremy at elementaryos
Show correct tab names for protocols and shares |
117 |
return Marlin.PROTOCOL_NAME_FTP; |
1811.1.1
by Jeremy Wootten
Code clean: tabs, trailing space, headers, comments |
118 |
case "sftp": |
1643.2.36
by jeremy at elementaryos
Show correct tab names for protocols and shares |
119 |
return Marlin.PROTOCOL_NAME_SFTP; |
120 |
case "afp": |
|
121 |
return Marlin.PROTOCOL_NAME_AFP; |
|
122 |
case "dav": |
|
123 |
return Marlin.PROTOCOL_NAME_DAV; |
|
124 |
case "davs": |
|
125 |
return Marlin.PROTOCOL_NAME_DAVS; |
|
1949.2.2
by Jeremy Wootten
Correct breadcrumb elements to path function |
126 |
case "mtp": |
127 |
return Marlin.PROTOCOL_NAME_MTP; |
|
128 |
case "file": |
|
129 |
return Marlin.PROTOCOL_NAME_FILE; |
|
1643.2.36
by jeremy at elementaryos
Show correct tab names for protocols and shares |
130 |
default: |
131 |
return protocol; |
|
132 |
}
|
|
133 |
}
|
|
1643.2.40
by jeremy at elementaryos
Fix the creation of network mount bookmark for smb locations |
134 |
|
1949.2.2
by Jeremy Wootten
Correct breadcrumb elements to path function |
135 |
public string name_to_protocol_uri (string pname) { |
136 |
/* Deal with protocol with or without : or / characters at the end */
|
|
137 |
||
138 |
switch (pname.strip ()) { |
|
139 |
case Marlin.PROTOCOL_NAME_RECENT: |
|
140 |
return Marlin.RECENT_URI; |
|
141 |
case Marlin.PROTOCOL_NAME_TRASH: |
|
142 |
return Marlin.TRASH_URI; |
|
143 |
case Marlin.PROTOCOL_NAME_NETWORK: |
|
144 |
return Marlin.NETWORK_URI; |
|
145 |
case Marlin.PROTOCOL_NAME_SMB: |
|
146 |
return Marlin.SMB_URI; |
|
147 |
case Marlin.PROTOCOL_NAME_FTP: |
|
148 |
return Marlin.FTP_URI; |
|
149 |
case Marlin.PROTOCOL_NAME_SFTP: |
|
150 |
return Marlin.SFTP_URI; |
|
151 |
case Marlin.PROTOCOL_NAME_AFP: |
|
152 |
return Marlin.AFP_URI; |
|
153 |
case Marlin.PROTOCOL_NAME_DAV: |
|
154 |
return Marlin.DAV_URI; |
|
155 |
case Marlin.PROTOCOL_NAME_DAVS: |
|
156 |
return Marlin.DAVS_URI; |
|
157 |
default: |
|
158 |
return ""; |
|
159 |
}
|
|
160 |
}
|
|
161 |
||
162 |
public string sanitize_protocol (string p) { |
|
163 |
string pname = Marlin.protocol_to_name (p); |
|
164 |
return Marlin.name_to_protocol_uri (pname); |
|
165 |
}
|
|
1459.1.65
by jeremy at elementaryos
Fix rubberbanding in list and column view |
166 |
}
|