[evolution-patches] e-destination related patches for composer/mail



resending because I sent from my hungry.com address.

I'm going to split this into several mails, although the commit will
have to happen at once for all pieces.

This is the composer/mail changes needed for the new EDestination.  it's
mostly just reverting the naming changes I made a few months ago,
changing EABDestination to EDestination.

Chris
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.623
diff -u -r1.623 ChangeLog
--- ChangeLog	7 Apr 2004 18:29:10 -0000	1.623
+++ ChangeLog	7 Apr 2004 18:43:36 -0000
@@ -1,3 +1,40 @@
+2004-04-07  Chris Toshok  <toshok ximian com>
+
+	* e-msg-composer-hdrs.c (set_recipients_from_destv):
+	EABDestination -> EDestination.
+	(e_msg_composer_hdrs_to_message_internal): same.
+	(e_msg_composer_hdrs_set_to): same.
+	(e_msg_composer_hdrs_set_cc): same.
+	(e_msg_composer_hdrs_set_bcc): same.
+	(e_msg_composer_hdrs_get_to): same.
+	(e_msg_composer_hdrs_get_cc): same.
+	(e_msg_composer_hdrs_get_bcc): same.
+	(e_msg_composer_hdrs_get_recipients): same.
+
+	* e-msg-composer-hdrs.h: convert prototypes such that
+	EABDestination -> EDestination.
+
+	* e-msg-composer.h: convert prototypes such that EABDestination ->
+	EDestination.
+
+	* e-msg-composer.c (destination_list_to_vector_sized): new
+	function, ripped from EABDestination, as this code is the only
+	consumer.
+	(destination_list_to_vector): same.
+	(update_auto_recipients): EABDestination -> EDestination.
+	(e_msg_composer_new_with_message): same.
+	(add_recipients): same.
+	(handle_mailto): same.
+	(e_msg_composer_set_headers): same.
+	(e_msg_composer_get_recipients): same.
+	(e_msg_composer_get_to): same.
+	(e_msg_composer_get_cc): same.
+	(e_msg_composer_get_bcc): same.
+
+	* evolution-composer.c (corba_recipientlist_to_destv):
+	EABDestination -> EDestination.
+	(impl_Composer_set_headers): same.
+
 2004-04-07  Jeffrey Stedfast  <fejj ximian com>
 
 	* e-msg-composer.c (sig_select_item): Reversed the logic for
