Matthew Barnes 305df9
--- evolution-data-server-1.9.2/libedataserverui/e-name-selector-dialog.c.fix-name-selector-dialog	2006-11-08 11:23:52.000000000 -0500
Matthew Barnes 305df9
+++ evolution-data-server-1.9.2/libedataserverui/e-name-selector-dialog.c	2006-11-08 11:45:54.000000000 -0500
Matthew Barnes 305df9
@@ -1189,30 +1189,24 @@
Matthew Barnes 305df9
 {
Matthew Barnes 305df9
 	EDestinationStore *destination_store = E_DESTINATION_STORE (model);
Matthew Barnes 305df9
 	EDestination      *destination;
Matthew Barnes 305df9
-	gchar             *string;
Matthew Barnes 305df9
+	GString           *buffer;
Matthew Barnes 305df9
 
Matthew Barnes 305df9
        	destination = e_destination_store_get_destination (destination_store, iter);
Matthew Barnes 305df9
 	g_assert (destination);
Matthew Barnes 305df9
 
Matthew Barnes 305df9
-	if (e_destination_is_evolution_list (destination)) {
Matthew Barnes 305df9
-		if (e_destination_list_show_addresses (destination)) {
Matthew Barnes 305df9
-			const gchar *name;
Matthew Barnes 305df9
-			const gchar *addresses;
Matthew Barnes 305df9
-
Matthew Barnes 305df9
-			name      = e_destination_get_name (destination);
Matthew Barnes 305df9
-			addresses = e_destination_get_address (destination);
Matthew Barnes 305df9
-
Matthew Barnes 305df9
-			string = g_strdup_printf ("%s%s(%s)", name ? name : "",
Matthew Barnes 305df9
-						  name ? " " : "", addresses ? addresses : "?");
Matthew Barnes 305df9
-		} else {
Matthew Barnes 305df9
-			string = g_strdup (e_destination_get_name (destination));
Matthew Barnes 305df9
-		}
Matthew Barnes 305df9
-	} else {
Matthew Barnes 305df9
-		string = g_strdup (e_destination_get_address (destination));
Matthew Barnes 305df9
+	buffer = g_string_new (e_destination_get_name (destination));
Matthew Barnes 305df9
+
Matthew Barnes 305df9
+	if (!e_destination_is_evolution_list (destination)) {
Matthew Barnes 305df9
+		const gchar *email;
Matthew Barnes 305df9
+
Matthew Barnes 305df9
+		email = e_destination_get_email (destination);
Matthew Barnes 305df9
+		if (email == NULL || *email == '\0')
Matthew Barnes 305df9
+			email = "?";
Matthew Barnes 305df9
+		g_string_append_printf (buffer, " <%s>", email);
Matthew Barnes 305df9
 	}
Matthew Barnes 305df9
 
Matthew Barnes 305df9
-	g_object_set (cell, "text", string, NULL);
Matthew Barnes 305df9
-	g_free (string);
Matthew Barnes 305df9
+	g_object_set (cell, "text", buffer->str, NULL);
Matthew Barnes 305df9
+	g_string_free (buffer, TRUE);
Matthew Barnes 305df9
 }
Matthew Barnes 305df9
 
Matthew Barnes 305df9
 /* ----------------------- *