diff options
| author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-04-20 04:51:42 +0000 |
|---|---|---|
| committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-04-20 04:51:42 +0000 |
| commit | 2b59b97e4b191f46c2a81bc8b721442face71e42 (patch) | |
| tree | 563d353e67aeabc2b91e75cab8baf75c3b7f2d1c | |
| parent | 3ab68b6263e57c056e21e1589ff0c93d0ae2ae4f (diff) | |
| download | evolution-data-server-2b59b97e4b191f46c2a81bc8b721442face71e42.tar.gz | |
Fix for bug #359806
svn path=/trunk/; revision=7713
| -rw-r--r-- | libedataserverui/ChangeLog | 5 | ||||
| -rw-r--r-- | libedataserverui/e-name-selector-dialog.c | 26 |
2 files changed, 15 insertions, 16 deletions
diff --git a/libedataserverui/ChangeLog b/libedataserverui/ChangeLog index 59180cec1..16595c89e 100644 --- a/libedataserverui/ChangeLog +++ b/libedataserverui/ChangeLog @@ -1,3 +1,8 @@ +2007-04-20 Srinivasa Ragavan <sragavan@novell.com> + + * e-name-selector-dialog.c: (destination_column_formatter): Fix for + bug #359806 from Matthew Barnes and Makuchaku. + 2007-04-04 Ross Burton <ross@openedhand.com> * e-source-selector.c: diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c index 5cd86ccef..97a654fed 100644 --- a/libedataserverui/e-name-selector-dialog.c +++ b/libedataserverui/e-name-selector-dialog.c @@ -1189,30 +1189,24 @@ destination_column_formatter (GtkTreeViewColumn *column, GtkCellRenderer *cell, { EDestinationStore *destination_store = E_DESTINATION_STORE (model); EDestination *destination; - gchar *string; + GString *buffer; destination = e_destination_store_get_destination (destination_store, iter); g_assert (destination); - if (e_destination_is_evolution_list (destination)) { - if (e_destination_list_show_addresses (destination)) { - const gchar *name; - const gchar *addresses; + buffer = g_string_new (e_destination_get_name (destination)); - name = e_destination_get_name (destination); - addresses = e_destination_get_address (destination); + if (!e_destination_is_evolution_list (destination)) { + const gchar *email; - string = g_strdup_printf ("%s%s(%s)", name ? name : "", - name ? " " : "", addresses ? addresses : "?"); - } else { - string = g_strdup (e_destination_get_name (destination)); - } - } else { - string = g_strdup (e_destination_get_address (destination)); + email = e_destination_get_email (destination); + if (email == NULL || *email == '\0') + email = "?"; + g_string_append_printf (buffer, " <%s>", email); } - g_object_set (cell, "text", string, NULL); - g_free (string); + g_object_set (cell, "text", buffer->str, NULL); + g_string_free (buffer, TRUE); } /* ----------------------- * |
