From 5ce3040c0312f0ec838d03f97511fe4dcda276b3 Mon Sep 17 00:00:00 2001 From: infirit Date: Sun, 9 Aug 2015 20:09:42 +0200 Subject: connect-server: add support for connecting to AFP-servers/volumes Since now gvfs support it. Patch by: Carl-Anton Ingmarsson nautilus comnmit: 5f018ca8b978a9e488560aeeb8db5febb7259d13 nautilus bug: https://bugzilla.gnome.org/show_bug.cgi?id=674497 --- src/caja-connect-server-dialog.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/caja-connect-server-dialog.c') 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); -- cgit v1.2.1