Index: libgnomeui/gnome-authentication-manager.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-authentication-manager.c,v
retrieving revision 1.10
diff -u -r1.10 gnome-authentication-manager.c
--- libgnomeui/gnome-authentication-manager.c	24 May 2004 20:35:53 -0000	1.10
+++ libgnomeui/gnome-authentication-manager.c	11 Jun 2004 13:28:05 -0000
@@ -301,6 +301,8 @@
 	g_free (message);
 
 	gnome_password_dialog_set_domain (dialog, in_args->default_domain);
+	gnome_password_dialog_set_show_userpass_buttons (dialog,
+						in_args->flags & GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_ANON_SUPPORTED);
 	gnome_password_dialog_set_show_username (dialog, 
 						 in_args->flags & GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_USERNAME);
 	gnome_password_dialog_set_show_domain (dialog, 
@@ -322,9 +324,15 @@
 	GnomePasswordDialogRemember remember;
 	if (result) {
 		out_args->abort_auth = FALSE;
-		out_args->username = gnome_password_dialog_get_username (dialog);
-		out_args->domain = gnome_password_dialog_get_domain (dialog);
-		out_args->password = gnome_password_dialog_get_password (dialog);
+		out_args->out_flags = 0;
+		if (gnome_password_dialog_anon_selected (dialog)) {
+			out_args->out_flags |= GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_OUT_ANON_SELECTED;
+		}
+		else {
+			out_args->username = gnome_password_dialog_get_username (dialog);
+			out_args->domain = gnome_password_dialog_get_domain (dialog);
+			out_args->password = gnome_password_dialog_get_password (dialog);
+		}
 
 		remember = gnome_password_dialog_get_remember (dialog);
 		if (remember == GNOME_PASSWORD_DIALOG_REMEMBER_SESSION) {
Index: libgnomeui/gnome-password-dialog.c
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-password-dialog.c,v
retrieving revision 1.3
diff -u -r1.3 gnome-password-dialog.c
--- libgnomeui/gnome-password-dialog.c	4 Dec 2003 13:30:52 -0000	1.3
+++ libgnomeui/gnome-password-dialog.c	11 Jun 2004 13:28:05 -0000
@@ -37,6 +37,7 @@
 #include <gtk/gtkstock.h>
 #include <gtk/gtktable.h>
 #include <gtk/gtkvbox.h>
+#include <gtk/gtkradiobutton.h>
 
 struct GnomePasswordDialogDetails
 {
@@ -61,6 +62,12 @@
 	
 	GtkWidget *remember_session_button;
 	GtkWidget *remember_forever_button;
+
+	GtkWidget *radio_vbox;
+	GtkWidget *connect_with_no_userpass_button;
+	GtkWidget *connect_with_userpass_button;
+
+	gboolean anon_support_on;
 };
 
 /* Caption table rows indices */
@@ -126,6 +133,7 @@
 	password_dialog->details = g_new0 (GnomePasswordDialogDetails, 1);
 	password_dialog->details->show_username = TRUE;
 	password_dialog->details->show_password = TRUE;
+	password_dialog->details->anon_support_on = FALSE;
 }
 
 /* GObjectClass methods */
@@ -173,7 +181,24 @@
 }
 
 static void
-add_row (GtkWidget *table, int row, const char *label_text, GtkWidget *entry)
+userpass_radio_button_clicked (GtkWidget *widget, gpointer callback_data)
+{
+	GnomePasswordDialog *password_dialog;
+
+	password_dialog = GNOME_PASSWORD_DIALOG (callback_data);
+
+	if (widget == password_dialog->details->connect_with_no_userpass_button) {
+		gtk_widget_set_sensitive (
+			password_dialog->details->table, FALSE);
+	}
+	else { /* the other button */
+		gtk_widget_set_sensitive (
+                        password_dialog->details->table, TRUE);
+	}	
+}
+
+static void
+add_row (GtkWidget *table, int row, const char *label_text, GtkWidget *entry, int offset)
 {
 	GtkWidget *label;
 
@@ -185,7 +210,7 @@
 			  row, row + 1,
 			  GTK_FILL,
 			  (GTK_FILL|GTK_EXPAND),
-			  0, 0);
+			  offset, 0);
 	
 	gtk_table_attach (GTK_TABLE (table), entry,
 			  1, 2,
@@ -208,6 +233,14 @@
 {
 	int row;
 	GtkWidget *table;
+	int offset;
+
+	if (password_dialog->details->anon_support_on) {
+		offset = 20;
+	}
+	else {
+		offset = 0;
+	}
 
 	table = password_dialog->details->table;
 	/* This will not kill the entries, since they are ref:ed */
@@ -216,11 +249,11 @@
 	
 	row = 0;
 	if (password_dialog->details->show_username)
-		add_row (table, row++, _("_Username:"), password_dialog->details->username_entry);
+		add_row (table, row++, _("_Username:"), password_dialog->details->username_entry, offset);
 	if (password_dialog->details->show_domain)
-		add_row (table, row++, _("_Domain:"), password_dialog->details->domain_entry);
+		add_row (table, row++, _("_Domain:"), password_dialog->details->domain_entry, offset);
 	if (password_dialog->details->show_password)
-		add_row (table, row++, _("_Password:"), password_dialog->details->password_entry);
+		add_row (table, row++, _("_Password:"), password_dialog->details->password_entry, offset);
 
 	gtk_widget_show_all (table);
 }
@@ -267,6 +300,7 @@
 	GtkWidget *hbox;
 	GtkWidget *vbox;
 	GtkWidget *dialog_icon;
+	GSList *group;
 
 	password_dialog = GNOME_PASSWORD_DIALOG (gtk_widget_new (gnome_password_dialog_get_type (), NULL));
 
@@ -291,6 +325,26 @@
 	g_signal_connect (password_dialog, "close",
 			  G_CALLBACK (dialog_close_callback), password_dialog);
 
+	/* the radio buttons for anonymous login */
+	password_dialog->details->connect_with_no_userpass_button =
+                gtk_radio_button_new_with_label (NULL, _("Connect with no user name or password"));
+	group = gtk_radio_button_get_group (
+			GTK_RADIO_BUTTON (password_dialog->details->connect_with_no_userpass_button));
+        password_dialog->details->connect_with_userpass_button =
+                gtk_radio_button_new_with_label (
+			group, ("Connect as this user"));
+	password_dialog->details->radio_vbox = gtk_vbox_new (FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (password_dialog->details->radio_vbox),
+		password_dialog->details->connect_with_no_userpass_button,
+		FALSE, FALSE, 0);	
+	gtk_box_pack_start (GTK_BOX (password_dialog->details->radio_vbox),
+                password_dialog->details->connect_with_userpass_button,
+                FALSE, FALSE, 0);
+	g_signal_connect (password_dialog->details->connect_with_no_userpass_button, "clicked",
+                          G_CALLBACK (userpass_radio_button_clicked), password_dialog);
+	g_signal_connect (password_dialog->details->connect_with_userpass_button, "clicked",
+                          G_CALLBACK (userpass_radio_button_clicked), password_dialog);	
+
 	/* The table that holds the captions */
 	password_dialog->details->table = table = gtk_table_new (3, 2, FALSE);
 	gtk_table_set_col_spacings (GTK_TABLE (table), 12);
@@ -323,7 +377,7 @@
 				  G_CALLBACK (gtk_window_activate_default),
 				  password_dialog);
 	add_table_rows (password_dialog);
