aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/message-list.c10
2 files changed, 17 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1abed9e751..4a00d12d68 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-15 Jeffrey Stedfast <fejj@ximian.com>
+
+ * message-list.c: Wrapped the address compare functions in a
+ #ifdef
+ (address_compare): #ifdef the use of the smart address sorting
+ code and provide a #else for using g_strcasecmp().
+
2001-02-14 Jeffrey Stedfast <fejj@ximian.com>
* openpgp-utils.c (openpgp_verify): Add the --no-tty flag.
diff --git a/mail/message-list.c b/mail/message-list.c
index 4be050774f..b8c85cf808 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -87,12 +87,14 @@
#define PARENT_TYPE (e_table_scrolled_get_type ())
+#ifdef SMART_ADDRESS_COMPARE
struct _EMailAddress {
ENameWestern *wname;
gchar *address;
};
typedef struct _EMailAddress EMailAddress;
+#endif /* SMART_ADDRESS_COMPARE */
static ETableScrolledClass *message_list_parent_class;
@@ -158,6 +160,7 @@ static GtkTargetEntry drag_types[] = {
};
static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]);
+#ifdef SMART_ADDRESS_SORT
static EMailAddress *
e_mail_address_new (const char *address)
{
@@ -251,21 +254,28 @@ e_mail_address_compare (gconstpointer address1, gconstpointer address2)
return retval;
}
+#endif /* SMART_ADDRESS_COMPARE */
static gint
address_compare (gconstpointer address1, gconstpointer address2)
{
+#ifdef SMART_ADDRESS_COMPARE
EMailAddress *addr1, *addr2;
+#endif /* SMART_ADDRESS_COMPARE */
gint retval;
g_return_val_if_fail (address1 != NULL, 1);
g_return_val_if_fail (address2 != NULL, -1);
+#ifdef SMART_ADDRESS_COMPARE
addr1 = e_mail_address_new (address1);
addr2 = e_mail_address_new (address2);
retval = e_mail_address_compare (addr1, addr2);
e_mail_address_free (addr1);
e_mail_address_free (addr2);
+#else
+ retval = g_strcasecmp ((const char *) address1, (const char *) address2);
+#endif /* SMART_ADDRESS_COMPARE */
return retval;
}