[nautilus] connect-server: add support for connecting to AFP-servers/volumes
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] connect-server: add support for connecting to AFP-servers/volumes
- Date: Sun, 22 Apr 2012 19:29:15 +0000 (UTC)
commit 5f018ca8b978a9e488560aeeb8db5febb7259d13
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Sat Apr 21 18:58:58 2012 -0400
connect-server: add support for connecting to AFP-servers/volumes
Since now gvfs support it.
https://bugzilla.gnome.org/show_bug.cgi?id=674497
src/nautilus-connect-server-dialog.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-connect-server-dialog.c b/src/nautilus-connect-server-dialog.c
index 95c023d..ea39cb1 100644
--- a/src/nautilus-connect-server-dialog.c
+++ b/src/nautilus-connect-server-dialog.c
@@ -110,6 +110,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 },
@@ -138,9 +139,10 @@ get_method_description (struct MethodInfo *meth)
return _("WebDAV (HTTP)");
} 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;
}
}
@@ -544,12 +546,12 @@ connect_dialog_connect_to_server (NautilusConnectServerDialog *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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]