aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-07-25 05:52:36 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-07-25 05:52:36 +0800
commit3c53644cb5136198ea77491ea31b35bd070e70da (patch)
tree0cb0f0c11da7aa49a547aa8e5cd0dd6f69efe804 /addressbook
parent1dc80dc3791eb57f9947a03a34d1e92950ee88d7 (diff)
downloadgsoc2013-evolution-3c53644cb5136198ea77491ea31b35bd070e70da.tar
gsoc2013-evolution-3c53644cb5136198ea77491ea31b35bd070e70da.tar.gz
gsoc2013-evolution-3c53644cb5136198ea77491ea31b35bd070e70da.tar.bz2
gsoc2013-evolution-3c53644cb5136198ea77491ea31b35bd070e70da.tar.lz
gsoc2013-evolution-3c53644cb5136198ea77491ea31b35bd070e70da.tar.xz
gsoc2013-evolution-3c53644cb5136198ea77491ea31b35bd070e70da.tar.zst
gsoc2013-evolution-3c53644cb5136198ea77491ea31b35bd070e70da.zip
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
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/backend/ebook/e-destination.c14
2 files changed, 19 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index fa20d8800a..3c09a74880 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -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
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
index f470769a2e..e836922ba3 100644
--- a/addressbook/backend/ebook/e-destination.c
+++ b/addressbook/backend/ebook/e-destination.c
@@ -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;