From dbe5c76eb0241a143c365f0f2731830e04fe1cc7 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Fri, 13 Sep 2002 10:02:24 +0000 Subject: [ Fixes bug #30250 ] handle "Unnamed Lists" here by setting their name to 2002-09-13 Chris Toshok [ Fixes bug #30250 ] * backend/ebook/e-destination.c (e_destination_get_name): handle "Unnamed Lists" here by setting their name to _("Unnamed List'). * backend/ebook/e-card-simple.c (e_card_simple_get): same. * gui/contact-list-editor/e-contact-list-editor.c (is_named): new function, return TRUE if the name field is filled in. (prompt_to_save_changes): return TRUE if the list isn't named (meaning it's not saveable.) (command_state_changed): saving requires a name. (add_email_cb): always call command_state_changed. (remove_entry_cb): same. (list_name_changed_cb): same. (visible_addrs_toggled_cb): same. (table_drag_data_received_cb): same. svn path=/trunk/; revision=18059 --- addressbook/backend/ebook/e-card-simple.c | 10 ++++++++-- addressbook/backend/ebook/e-destination.c | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'addressbook/backend/ebook') diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c index d6baddaadd..7f0dd263b4 100644 --- a/addressbook/backend/ebook/e-card-simple.c +++ b/addressbook/backend/ebook/e-card-simple.c @@ -831,6 +831,8 @@ char *e_card_simple_get (ECardSimple *simple, switch (field) { case E_CARD_SIMPLE_FIELD_NAME_OR_ORG: if (simple->card) { + gboolean is_list; + gtk_object_get(GTK_OBJECT(simple->card), "file_as", &string, NULL); @@ -846,8 +848,12 @@ char *e_card_simple_get (ECardSimple *simple, NULL); if (string && *string) return g_strdup(string); - string = e_card_simple_get_email(simple, - E_CARD_SIMPLE_EMAIL_ID_EMAIL); + is_list = e_card_evolution_list (simple->card); + if (is_list) + string = _("Unnamed List"); + else + string = e_card_simple_get_email(simple, + E_CARD_SIMPLE_EMAIL_ID_EMAIL); return g_strdup(string); } else return NULL; diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c index c83d908e9b..25932c29e6 100644 --- a/addressbook/backend/ebook/e-destination.c +++ b/addressbook/backend/ebook/e-destination.c @@ -702,7 +702,10 @@ e_destination_get_name (const EDestination *dest) if (priv->name == NULL || *priv->name == '\0') { g_free (priv->name); - priv->name = g_strdup (e_destination_get_email (dest)); + if (e_card_evolution_list (priv->card)) + priv->name = g_strdup (_("Unnamed List")); + else + priv->name = g_strdup (e_destination_get_email (dest)); } } else if (priv->raw != NULL) { CamelInternetAddress *addr = camel_internet_address_new (); -- cgit v1.2.3