Index: e-msg-composer-hdrs.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-hdrs.c,v
retrieving revision 1.126
diff -u -r1.126 e-msg-composer-hdrs.c
--- e-msg-composer-hdrs.c	31 Mar 2004 10:08:03 -0000	1.126
+++ e-msg-composer-hdrs.c	7 Apr 2004 18:43:37 -0000
@@ -902,9 +902,9 @@
 
 static void
 set_recipients_from_destv (CamelMimeMessage *msg,
-			   EABDestination **to_destv,
-			   EABDestination **cc_destv,
-			   EABDestination **bcc_destv,
+			   EDestination **to_destv,
+			   EDestination **cc_destv,
+			   EDestination **bcc_destv,
 			   gboolean redirect)
 {
 	CamelInternetAddress *to_addr;
@@ -921,12 +921,12 @@
 	
 	if (to_destv) {
 		for (i = 0; to_destv[i] != NULL; ++i) {
-			text_addr = eab_destination_get_address (to_destv[i]);
+			text_addr = e_destination_get_address (to_destv[i]);
 			
 			if (text_addr && *text_addr) {
 				target = to_addr;
-				if (eab_destination_is_evolution_list (to_destv[i])
-				    && !eab_destination_list_show_addresses (to_destv[i])) {
+				if (e_destination_is_evolution_list (to_destv[i])
+				    && !e_destination_list_show_addresses (to_destv[i])) {
 					target = bcc_addr;
 					seen_hidden_list = TRUE;
 				}
@@ -938,11 +938,11 @@
 	
 	if (cc_destv) {
 		for (i = 0; cc_destv[i] != NULL; ++i) {
-			text_addr = eab_destination_get_address (cc_destv[i]);
+			text_addr = e_destination_get_address (cc_destv[i]);
 			if (text_addr && *text_addr) {
 				target = cc_addr;
-				if (eab_destination_is_evolution_list (cc_destv[i])
-				    && !eab_destination_list_show_addresses (cc_destv[i])) {
+				if (e_destination_is_evolution_list (cc_destv[i])
+				    && !e_destination_list_show_addresses (cc_destv[i])) {
 					target = bcc_addr;
 					seen_hidden_list = TRUE;
 				}
@@ -954,7 +954,7 @@
 	
 	if (bcc_destv) {
 		for (i = 0; bcc_destv[i] != NULL; ++i) {
-			text_addr = eab_destination_get_address (bcc_destv[i]);
+			text_addr = e_destination_get_address (bcc_destv[i]);
 			if (text_addr && *text_addr) {				
 				camel_address_decode (CAMEL_ADDRESS (bcc_addr), text_addr);
 			}
@@ -988,7 +988,7 @@
 					 CamelMimeMessage *msg,
 					 gboolean redirect)
 {
-	EABDestination **to_destv, **cc_destv, **bcc_destv;
+	EDestination **to_destv, **cc_destv, **bcc_destv;
 	CamelInternetAddress *addr;
 	const char *subject;
 	char *header;
@@ -1024,9 +1024,9 @@
 		
 		set_recipients_from_destv (msg, to_destv, cc_destv, bcc_destv, redirect);
 		
-		eab_destination_freev (to_destv);
-		eab_destination_freev (cc_destv);
-		eab_destination_freev (bcc_destv);
+		e_destination_freev (to_destv);
+		e_destination_freev (cc_destv);
+		e_destination_freev (bcc_destv);
 	}
 	
 #if 0
@@ -1123,26 +1123,26 @@
 
 void
 e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs,
-			    EABDestination **to_destv)
+			    EDestination **to_destv)
 {
 	char *str;
 	
 	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
 	
-	str = eab_destination_exportv (to_destv);
+	str = e_destination_exportv (to_destv);
 	bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", TC_CORBA_string, str ? str : "", NULL); 
 	g_free (str);
 }
 
 void
 e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
-			    EABDestination **cc_destv)
+			    EDestination **cc_destv)
 {
 	char *str;
 	
 	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
 	
-	str = eab_destination_exportv (cc_destv);
+	str = e_destination_exportv (cc_destv);
 	bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", TC_CORBA_string, str ? str :"", NULL);
 	if (str && *str)
 		set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
@@ -1151,13 +1151,13 @@
 
 void
 e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
-			     EABDestination **bcc_destv)
+			     EDestination **bcc_destv)
 {
 	char *str;
 	
 	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
 	
-	str = eab_destination_exportv (bcc_destv);
+	str = e_destination_exportv (bcc_destv);
 	bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", TC_CORBA_string, str ? str : "", NULL); 
 	if (str && *str)
 		set_pair_visibility (hdrs, &hdrs->priv->bcc, TRUE);
@@ -1356,67 +1356,67 @@
 	return addr;
 }
 
-EABDestination **
+EDestination **
 e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs)
 {
 	char *str = NULL;
-	EABDestination **destv = NULL;
+	EDestination **destv = NULL;
 	
 	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
 	
 	bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", TC_CORBA_string, &str, NULL); 
 	
 	if (str != NULL) {
-		destv = eab_destination_importv (str);
+		destv = e_destination_importv (str);
 		g_free (str);
 	}
 	
 	return destv;
 }
 
-EABDestination **
+EDestination **
 e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs)
 {
 	char *str = NULL;
-	EABDestination **destv = NULL;
+	EDestination **destv = NULL;
 	
 	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
 	
 	bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", TC_CORBA_string, &str, NULL); 
 	
 	if (str != NULL) {
-		destv = eab_destination_importv (str);
+		destv = e_destination_importv (str);
 		g_free (str);
 	}
 	
 	return destv;
 }
 
-EABDestination **
+EDestination **
 e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs)
 {
 	char *str = NULL;
-	EABDestination **destv = NULL;
+	EDestination **destv = NULL;
 	
 	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
 	
 	bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", TC_CORBA_string, &str, NULL); 
 	
 	if (str != NULL) {
-		destv = eab_destination_importv (str);
+		destv = e_destination_importv (str);
 		g_free (str);
 	}
 	
 	return destv;
 }
 
-EABDestination **
+EDestination **
 e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs)
 {
-	EABDestination **to_destv;
-	EABDestination **cc_destv;
-	EABDestination **bcc_destv;
-	EABDestination **recip_destv;
+	EDestination **to_destv;
+	EDestination **cc_destv;
+	EDestination **bcc_destv;
+	EDestination **recip_destv;
 	int i, j, n;
 	
 	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
@@ -1434,7 +1434,7 @@
 	if (n == 0)
 		return NULL;
 	
-	recip_destv = g_new (EABDestination *, n + 1);
+	recip_destv = g_new (EDestination *, n + 1);
 	
 	j = 0;
 	
Index: e-msg-composer-hdrs.h
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-hdrs.h,v
retrieving revision 1.31
diff -u -r1.31 e-msg-composer-hdrs.h
--- e-msg-composer-hdrs.h	12 Jan 2004 22:21:26 -0000	1.31
+++ e-msg-composer-hdrs.h	7 Apr 2004 18:43:37 -0000
@@ -31,7 +31,7 @@
 
 #include <e-util/e-account.h>
 #include <camel/camel-mime-message.h>
-#include <addressbook/util/eab-destination.h>
+#include <addressbook/util/e-destination.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -108,11 +108,11 @@
 void        e_msg_composer_hdrs_set_reply_to       (EMsgComposerHdrs *hdrs,
 						    const char *reply_to);
 void        e_msg_composer_hdrs_set_to             (EMsgComposerHdrs *hdrs,
-						    EABDestination    **to_destv);
+						    EDestination    **to_destv);
 void        e_msg_composer_hdrs_set_cc             (EMsgComposerHdrs *hdrs,
-						    EABDestination    **cc_destv);
+						    EDestination    **cc_destv);
 void        e_msg_composer_hdrs_set_bcc            (EMsgComposerHdrs *hdrs,
-						    EABDestination    **bcc_destv);
+						    EDestination    **bcc_destv);
 void        e_msg_composer_hdrs_set_post_to        (EMsgComposerHdrs *hdrs,
 						    const char       *post_to);
 void        e_msg_composer_hdrs_set_post_to_list   (EMsgComposerHdrs *hdrs,
@@ -126,10 +126,10 @@
 CamelInternetAddress *e_msg_composer_hdrs_get_from (EMsgComposerHdrs *hdrs);
 CamelInternetAddress *e_msg_composer_hdrs_get_reply_to (EMsgComposerHdrs *hdrs);
 
-EABDestination **e_msg_composer_hdrs_get_to         (EMsgComposerHdrs *hdrs);
-EABDestination **e_msg_composer_hdrs_get_cc         (EMsgComposerHdrs *hdrs);
-EABDestination **e_msg_composer_hdrs_get_bcc        (EMsgComposerHdrs *hdrs);
-EABDestination **e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs);
+EDestination **e_msg_composer_hdrs_get_to          (EMsgComposerHdrs *hdrs);
+EDestination **e_msg_composer_hdrs_get_cc          (EMsgComposerHdrs *hdrs);
+EDestination **e_msg_composer_hdrs_get_bcc         (EMsgComposerHdrs *hdrs);
+EDestination **e_msg_composer_hdrs_get_recipients  (EMsgComposerHdrs *hdrs);
 const char    *e_msg_composer_hdrs_get_subject     (EMsgComposerHdrs *hdrs);
 
 /* list of gchar* uris; this data is to be freed by the caller */
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.455
diff -u -r1.455 e-msg-composer.c
--- e-msg-composer.c	7 Apr 2004 18:29:10 -0000	1.455
+++ e-msg-composer.c	7 Apr 2004 18:43:39 -0000
@@ -178,6 +178,36 @@
 static void set_editor_signature (EMsgComposer *composer);
 
 
