Index: src/nautilus-connect-server-dialog.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-connect-server-dialog.c,v
retrieving revision 1.14
diff -U3 -r1.14 nautilus-connect-server-dialog.c
--- src/nautilus-connect-server-dialog.c	27 May 2005 08:46:04 -0000	1.14
+++ src/nautilus-connect-server-dialog.c	29 Aug 2005 01:07:42 -0000
@@ -760,14 +760,38 @@
 GtkWidget *
 nautilus_connect_server_dialog_new (NautilusWindow *window)
 {
+	NautilusConnectServerDialog *conndlg;
 	GtkWidget *dialog;
+	gchar *location;
+	GnomeVFSURI *uri;
 
 	dialog = gtk_widget_new (NAUTILUS_TYPE_CONNECT_SERVER_DIALOG, NULL);
 
 	if (window) {
+		conndlg = NAUTILUS_CONNECT_SERVER_DIALOG (dialog);
+
 		gtk_window_set_screen (GTK_WINDOW (dialog),
 				       gtk_window_get_screen (GTK_WINDOW (window)));
-		NAUTILUS_CONNECT_SERVER_DIALOG (dialog)->details->application = window->application;
+		conndlg->details->application = window->application;
+
+		/* Figure out the URI location of the parent window ... */
+		g_object_get (window, "location", &location, NULL);
+		if (location) {
+			uri = gnome_vfs_uri_new (location);
+			g_return_val_if_fail (uri != NULL, dialog);
+
+			/* ... and if it's a remote URI, then load as the default */
+			if (!gnome_vfs_uri_is_local (uri) && 
+			    !g_str_equal (gnome_vfs_uri_get_scheme (uri), "computer")) {
+
+				gtk_combo_box_set_active (GTK_COMBO_BOX (conndlg->details->type_combo), TYPE_URI);
+				gtk_entry_set_text (GTK_ENTRY (conndlg->details->uri_entry), location);
+
+			}
+
+			g_free (location);
+			gnome_vfs_uri_unref (uri);
+		}
 	}
 
 	return dialog;
Index: src/nautilus-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-window.c,v
retrieving revision 1.455
diff -U3 -r1.455 nautilus-window.c
--- src/nautilus-window.c	5 Aug 2005 18:38:11 -0000	1.455
+++ src/nautilus-window.c	29 Aug 2005 01:07:44 -0000
@@ -100,7 +100,8 @@
 
 enum {
 	ARG_0,
-	ARG_APP
+	ARG_APP,
+	PROP_LOCATION
 };
 
 enum {
@@ -521,6 +522,9 @@
 	case ARG_APP:
 		g_value_set_object (value, NAUTILUS_WINDOW (object)->application);
 		break;
+	case PROP_LOCATION:
+		g_value_set_string (value, NAUTILUS_WINDOW (object)->details->location);
+		break;
 	}
 }
 
@@ -1486,6 +1490,14 @@
 							      NAUTILUS_TYPE_APPLICATION,
 							      G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 	
+	g_object_class_install_property (G_OBJECT_CLASS (class),
+					 PROP_LOCATION,
+					 g_param_spec_string ("location",
+							      "Location URI",
+							      "The location (URI) of the window",
+							      NULL,
+							      G_PARAM_READABLE));
+
 	signals[GO_UP] =
 		g_signal_new ("go_up",
 			      G_TYPE_FROM_CLASS (class),
