~jeremywootten/pantheon-files/fix-backspace-in-columnv-view

« back to all changes in this revision

Viewing changes to libwidgets/Resources.vala

merge various-fixes-part4-fix-network-drag-drop-copy-paste r2049

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
    public const string ICON_PATHBAR_SECONDARY_NAVIGATE_SYMBOLIC = "go-jump-symbolic";
76
76
    public const string ICON_PATHBAR_SECONDARY_REFRESH_SYMBOLIC = "view-refresh-symbolic";
77
77
 
78
 
    public const string ROOT_FS_URI = "file://";
79
 
    public const string TRASH_URI = "trash:///";
80
 
    public const string NETWORK_URI = "network:///";
81
 
    public const string RECENT_URI = "recent:///";
82
 
    public const string AFP_URI = "afp://";
83
 
    public const string DAV_URI = "dav://";
84
 
    public const string DAVS_URI = "davs://";
85
 
    public const string SFTP_URI = "sftp://";
86
 
    public const string FTP_URI = "ftp://";
87
 
    public const string SMB_URI = "smb://";
88
 
    public const string MTP_URI = "mtp://";
89
 
 
90
78
    public const string OPEN_IN_TERMINAL_DESKTOP_ID = "open-pantheon-terminal-here.desktop";
91
79
 
92
80
    public const string PROTOCOL_NAME_AFP = _("AFP");
165
153
        }
166
154
    }
167
155
 
168
 
    public string get_smb_share_from_uri (string uri) {
169
 
        if (!(Uri.parse_scheme (uri) == "smb"))
170
 
            return (uri);
171
 
 
172
 
        string [] uri_parts = uri.split (Path.DIR_SEPARATOR_S);
173
 
 
174
 
        if (uri_parts.length < 4)
175
 
            return uri;
176
 
        else {
177
 
            var sb = new StringBuilder ();
178
 
            for (int i = 0; i < 4; i++)
179
 
                sb.append (uri_parts [i] + Path.DIR_SEPARATOR_S);
180
 
 
181
 
            return sb.str;
182
 
        }
183
 
    }
184
 
 
185
156
    public string sanitize_protocol (string p) {
186
157
        string pname = Marlin.protocol_to_name (p);
187
158
        return Marlin.name_to_protocol_uri (pname);