+static EDestination**
+destination_list_to_vector_sized (GList *list, int n)
+{
+	EDestination **destv;
+	int i = 0;
+	
+	if (n == -1)
+		n = g_list_length (list);
+	
+	if (n == 0)
+		return NULL;
+	
+	destv = g_new (EDestination *, n + 1);
+	while (list != NULL && i < n) {
+		destv[i] = E_DESTINATION (list->data);
+		list->data = NULL;
+		i++;
+		list = g_list_next (list);
+	}
+	destv[i] = NULL;
+	
+	return destv;
+}
+
+static EDestination**
+destination_list_to_vector (GList *list)
+{
+	return destination_list_to_vector_sized (list, -1);
+}
+
 static GByteArray *
 get_text (Bonobo_PersistStream persist, char *format)
 {
@@ -2389,7 +2419,7 @@
 static void
 update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs)
 {
-	EABDestination *dest, **destv = NULL;
+	EDestination *dest, **destv = NULL;
 	CamelInternetAddress *iaddr;
 	GList *list, *tail, *node;
 	int i, n = 0;
@@ -2405,14 +2435,14 @@
 				if (!camel_internet_address_get (iaddr, i, &name, &addr))
 					continue;
 				
-				dest = eab_destination_new ();
-				eab_destination_set_auto_recipient (dest, TRUE);
+				dest = e_destination_new ();
+				e_destination_set_auto_recipient (dest, TRUE);
 				
 				if (name)
-					eab_destination_set_name (dest, name);
+					e_destination_set_name (dest, name);
 				
 				if (addr)
-					eab_destination_set_email (dest, addr);
+					e_destination_set_email (dest, addr);
 				
 				node = g_list_alloc ();
 				node->data = dest;
@@ -2447,9 +2477,9 @@
 	
 	if (destv) {
 		for (i = 0; destv[i]; i++) {
-			if (!eab_destination_is_auto_recipient (destv[i])) {
+			if (!e_destination_is_auto_recipient (destv[i])) {
 				node = g_list_alloc ();
-				node->data = eab_destination_copy (destv[i]);
+				node->data = e_destination_copy (destv[i]);
 				node->next = NULL;
 				
 				if (tail) {
@@ -2465,10 +2495,10 @@
 			}
 		}
 		
-		eab_destination_freev (destv);
+		e_destination_freev (destv);
 	}
 	
-	destv = eab_destination_list_to_vector_sized (list, n);
+	destv = destination_list_to_vector_sized (list, n);
 	g_list_free (list);
 	
 	switch (mode) {
@@ -2482,7 +2512,7 @@
 		g_assert_not_reached ();
 	}
 	
-	eab_destination_freev (destv);
+	e_destination_freev (destv);
 }
 
 static void
@@ -3750,7 +3780,7 @@
 	const CamelInternetAddress *to, *cc, *bcc;
 	GList *To = NULL, *Cc = NULL, *Bcc = NULL;
 	const char *format, *subject, *postto;
-	EABDestination **Tov, **Ccv, **Bccv;
+	EDestination **Tov, **Ccv, **Bccv;
 	GHashTable *auto_cc, *auto_bcc;
 	CamelContentType *content_type;
 	struct _camel_header_raw *headers;
@@ -3827,13 +3857,13 @@
 			const char *name, *addr;
 			
 			if (camel_internet_address_get (to, i, &name, &addr)) {
-				EABDestination *dest = eab_destination_new ();
-				eab_destination_set_name (dest, name);
-				eab_destination_set_email (dest, addr);
+				EDestination *dest = e_destination_new ();
+				e_destination_set_name (dest, name);
+				e_destination_set_email (dest, addr);
 				To = g_list_append (To, dest);
 			}
 		}
-		Tov = eab_destination_list_to_vector (To);
+		Tov = destination_list_to_vector (To);
 		g_list_free (To);
 		
 		len = CAMEL_ADDRESS (cc)->addresses->len;
@@ -3841,18 +3871,18 @@
 			const char *name, *addr;
 			
 			if (camel_internet_address_get (cc, i, &name, &addr)) {
-				EABDestination *dest = eab_destination_new ();
-				eab_destination_set_name (dest, name);
-				eab_destination_set_email (dest, addr);
+				EDestination *dest = e_destination_new ();
+				e_destination_set_name (dest, name);
+				e_destination_set_email (dest, addr);
 				
 				if (g_hash_table_lookup (auto_cc, addr))
-					eab_destination_set_auto_recipient (dest, TRUE);
+					e_destination_set_auto_recipient (dest, TRUE);
 				
 				Cc = g_list_append (Cc, dest);
 			}
 		}
 		
