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:
Jon Trowbridge
2001-07-24 21:52:36 +00:00
committed by Jon Trowbridge
parent 1dc80dc379
commit 3c53644cb5
2 changed files with 19 additions and 1 deletions

View File

@ -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

View File

@ -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;