summaryrefslogtreecommitdiff
path: root/src/caja-connect-server-dialog.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-08-09 20:09:42 +0200
committerinfirit <[email protected]>2015-08-25 18:02:03 +0200
commit5ce3040c0312f0ec838d03f97511fe4dcda276b3 (patch)
treec553f90c646871cce99e1290182dca0ce1bca8b4 /src/caja-connect-server-dialog.c
parent3d4693311627ef58f70a85258d03b1637e65c207 (diff)
downloadcaja-5ce3040c0312f0ec838d03f97511fe4dcda276b3.tar.bz2
caja-5ce3040c0312f0ec838d03f97511fe4dcda276b3.tar.xz
connect-server: add support for connecting to AFP-servers/volumes
Since now gvfs support it. Patch by: Carl-Anton Ingmarsson <[email protected]> nautilus comnmit: 5f018ca8b978a9e488560aeeb8db5febb7259d13 nautilus bug: https://bugzilla.gnome.org/show_bug.cgi?id=674497
Diffstat (limited to 'src/caja-connect-server-dialog.c')
-rw-r--r--src/caja-connect-server-dialog.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index 921b2597..731d6eee 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -116,6 +116,7 @@ enum
/* Remember to fill in descriptions below */
static struct MethodInfo methods[] =
{
+ { "afp", SHOW_SHARE | SHOW_USER, 548 },
/* FIXME: we need to alias ssh to sftp */
{ "sftp", SHOW_PORT | SHOW_USER, 22 },
{ "ftp", SHOW_PORT | SHOW_USER, 21 },
@@ -145,8 +146,10 @@ get_method_description (struct MethodInfo *meth)
} else if (strcmp (meth->scheme, "davs") == 0) {
return _("Secure WebDAV (HTTPS)");
- /* No descriptive text */
+ } else if (strcmp (meth->scheme, "afp") == 0) {
+ return _("Apple Filing Protocol (AFP)");
} else {
+ /* No descriptive text */
return meth->scheme;
}
}
@@ -540,12 +543,13 @@ connect_dialog_connect_to_server (CajaConnectServerDialog *dialog)
domain = NULL;
folder = NULL;
- /* FTP special case */
if (meth->flags & IS_ANONYMOUS) {
+ /* FTP special case */
user = g_strdup ("anonymous");
- /* SMB special case */
- } else if (strcmp (meth->scheme, "smb") == 0) {
+ } else if ((strcmp (meth->scheme, "smb") == 0) ||
+ (strcmp (meth->scheme, "afp") == 0)){
+ /* SMB/AFP special case */
g_free (initial_path);
t = gtk_editable_get_chars (GTK_EDITABLE (dialog->details->share_entry), 0, -1);