aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-02-16 00:33:46 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-02-16 00:33:46 +0800
commit1e18d9fb96e4f893b8f5a768af9ab0579208274d (patch)
treeab20455b123c4e1459ff5938ed6bd5ed0525daed /mail
parent1be84b82e48957805d1278472def482444c48b70 (diff)
downloadgsoc2013-evolution-1e18d9fb96e4f893b8f5a768af9ab0579208274d.tar
gsoc2013-evolution-1e18d9fb96e4f893b8f5a768af9ab0579208274d.tar.gz
gsoc2013-evolution-1e18d9fb96e4f893b8f5a768af9ab0579208274d.tar.bz2
gsoc2013-evolution-1e18d9fb96e4f893b8f5a768af9ab0579208274d.tar.lz
gsoc2013-evolution-1e18d9fb96e4f893b8f5a768af9ab0579208274d.tar.xz
gsoc2013-evolution-1e18d9fb96e4f893b8f5a768af9ab0579208274d.tar.zst
gsoc2013-evolution-1e18d9fb96e4f893b8f5a768af9ab0579208274d.zip
Wrapped the address compare functions in a #ifdef (address_compare):
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(). svn path=/trunk/; revision=8242
Diffstat (limited to 'mail')
-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;
}