[evolution-patches] Exchange connector - patch for accessing other user's folder



Hi,

This is to fix subscribing to other user's folder.
Previously, user's e-mail ID was not extracted properly.
Please review,

Thanks,
Sushma.
Index: shell/e-folder-misc-dialogs.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/shell/e-folder-misc-dialogs.c,v
retrieving revision 1.5
diff -u -p -r1.5 e-folder-misc-dialogs.c
--- shell/e-folder-misc-dialogs.c	8 Mar 2005 11:14:20 -0000	1.5
+++ shell/e-folder-misc-dialogs.c	14 Mar 2005 12:28:58 -0000
@@ -393,8 +393,11 @@ do_foreign_folder_dialog (EStorageSetVie
 	GtkWidget *dialog;
 	GtkWidget *name_selector_widget;
 	GtkWidget *folder_name_entry;
-	const char *user_email_address = NULL;
+	char *user_email_address = NULL;
 	int response;
+	EDestinationStore *destination_store;
+	GList *destinations;
+	EDestination *destination;
 
 	glade_xml = glade_xml_new (CONNECTOR_GLADEDIR "/e-foreign-folder-dialog.glade",
 				   NULL, NULL);
@@ -426,8 +429,19 @@ do_foreign_folder_dialog (EStorageSetVie
 			return FALSE;
 		}
 
-		user_email_address = gtk_entry_get_text (GTK_ENTRY (name_selector_widget));
-
+		destination_store = e_name_selector_entry_peek_destination_store (E_NAME_SELECTOR_ENTRY (GTK_ENTRY (name_selector_widget)));
+		destinations = e_destination_store_list_destinations (destination_store);
+		if (!destinations) {
+			g_free (*storage_name_return);
+			*storage_name_return = NULL;
+			gtk_widget_destroy (dialog);
+			g_object_unref (name_selector);
+			return FALSE;
+		}
+		destination = destinations->data;
+		user_email_address = g_strdup (e_destination_get_email (destination));
+		g_list_free (destinations);
+		
 		if (user_email_address != NULL && *user_email_address != '\0')
 			break;
 
@@ -439,7 +453,7 @@ do_foreign_folder_dialog (EStorageSetVie
 	gtk_widget_show_all (dialog);
 
 	if (user_email_address)
-		*user_email_address_return = g_strdup (user_email_address);
+		*user_email_address_return = user_email_address;
 	*folder_name_return = g_strdup (gtk_entry_get_text (GTK_ENTRY (folder_name_entry)));
 
 	gtk_widget_destroy (dialog);
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-exchange/ChangeLog,v
retrieving revision 1.297
diff -u -p -r1.297 ChangeLog
--- ChangeLog	14 Mar 2005 09:23:37 -0000	1.297
+++ ChangeLog	14 Mar 2005 12:33:20 -0000
@@ -1,3 +1,8 @@
+2005-03-14  Sushma Rai  <rsushma novell com>
+
+	* shell/e-folder-misc-dialogs.c (do_foreign_folder_dialog): Fixed the
+	way e-mail ids were being read from the user name entry. 
+
 2005-03-11  Sarfraaz Ahmed <asarfraaz novell com>
 
         * calendar/e-cal-backend-exchange-calendar.c (add_ical) : Make sure we


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]