diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-05-12 04:28:27 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-05-12 04:28:27 +0800 |
commit | 10387f75191a34848c5b4657aa1ba0efdc167ce3 (patch) | |
tree | 189fef0d1bbcd8d26d9b9b4eeea6dde29548fcf4 /addressbook/backend/ebook | |
parent | 8b6b6f01bf60cb59124f513f4b3c7c78db46233e (diff) | |
download | gsoc2013-evolution-10387f75191a34848c5b4657aa1ba0efdc167ce3.tar gsoc2013-evolution-10387f75191a34848c5b4657aa1ba0efdc167ce3.tar.gz gsoc2013-evolution-10387f75191a34848c5b4657aa1ba0efdc167ce3.tar.bz2 gsoc2013-evolution-10387f75191a34848c5b4657aa1ba0efdc167ce3.tar.lz gsoc2013-evolution-10387f75191a34848c5b4657aa1ba0efdc167ce3.tar.xz gsoc2013-evolution-10387f75191a34848c5b4657aa1ba0efdc167ce3.tar.zst gsoc2013-evolution-10387f75191a34848c5b4657aa1ba0efdc167ce3.zip |
If the name is set and the full_name or file_as haven't been yet, set
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.
svn path=/trunk/; revision=9770
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 18 |
1 files changed, 18 insertions, 0 deletions
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) |