-	
+
 	/* Adds some eye-candy to the dialog */
 	hbox = gtk_hbox_new (FALSE, 12);
 	dialog_icon = gtk_image_new_from_stock (GNOME_STOCK_AUTHENTICATION, GTK_ICON_SIZE_DIALOG);
@@ -348,6 +402,8 @@
 				    TRUE,	/* fill */
 				    5);		/* padding */
 	}
+	gtk_box_pack_start (GTK_BOX (vbox), password_dialog->details->radio_vbox,
+                            TRUE, TRUE, 5);
 	gtk_box_pack_start (GTK_BOX (vbox), table, 
 			    TRUE, TRUE, 5);
 
@@ -520,6 +576,37 @@
 	g_return_val_if_fail (GNOME_IS_PASSWORD_DIALOG (password_dialog), NULL);
 
 	return g_strdup (gtk_entry_get_text (GTK_ENTRY (password_dialog->details->password_entry)));
+}
+
+void
+gnome_password_dialog_set_show_userpass_buttons (GnomePasswordDialog         *password_dialog,
+                                                 gboolean                     show_userpass_buttons)
+{
+        if (show_userpass_buttons) {
+                password_dialog->details->anon_support_on = TRUE;
+                gtk_widget_show (password_dialog->details->radio_vbox);
+                if (gtk_toggle_button_get_active (
+                        GTK_TOGGLE_BUTTON (password_dialog->details->connect_with_no_userpass_button))) {
+                        gtk_widget_set_sensitive (password_dialog->details->table, FALSE);
+                }
+                else {
+                        gtk_widget_set_sensitive (password_dialog->details->table, TRUE);
+                }
+        } else {
+                password_dialog->details->anon_support_on = FALSE;
+                gtk_widget_hide (password_dialog->details->radio_vbox);
+                gtk_widget_set_sensitive (password_dialog->details->table, TRUE);
+        }
+                                                                                                                             
+        add_table_rows (password_dialog);
+}
+
+gboolean
+gnome_password_dialog_anon_selected (GnomePasswordDialog *password_dialog)
+{
+	return gtk_toggle_button_get_active (
+        		GTK_TOGGLE_BUTTON (
+				password_dialog->details->connect_with_no_userpass_button));
 }
 
 void
Index: libgnomeui/gnome-password-dialog.h
===================================================================
RCS file: /cvs/gnome/libgnomeui/libgnomeui/gnome-password-dialog.h,v
retrieving revision 1.3
diff -u -r1.3 gnome-password-dialog.h
--- libgnomeui/gnome-password-dialog.h	4 Jan 2004 11:21:42 -0000	1.3
+++ libgnomeui/gnome-password-dialog.h	11 Jun 2004 13:28:05 -0000
@@ -90,11 +90,15 @@
 void                        gnome_password_dialog_set_remember      (GnomePasswordDialog         *password_dialog,
 								     GnomePasswordDialogRemember  remember);
 GnomePasswordDialogRemember gnome_password_dialog_get_remember      (GnomePasswordDialog         *password_dialog);
+void                        gnome_password_dialog_set_show_userpass_buttons (GnomePasswordDialog         *password_dialog,
+                                                                     	     gboolean                     show_userpass_buttons);
 
 /* Attribute accessors */
 char *     gnome_password_dialog_get_username            (GnomePasswordDialog *password_dialog);
 char *     gnome_password_dialog_get_domain              (GnomePasswordDialog *password_dialog);
 char *     gnome_password_dialog_get_password            (GnomePasswordDialog *password_dialog);
+
+gboolean   gnome_password_dialog_anon_selected 		 (GnomePasswordDialog *password_dialog);
 
 G_END_DECLS
 
