aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog13
-rw-r--r--addressbook/backend/ebook/e-destination.c12
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c5
-rw-r--r--addressbook/printing/e-contact-print-envelope.c2
-rw-r--r--addressbook/printing/e-contact-print.c1
5 files changed, 32 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 879c6353aa..be0475a5aa 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,16 @@
+2001-03-29 Jon Trowbridge <trow@ximian.com>
+
+ * printing/e-contact-print.c: Added #include <libgnome/gnome-paper.h>
+
+ * printing/e-contact-print-envelope.c: Added #include <time.h>
+ and #include <libgnome/gnome-paper.h>
+
+ * gui/component/select-names/e-select-names-completion.c
+ (match_email): Better handle matching of "nameless" contacts.
+
+ * backend/ebook/e-destination.c (e_destination_get_string): Better
+ handle the case of a "nameless" contact.
+
2001-03-29 Kjartan Maraas <kmaraas@gnome.org>
* *.*: Clean up #includes. Replace <gnome.h>, <bonobo.h> and
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
index c652564442..3b7ad60189 100644
--- a/addressbook/backend/ebook/e-destination.c
+++ b/addressbook/backend/ebook/e-destination.c
@@ -206,7 +206,19 @@ e_destination_get_string (const EDestination *dest)
if (priv->card) {
priv->string = e_card_name_to_string (priv->card->name);
+ if (priv->string) {
+ g_strstrip (priv->string);
+ if (*(priv->string) == '\0') {
+ g_free (priv->string);
+ priv->string = NULL;
+ }
+ }
+
+ if (priv->string == NULL)
+ priv->string = g_strdup (e_destination_get_email (dest));
+ if (priv->string == NULL)
+ priv->string = g_strdup (_("???"));
}
}
diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c
index 17f4e0e790..88ab176bf6 100644
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ b/addressbook/gui/component/select-names/e-select-names-completion.c
@@ -139,7 +139,10 @@ match_email (ESelectNamesCompletion *comp, EDestination *dest, double *score)
gchar *name, *str;
*score = len * 2; /* 2 points for each matching character */
name = e_card_name_to_string (card->name);
- str = g_strdup_printf ("<%s> %s", email, name);
+ if (name && *name)
+ str = g_strdup_printf ("<%s> %s", email, name);
+ else
+ str = g_strdup (email);
g_free (name);
return str;
}
diff --git a/addressbook/printing/e-contact-print-envelope.c b/addressbook/printing/e-contact-print-envelope.c
index af6c92d638..43d40b81cb 100644
--- a/addressbook/printing/e-contact-print-envelope.c
+++ b/addressbook/printing/e-contact-print-envelope.c
@@ -20,6 +20,8 @@
* Boston, MA 02111-1307, USA.
*/
+#include <time.h>
+#include <libgnome/gnome-paper.h>
#include <libgnomeprint/gnome-print.h>
#include <libgnomeprint/gnome-print-dialog.h>
#include <libgnomeprint/gnome-print-master.h>
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 32333fcab1..ce0ec6db3f 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -29,6 +29,7 @@
#include <gnome-xml/xmlmemory.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-util.h>
+#include <libgnome/gnome-paper.h>
#include <libgnomeprint/gnome-print.h>
#include <libgnomeprint/gnome-print-dialog.h>
#include <libgnomeprint/gnome-print-master.h>