-		Ccv = eab_destination_list_to_vector (Cc);
+		Ccv = destination_list_to_vector (Cc);
 		g_hash_table_foreach (auto_cc, auto_recip_free, NULL);
 		g_hash_table_destroy (auto_cc);
 		g_list_free (Cc);
@@ -3862,18 +3892,18 @@
 			const char *name, *addr;
 			
 			if (camel_internet_address_get (bcc, i, &name, &addr)) {
-				EABDestination *dest = eab_destination_new ();
-				eab_destination_set_name (dest, name);
-				eab_destination_set_email (dest, addr);
+				EDestination *dest = e_destination_new ();
+				e_destination_set_name (dest, name);
+				e_destination_set_email (dest, addr);
 				
 				if (g_hash_table_lookup (auto_bcc, addr))
-					eab_destination_set_auto_recipient (dest, TRUE);
+					e_destination_set_auto_recipient (dest, TRUE);
 				
 				Bcc = g_list_append (Bcc, dest);
 			}
 		}
 		
-		Bccv = eab_destination_list_to_vector (Bcc);
+		Bccv = destination_list_to_vector (Bcc);
 		g_hash_table_foreach (auto_bcc, auto_recip_free, NULL);
 		g_hash_table_destroy (auto_bcc);
 		g_list_free (Bcc);
