diff options
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 8959f321cd..09103948ad 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,10 @@ 2001-05-11 Christopher James Lahey <clahey@ximian.com> + * backend/ebook/e-card.c (e_card_set_arg): If the name is set and + the full_name or file_as haven't been yet, set them. + +2001-05-11 Christopher James Lahey <clahey@ximian.com> + * backend/pas/pas-backend-file.c: Reordered the includes here. (string_to_dbt): The sleepycat libdb documentation suggests memseting the DBT to 0 so we do that here. diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index eb239ccd76..3845ac8227 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -1653,6 +1653,24 @@ e_card_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) if ( card->name ) e_card_name_free(card->name); card->name = e_card_name_copy(GTK_VALUE_POINTER(*arg)); + if (card->name == NULL) + card->name = e_card_name_new(); + if (card->fname == NULL) { + card->fname = e_card_name_to_string(card->name); + } + if (card->file_as == NULL) { + ECardName *name = card->name; + char *strings[3], **stringptr; + char *string; + stringptr = strings; + if (name->family && *name->family) + *(stringptr++) = name->family; + if (name->given && *name->given) + *(stringptr++) = name->given; + *stringptr = NULL; + string = g_strjoinv(", ", strings); + card->file_as = string; + } break; case ARG_CATEGORIES: if (card->categories) |