Added fallbacks for the name in the case of an e-card, to avoid the
2001-07-24 Jon Trowbridge <trow@ximian.com> * backend/ebook/e-destination.c (e_destination_get_name): Added fallbacks for the name in the case of an e-card, to avoid the "nameless contact" bug. svn path=/trunk/; revision=11358
This commit is contained in:
committed by
Jon Trowbridge
parent
1dc80dc379
commit
3c53644cb5
@ -1,3 +1,9 @@
|
||||
2001-07-24 Jon Trowbridge <trow@ximian.com>
|
||||
|
||||
* backend/ebook/e-destination.c (e_destination_get_name): Added
|
||||
fallbacks for the name in the case of an e-card, to avoid the
|
||||
"nameless contact" bug.
|
||||
|
||||
2001-07-24 Chris Toshok <toshok@ximian.com>
|
||||
|
||||
* gui/widgets/e-minicard.c (remodel): need the EDestination magic
|
||||
|
||||
@ -394,8 +394,20 @@ e_destination_get_name (const EDestination *dest)
|
||||
|
||||
priv = (struct _EDestinationPrivate *)dest->priv; /* cast out const */
|
||||
|
||||
if (priv->name == NULL && priv->card != NULL)
|
||||
if (priv->name == NULL && priv->card != NULL) {
|
||||
|
||||
priv->name = e_card_name_to_string (priv->card->name);
|
||||
|
||||
if (priv->name == NULL || *priv->name == '\0') {
|
||||
g_free (priv->name);
|
||||
priv->name = g_strdup (priv->card->file_as);
|
||||
}
|
||||
|
||||
if (priv->name == NULL || *priv->name == '\0') {
|
||||
g_free (priv->name);
|
||||
priv->name = e_destination_get_email (dest);
|
||||
}
|
||||
}
|
||||
|
||||
return priv->name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user