@@ -3889,9 +3919,9 @@
 	
 	g_free (account_name);
 	
-	eab_destination_freev (Tov);
-	eab_destination_freev (Ccv);
-	eab_destination_freev (Bccv);
+	e_destination_freev (Tov);
+	e_destination_freev (Ccv);
+	e_destination_freev (Bccv);
 	
 	/* Restore the format editing preference */
 	format = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Format");
@@ -4031,9 +4061,9 @@
 	
 	for (i = 0; i < num; i++) {
 		if (camel_internet_address_get (cia, i, &name, &addr)) {
-			EABDestination *dest = eab_destination_new ();
-			eab_destination_set_name (dest, name);
-			eab_destination_set_email (dest, addr);
+			EDestination *dest = e_destination_new ();
+			e_destination_set_name (dest, name);
+			e_destination_set_email (dest, addr);
 			
 			list = g_list_append (list, dest);
 		}
@@ -4047,7 +4077,7 @@
 {
 	EMsgComposerHdrs *hdrs;
 	GList *to = NULL, *cc = NULL, *bcc = NULL;
-	EABDestination **tov, **ccv, **bccv;
+	EDestination **tov, **ccv, **bccv;
 	char *subject = NULL, *body = NULL;
 	char *header, *content, *buf;
 	size_t nread, nwritten;
@@ -4152,9 +4182,9 @@
 	
 	g_free (buf);
 	
-	tov  = eab_destination_list_to_vector (to);
-	ccv  = eab_destination_list_to_vector (cc);
-	bccv = eab_destination_list_to_vector (bcc);
+	tov  = destination_list_to_vector (to);
+	ccv  = destination_list_to_vector (cc);
+	bccv = destination_list_to_vector (bcc);
 	
 	g_list_free (to);
 	g_list_free (cc);
@@ -4166,9 +4196,9 @@
 	e_msg_composer_hdrs_set_cc (hdrs, ccv);
 	e_msg_composer_hdrs_set_bcc (hdrs, bccv);
 	
-	eab_destination_freev (tov);
-	eab_destination_freev (ccv);
-	eab_destination_freev (bccv);
+	e_destination_freev (tov);
+	e_destination_freev (ccv);
+	e_destination_freev (bccv);
 	
 	if (subject) {
 		e_msg_composer_hdrs_set_subject (hdrs, subject);
@@ -4241,9 +4271,9 @@
 void 
 e_msg_composer_set_headers (EMsgComposer *composer,
 			    const char *from,
-			    EABDestination **to,
-			    EABDestination **cc,
-			    EABDestination **bcc,
+			    EDestination **to,
+			    EDestination **cc,
+			    EDestination **bcc,
 			    const char *subject)
 {
 	EMsgComposerHdrs *hdrs;
@@ -5131,7 +5161,7 @@
 }
 
 
-EABDestination **
+EDestination **
 e_msg_composer_get_recipients (EMsgComposer *composer)
 {
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
@@ -5139,7 +5169,7 @@
 	return composer->hdrs ? e_msg_composer_hdrs_get_recipients (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
 }
 
-EABDestination **
+EDestination **
 e_msg_composer_get_to (EMsgComposer *composer)
 {
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
@@ -5147,7 +5177,7 @@
 	return composer->hdrs ? e_msg_composer_hdrs_get_to (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
 }
 
-EABDestination **
+EDestination **
 e_msg_composer_get_cc (EMsgComposer *composer)
 {
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
@@ -5155,7 +5185,7 @@
 	return composer->hdrs ? e_msg_composer_hdrs_get_cc (E_MSG_COMPOSER_HDRS (composer->hdrs)) : NULL;
 }
 
-EABDestination **
+EDestination **
 e_msg_composer_get_bcc (EMsgComposer *composer)
 {
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
Index: e-msg-composer.h
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.h,v
retrieving revision 1.89
diff -u -r1.89 e-msg-composer.h
--- e-msg-composer.h	1 Apr 2004 19:55:05 -0000	1.89
+++ e-msg-composer.h	7 Apr 2004 18:43:39 -0000
@@ -146,9 +146,9 @@
 									  gboolean           show);
 void                     e_msg_composer_set_headers                      (EMsgComposer      *composer,
 									  const char        *from,
-									  EABDestination     **to,
-									  EABDestination     **cc,
-									  EABDestination     **bcc,
+									  EDestination     **to,
+									  EDestination     **cc,
+									  EDestination     **bcc,
 									  const char        *subject);
 void                     e_msg_composer_set_body_text                    (EMsgComposer      *composer,
 									  const char        *text);
@@ -191,10 +191,10 @@
 void                     e_msg_composer_set_view_bcc                     (EMsgComposer      *composer,
 									  gboolean           view_bcc);
 
-EABDestination         **e_msg_composer_get_recipients                   (EMsgComposer *composer);
-EABDestination         **e_msg_composer_get_to                           (EMsgComposer *composer);
-EABDestination         **e_msg_composer_get_cc                           (EMsgComposer *composer);
-EABDestination         **e_msg_composer_get_bcc                          (EMsgComposer *composer);
+EDestination           **e_msg_composer_get_recipients                   (EMsgComposer *composer);
+EDestination           **e_msg_composer_get_to                           (EMsgComposer *composer);
+EDestination           **e_msg_composer_get_cc                           (EMsgComposer *composer);
+EDestination           **e_msg_composer_get_bcc                          (EMsgComposer *composer);
 const char              *e_msg_composer_get_subject                      (EMsgComposer *composer);
 
 EAccount                *e_msg_composer_get_preferred_account            (EMsgComposer      *composer);
Index: evolution-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/evolution-composer.c,v
retrieving revision 1.38
diff -u -r1.38 evolution-composer.c
--- evolution-composer.c	31 Mar 2004 10:08:03 -0000	1.38
+++ evolution-composer.c	7 Apr 2004 18:43:40 -0000
@@ -49,26 +49,26 @@
 };
 
 /* CORBA interface implementation.  */
-static EABDestination **
+static EDestination **
 corba_recipientlist_to_destv (const GNOME_Evolution_Composer_RecipientList *cl)
 {
 	GNOME_Evolution_Composer_Recipient *recip;
-	EABDestination **destv;
+	EDestination **destv;
 	int i;
 
 	if (cl->_length == 0)
 		return NULL;
 
-	destv = g_new (EABDestination *, cl->_length+1);
+	destv = g_new (EDestination *, cl->_length+1);
 
 	for (i = 0; i < cl->_length; ++i) {
 		recip = &(cl->_buffer[i]);
 
-		destv[i] = eab_destination_new ();
+		destv[i] = e_destination_new ();
 
 		if (*recip->name)
-			eab_destination_set_name (destv[i], recip->name);
-		eab_destination_set_email (destv[i], recip->address);
+			e_destination_set_name (destv[i], recip->name);
+		e_destination_set_email (destv[i], recip->address);
 		
 	}
 	destv[cl->_length] = NULL;
@@ -87,7 +87,7 @@
 {
 	BonoboObject *bonobo_object;
 	EvolutionComposer *composer;
-	EABDestination **tov, **ccv, **bccv;
+	EDestination **tov, **ccv, **bccv;
 	EAccountList *accounts;
 	EAccount *account;
 	EIterator *iter;
@@ -124,9 +124,9 @@
 	e_msg_composer_set_headers (composer->composer, account->name,
 				    tov, ccv, bccv, subject);
 	
-	eab_destination_freev (tov);
-	eab_destination_freev (ccv);
-	eab_destination_freev (bccv);
+	e_destination_freev (tov);
+	e_destination_freev (ccv);
+	e_destination_freev (bccv);
 }
 
 static void
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3211
diff -u -r1.3211 ChangeLog
--- ChangeLog	7 Apr 2004 14:38:14 -0000	1.3211
+++ ChangeLog	7 Apr 2004 18:11:14 -0000
@@ -1,3 +1,14 @@
+2004-04-07  Chris Toshok  <toshok ximian com>
+
+	* em-utils.c (em_utils_camel_address_to_destination):
+	EABDestination -> EDestination.
+	(reply_get_composer): same
+	(post_reply_to_message): same.
+
+	* em-composer-utils.c (ask_confirm_for_unwanted_html_mail):
+	EABDestination -> EDestination.
+	(composer_get_message): same.
+
 2004-04-07  Jeffrey Stedfast  <fejj ximian com>
 
 	* em-mailer-prefs.c (em_mailer_prefs_construct): Don't call a
Index: em-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-utils.c,v
retrieving revision 1.27
diff -u -r1.27 em-utils.c
--- em-utils.c	31 Mar 2004 10:09:04 -0000	1.27
+++ em-utils.c	7 Apr 2004 18:11:16 -0000
@@ -799,10 +799,10 @@
 	return account_hash;
 }
 
-static EABDestination **
+static EDestination **
 em_utils_camel_address_to_destination (CamelInternetAddress *iaddr)
 {
-	EABDestination *dest, **destv;
+	EDestination *dest, **destv;
 	int n, i, j;
 	
 	if (iaddr == NULL)
@@ -811,14 +811,14 @@
 	if ((n = camel_address_length ((CamelAddress *) iaddr)) == 0)
 		return NULL;
 	
-	destv = g_malloc (sizeof (EABDestination *) * (n + 1));
+	destv = g_malloc (sizeof (EDestination *) * (n + 1));
 	for (i = 0, j = 0; i < n; i++) {
 		const char *name, *addr;
 		
 		if (camel_internet_address_get (iaddr, i, &name, &addr)) {
-			dest = eab_destination_new ();
-			eab_destination_set_name (dest, name);
-			eab_destination_set_email (dest, addr);
+			dest = e_destination_new ();
+			e_destination_set_name (dest, name);
+			e_destination_set_email (dest, addr);
 			
 			destv[j++] = dest;
 		}
@@ -840,7 +840,7 @@
 		    CamelFolder *folder, const char *postto)
 {
 	const char *message_id, *references;
-	EABDestination **tov, **ccv;
+	EDestination **tov, **ccv;
 	EMsgComposer *composer;
 	char *subject;
 	
@@ -1281,7 +1281,7 @@
 	/* FIXME: would be nice if this shared more code with reply_get_composer() */
 	const char *message_id, *references;
 	CamelInternetAddress *to = NULL;
-	EABDestination **tov = NULL;
+	EDestination **tov = NULL;
 	EMsgComposer *composer;
 	char *subject, *url;
 	EAccount *account;
Index: em-composer-utils.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-composer-utils.c,v
retrieving revision 1.8
diff -u -r1.8 em-composer-utils.c
--- em-composer-utils.c	29 Jan 2004 06:26:30 -0000	1.8
+++ em-composer-utils.c	7 Apr 2004 18:11:16 -0000
@@ -102,7 +102,7 @@
 }
 
 static gboolean
-ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EABDestination **recipients)
+ask_confirm_for_unwanted_html_mail (EMsgComposer *composer, EDestination **recipients)
 {
 	gboolean res;
 	GString *str;
@@ -110,10 +110,10 @@
 	
 	str = g_string_new("");
 	for (i = 0; recipients[i] != NULL; ++i) {
-		if (!eab_destination_get_html_mail_pref (recipients[i])) {
+		if (!e_destination_get_html_mail_pref (recipients[i])) {
 			const char *name;
 			
-			name = eab_destination_get_textrep (recipients[i], FALSE);
+			name = e_destination_get_textrep (recipients[i], FALSE);
 			
 			g_string_append_printf (str, "     %s\n", name);
 		}
@@ -234,7 +234,7 @@
 composer_get_message (EMsgComposer *composer, gboolean post, gboolean save_html_object_data, gboolean *no_recipients)
 {
 	CamelMimeMessage *message = NULL;
-	EABDestination **recipients, **recipients_bcc;
+	EDestination **recipients, **recipients_bcc;
 	gboolean send_html, confirm_html;
 	CamelInternetAddress *cia;
 	int hidden = 0, shown = 0;
@@ -258,15 +258,15 @@
 	/* see which ones are visible/present, etc */
 	if (recipients) {
 		for (i = 0; recipients[i] != NULL; i++) {
-			const char *addr = eab_destination_get_address (recipients[i]);
+			const char *addr = e_destination_get_address (recipients[i]);
 			
 			if (addr && addr[0]) {
 				camel_address_decode ((CamelAddress *) cia, addr);
 				if (camel_address_length ((CamelAddress *) cia) > 0) {
 					camel_address_remove ((CamelAddress *) cia, -1);
 					num++;
-					if (eab_destination_is_evolution_list (recipients[i])
-					    && !eab_destination_list_show_addresses (recipients[i])) {
+					if (e_destination_is_evolution_list (recipients[i])
+					    && !e_destination_list_show_addresses (recipients[i])) {
 						hidden++;
 					} else {
 						shown++;
@@ -279,7 +279,7 @@
 	recipients_bcc = e_msg_composer_get_bcc (composer);
 	if (recipients_bcc) {
 		for (i = 0; recipients_bcc[i] != NULL; i++) {
-			const char *addr = eab_destination_get_address (recipients_bcc[i]);
+			const char *addr = e_destination_get_address (recipients_bcc[i]);
 			
 			if (addr && addr[0]) {
 				camel_address_decode ((CamelAddress *) cia, addr);
@@ -290,7 +290,7 @@
 			}
 		}
 		
-		eab_destination_freev (recipients_bcc);
+		e_destination_freev (recipients_bcc);
 	}
 	
 	camel_object_unref (cia);
@@ -324,7 +324,7 @@
 		
 		if (recipients) {
 			for (i = 0; recipients[i] != NULL && !html_problem; i++) {
-				if (!eab_destination_get_html_mail_pref (recipients[i]))
+				if (!e_destination_get_html_mail_pref (recipients[i]))
 					html_problem = TRUE;
 			}
 		}
@@ -364,14 +364,10 @@
 		}
 	}
 	
-	/* Get the message recipients and 'touch' them, boosting their use scores */
-	if (recipients)
-		eab_destination_touchv (recipients);
-	
  finished:
 	
 	if (recipients)
-		eab_destination_freev (recipients);
+		e_destination_freev (recipients);
 	
 	return message;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]