evolution r34876 - in branches/mbarnes-composer: composer mail plugins/exchange-operations plugins/mailing-list-actions widgets/misc



Author: mbarnes
Date: Thu Jan 24 05:59:44 2008
New Revision: 34876
URL: http://svn.gnome.org/viewvc/evolution?rev=34876&view=rev

Log:
Committing some work-in-progress so I can merge in the libsoup changes.


Modified:
   branches/mbarnes-composer/composer/Makefile.am
   branches/mbarnes-composer/composer/e-composer-from-header.c
   branches/mbarnes-composer/composer/e-composer-from-header.h
   branches/mbarnes-composer/composer/e-composer-name-header.c
   branches/mbarnes-composer/composer/e-msg-composer-hdrs.c
   branches/mbarnes-composer/composer/e-msg-composer-hdrs.h
   branches/mbarnes-composer/composer/e-msg-composer.c
   branches/mbarnes-composer/composer/e-msg-composer.h
   branches/mbarnes-composer/mail/em-composer-utils.c
   branches/mbarnes-composer/plugins/exchange-operations/exchange-mail-send-options.c
   branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c
   branches/mbarnes-composer/widgets/misc/e-account-combo-box.c
   branches/mbarnes-composer/widgets/misc/e-account-combo-box.h
   branches/mbarnes-composer/widgets/misc/e-signature-combo-box.c
   branches/mbarnes-composer/widgets/misc/e-signature-combo-box.h

Modified: branches/mbarnes-composer/composer/Makefile.am
==============================================================================
--- branches/mbarnes-composer/composer/Makefile.am	(original)
+++ branches/mbarnes-composer/composer/Makefile.am	Thu Jan 24 05:59:44 2008
@@ -61,6 +61,8 @@
 	e-composer-common.h			\
 	e-composer-header.c			\
 	e-composer-header.h			\
+	e-composer-header-table.c		\
+	e-composer-header-table.h		\
 	e-composer-from-header.c		\
 	e-composer-from_header.h		\
 	e-composer-name-header.c		\

Modified: branches/mbarnes-composer/composer/e-composer-from-header.c
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-from-header.c	(original)
+++ branches/mbarnes-composer/composer/e-composer-from-header.c	Thu Jan 24 05:59:44 2008
@@ -28,6 +28,9 @@
 	g_signal_connect (
 		widget, "changed",
 		G_CALLBACK (composer_from_header_changed_cb), header);
+	g_signal_connect (
+		widget, "refreshed",
+		G_CALLBACK (composer_from_header_changed_cb), header);
 	E_COMPOSER_HEADER (header)->input_widget = widget;
 	gtk_widget_show (widget);
 }
@@ -67,6 +70,17 @@
 		"button", FALSE, NULL);
 }
 
+EAccountList *
+e_composer_from_header_get_account_list (EComposerFromHeader *header)
+{
+	EAccountComboBox *combo_box;
+
+	g_return_if_fail (E_IS_COMPOSER_FROM_HEADER (header));
+
+	combo_box = E_COMPOSER_FROM_HEADER_GET_COMBO_BOX (header);
+	return e_account_combo_box_get_account_list (combo_box);
+}
+
 void
 e_composer_from_header_set_account_list (EComposerFromHeader *header,
                                          EAccountList *account_list)
@@ -124,22 +138,3 @@
 	combo_box = E_COMPOSER_FROM_HEADER_GET_COMBO_BOX (header);
 	return e_account_combo_box_set_active_name (combo_box, account_name);
 }
-
-CamelInternetAddress *
-e_composer_from_header_get_active_address (EComposerFromHeader *header)
-{
-	CamelInternetAddress *address;
-	EAccount *account;
-
-	g_return_val_if_fail (E_IS_COMPOSER_FROM_HEADER (header), NULL);
-
-	account = e_composer_from_header_get_active (header);
-	if (account == NULL)
-		return NULL;
-
-	address = camel_internet_address_new ();
-	camel_internet_address_add (
-		address, account->id->name, account->id->address);
-
-	return address;
-}

Modified: branches/mbarnes-composer/composer/e-composer-from-header.h
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-from-header.h	(original)
+++ branches/mbarnes-composer/composer/e-composer-from-header.h	Thu Jan 24 05:59:44 2008
@@ -5,7 +5,6 @@
 
 #include <libedataserver/e-account.h>
 #include <libedataserver/e-account-list.h>
-#include <camel/camel-internet-address.h>
 
 #include "e-account-combo-box.h"
 #include "e-composer-header.h"
@@ -44,6 +43,8 @@
 
 GType		e_composer_from_header_get_type	(void);
 EComposerHeader * e_composer_from_header_new	(const gchar *label);
+EAccountList *	e_composer_from_header_get_account_list
+						(EComposerFromHeader *header);
 void		e_composer_from_header_set_account_list
 						(EComposerFromHeader *header,
 						 EAccountList *account_list);
@@ -57,8 +58,6 @@
 gboolean	e_composer_from_header_set_active_name
 						(EComposerFromHeader *header,
 						 const gchar *account_name);
-CamelInternetAddress * e_composer_from_header_get_active_address
-						(EComposerFromHeader *header);
 
 G_END_DECLS
 

Modified: branches/mbarnes-composer/composer/e-composer-name-header.c
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-name-header.c	(original)
+++ branches/mbarnes-composer/composer/e-composer-name-header.c	Thu Jan 24 05:59:44 2008
@@ -271,7 +271,7 @@
 
 	g_list_free (list);
 
-	return destinations;
+	return destinations;  /* free with e_destination_freev() */
 }
 
 void

Modified: branches/mbarnes-composer/composer/e-msg-composer-hdrs.c
==============================================================================
--- branches/mbarnes-composer/composer/e-msg-composer-hdrs.c	(original)
+++ branches/mbarnes-composer/composer/e-msg-composer-hdrs.c	Thu Jan 24 05:59:44 2008
@@ -80,7 +80,6 @@
 	BonoboUIComponent *uic;
 
 	EComposerHeader *headers[NUM_HEADERS];
-	GtkWidget *signature_combo_box;
 };
 
 static gpointer parent_class;
@@ -591,117 +590,6 @@
 	e_msg_composer_hdrs_to_message_internal (hdrs, msg, TRUE);
 }
 
-EAccount *
-e_msg_composer_hdrs_get_from_account (EMsgComposerHdrs *hdrs)
-{
-	EComposerFromHeader *header;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	header = E_COMPOSER_FROM_HEADER (hdrs->priv->headers[HEADER_FROM]);
-	return e_composer_from_header_get_active (header);
-}
-
-gboolean
-e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
-				      const gchar *account_name)
-{
-	EComposerFromHeader *header;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), FALSE);
-
-	header = E_COMPOSER_FROM_HEADER (hdrs->priv->headers[HEADER_FROM]);
-	return e_composer_from_header_set_active_name (header, account_name);
-}
-
-ESignature *
-e_msg_composer_hdrs_get_signature (EMsgComposerHdrs *hdrs)
-{
-	ESignatureComboBox *combo_box;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	combo_box = E_SIGNATURE_COMBO_BOX (hdrs->priv->signature_combo_box);
-	return e_signature_combo_box_get_active (combo_box);
-}
-
-gboolean
-e_msg_composer_hdrs_set_signature (EMsgComposerHdrs *hdrs,
-                                   ESignature *signature)
-{
-	ESignatureComboBox *combo_box;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), FALSE);
-
-	combo_box = E_SIGNATURE_COMBO_BOX (hdrs->priv->signature_combo_box);
-	return e_signature_combo_box_set_active (combo_box, signature);
-}
-
-void
-e_msg_composer_hdrs_set_reply_to (EMsgComposerHdrs *hdrs,
-				  const gchar *text)
-{
-	EComposerHeader *header;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
-	header = hdrs->priv->headers[HEADER_REPLY_TO];
-
-	e_composer_text_header_set_text (
-		E_COMPOSER_TEXT_HEADER (header), text);
-
-	if (*text != '\0')
-		e_composer_header_set_visible (header, TRUE);
-}
-
-void
-e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs,
-			    EDestination **to_destv)
-{
-	EComposerHeader *header;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
-	header = hdrs->priv->headers[HEADER_TO];
-
-	e_composer_name_header_set_destinations (
-		E_COMPOSER_NAME_HEADER (header), to_destv);
-}
-
-void
-e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
-			    EDestination **cc_destv)
-{
-	EComposerHeader *header;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
-	header = hdrs->priv->headers[HEADER_CC];
-
-	e_composer_name_header_set_destinations (
-		E_COMPOSER_NAME_HEADER (header), cc_destv);
-
-	if (cc_destv != NULL && *cc_destv != NULL)
-		e_composer_header_set_visible (header, TRUE);
-}
-
-void
-e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
-			     EDestination **bcc_destv)
-{
-	EComposerHeader *header;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-
-	header = hdrs->priv->headers[HEADER_BCC];
-
-	e_composer_name_header_set_destinations (
-		E_COMPOSER_NAME_HEADER (header), bcc_destv);
-
-	if (bcc_destv != NULL && *bcc_destv != NULL)
-		e_composer_header_set_visible (header, TRUE);
-}
-
 void
 e_msg_composer_hdrs_set_post_to (EMsgComposerHdrs *hdrs,
 				 const char *post_to)
@@ -747,142 +635,6 @@
 		E_COMPOSER_POST_HEADER (header), base, post_to);
 }
 
-void
-e_msg_composer_hdrs_set_subject (EMsgComposerHdrs *hdrs,
-				 const gchar *subject)
-{
-	EComposerHeader *header;
-
-	g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
-	g_return_if_fail (subject != NULL);
-
-	header = hdrs->priv->headers[HEADER_SUBJECT];
-
-	e_composer_text_header_set_text (
-		E_COMPOSER_TEXT_HEADER (header), subject);
-}
-
-
-CamelInternetAddress *
-e_msg_composer_hdrs_get_from (EMsgComposerHdrs *hdrs)
-{
-	EComposerHeader *header;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	header = hdrs->priv->headers[HEADER_FROM];
-
-	return e_composer_from_header_get_active_address (
-		E_COMPOSER_FROM_HEADER (header));
-}
-
-CamelInternetAddress *
-e_msg_composer_hdrs_get_reply_to (EMsgComposerHdrs *hdrs)
-{
-	CamelInternetAddress *addr;
-	EComposerHeader *header;
-	const gchar *text;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	header = hdrs->priv->headers[HEADER_REPLY_TO];
-
-	text = e_composer_text_header_get_text (
-		E_COMPOSER_TEXT_HEADER (header));
-
-	if (text == NULL || *text == '\0')
-		return NULL;
-
-	addr = camel_internet_address_new ();
-	if (camel_address_unformat (CAMEL_ADDRESS (addr), text) == -1) {
-		camel_object_unref (CAMEL_OBJECT (addr));
-		return NULL;
-	}
-
-	return addr;
-}
-
-EDestination **
-e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs)
-{
-	EComposerNameHeader *header;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	header = E_COMPOSER_NAME_HEADER (hdrs->priv->headers[HEADER_TO]);
-	return e_composer_name_header_get_destinations (header);
-}
-
-EDestination **
-e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs)
-{
-	EComposerNameHeader *header;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	header = E_COMPOSER_NAME_HEADER (hdrs->priv->headers[HEADER_CC]);
-	return e_composer_name_header_get_destinations (header);
-}
-
-EDestination **
-e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs)
-{
-	EComposerNameHeader *header;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	header = E_COMPOSER_NAME_HEADER (hdrs->priv->headers[HEADER_BCC]);
-	return e_composer_name_header_get_destinations (header);
-}
-
-EDestination **
-e_msg_composer_hdrs_get_recipients (EMsgComposerHdrs *hdrs)
-{
-	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);
-
-	to_destv  = e_msg_composer_hdrs_get_to (hdrs);
-	cc_destv  = e_msg_composer_hdrs_get_cc (hdrs);
-	bcc_destv = e_msg_composer_hdrs_get_bcc (hdrs);
-
-	n = 0;
-
-	for (i = 0; to_destv && to_destv[i] != NULL; i++, n++);
-	for (i = 0; cc_destv && cc_destv[i] != NULL; i++, n++);
-	for (i = 0; bcc_destv && bcc_destv[i] != NULL; i++, n++);
-
-	if (n == 0)
-		return NULL;
-
-	recip_destv = g_new (EDestination *, n + 1);
-
-	j = 0;
-
-	for (i = 0; to_destv && to_destv[i] != NULL; i++, j++)
-		recip_destv[j] = to_destv[i];
-	for (i = 0; cc_destv && cc_destv[i] != NULL; i++, j++)
-		recip_destv[j] = cc_destv[i];
-	for (i = 0; bcc_destv && bcc_destv[i] != NULL; i++, j++)
-		recip_destv[j] = bcc_destv[i];
-
-	if (j != n) {
-		g_warning ("j!=n \n");
-	}
-	recip_destv[j] = NULL;
-
-	g_free (to_destv);
-	g_free (cc_destv);
-	g_free (bcc_destv);
-
-	return recip_destv;
-}
-
-
 GList *
 e_msg_composer_hdrs_get_post_to (EMsgComposerHdrs *hdrs)
 {
@@ -895,73 +647,3 @@
 	return e_composer_post_header_get_folders (
 		E_COMPOSER_POST_HEADER (header));
 }
-
-
-const gchar *
-e_msg_composer_hdrs_get_subject (EMsgComposerHdrs *hdrs)
-{
-	GtkWidget *widget;
-
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	widget = e_msg_composer_hdrs_get_subject_entry (hdrs);
-
-	return gtk_entry_get_text (GTK_ENTRY (widget));
-}
-
-
-GtkWidget *
-e_msg_composer_hdrs_get_reply_to_entry (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return hdrs->priv->headers[HEADER_REPLY_TO]->input_widget;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_to_entry (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return hdrs->priv->headers[HEADER_TO]->input_widget;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_cc_entry (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return hdrs->priv->headers[HEADER_CC]->input_widget;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_bcc_entry (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return hdrs->priv->headers[HEADER_BCC]->input_widget;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_post_to_label (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return hdrs->priv->headers[HEADER_POST_TO]->input_widget;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_subject_entry (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return hdrs->priv->headers[HEADER_SUBJECT]->input_widget;
-}
-
-GtkWidget *
-e_msg_composer_hdrs_get_from_hbox (EMsgComposerHdrs *hdrs)
-{
-	g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
-
-	return hdrs->priv->headers[HEADER_FROM]->input_widget;
-}

Modified: branches/mbarnes-composer/composer/e-msg-composer-hdrs.h
==============================================================================
--- branches/mbarnes-composer/composer/e-msg-composer-hdrs.h	(original)
+++ branches/mbarnes-composer/composer/e-msg-composer-hdrs.h	Thu Jan 24 05:59:44 2008
@@ -116,20 +116,6 @@
 						    CamelMimeMessage *msg);
 
 
-EAccount *  e_msg_composer_hdrs_get_from_account   (EMsgComposerHdrs *hdrs);
-gboolean    e_msg_composer_hdrs_set_from_account   (EMsgComposerHdrs *hdrs,
-						    const char *account_name);
-ESignature *e_msg_composer_hdrs_get_signature      (EMsgComposerHdrs *hdrs);
-gboolean    e_msg_composer_hdrs_set_signature      (EMsgComposerHdrs *hdrs,
-						    ESignature *signature);
-void        e_msg_composer_hdrs_set_reply_to       (EMsgComposerHdrs *hdrs,
-						    const char *reply_to);
-void        e_msg_composer_hdrs_set_to             (EMsgComposerHdrs *hdrs,
-						    EDestination    **to_destv);
-void        e_msg_composer_hdrs_set_cc             (EMsgComposerHdrs *hdrs,
-						    EDestination    **cc_destv);
-void        e_msg_composer_hdrs_set_bcc            (EMsgComposerHdrs *hdrs,
-						    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,
@@ -137,29 +123,10 @@
 void        e_msg_composer_hdrs_set_post_to_base   (EMsgComposerHdrs *hdrs,
 					            const gchar      *base,
 						    const gchar      *post_to);
-void        e_msg_composer_hdrs_set_subject        (EMsgComposerHdrs *hdrs,
-						    const char       *subject);
-
-CamelInternetAddress *e_msg_composer_hdrs_get_from (EMsgComposerHdrs *hdrs);
-CamelInternetAddress *e_msg_composer_hdrs_get_reply_to (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 */
 GList         *e_msg_composer_hdrs_get_post_to     (EMsgComposerHdrs *hdrs);
 
-GtkWidget  *e_msg_composer_hdrs_get_from_hbox      (EMsgComposerHdrs *hdrs);
-GtkWidget  *e_msg_composer_hdrs_get_reply_to_entry (EMsgComposerHdrs *hdrs);
-GtkWidget  *e_msg_composer_hdrs_get_to_entry       (EMsgComposerHdrs *hdrs);
-GtkWidget  *e_msg_composer_hdrs_get_cc_entry       (EMsgComposerHdrs *hdrs);
-GtkWidget  *e_msg_composer_hdrs_get_bcc_entry      (EMsgComposerHdrs *hdrs);
-GtkWidget  *e_msg_composer_hdrs_get_post_to_label  (EMsgComposerHdrs *hdrs);
-GtkWidget  *e_msg_composer_hdrs_get_subject_entry  (EMsgComposerHdrs *hdrs);
-
 void        e_msg_composer_hdrs_set_visible_mask   (EMsgComposerHdrs *hdrs,
 						    int visible_mask);
 void        e_msg_composer_hdrs_set_visible        (EMsgComposerHdrs *hdrs,

Modified: branches/mbarnes-composer/composer/e-msg-composer.c
==============================================================================
--- branches/mbarnes-composer/composer/e-msg-composer.c	(original)
+++ branches/mbarnes-composer/composer/e-msg-composer.c	Thu Jan 24 05:59:44 2008
@@ -159,6 +159,7 @@
 	/* UIComponent for the non-control GtkEntries */
 	BonoboUIComponent *entry_uic;
 
+	GtkWidget *header_table;
 	GtkWidget *hdrs;
 	GPtrArray *extra_hdr_names, *extra_hdr_values;
 
@@ -502,6 +503,7 @@
 
 	EAttachmentBar *attachment_bar =
 		E_ATTACHMENT_BAR (p->attachment_bar);
+	EComposerHeaderTable *table;
 	EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (p->hdrs);
 	CamelDataWrapper *plain, *html, *current;
 	CamelTransferEncoding plain_encoding;
@@ -518,7 +520,8 @@
 	char *charset;
 	int i;
 
-	account = e_msg_composer_hdrs_get_from_account (hdrs);
+	table = E_COMPOSER_HEADER_TABLE (p->header_table);
+	account = e_composer_header_table_get_account (table);
 
 	if (p->persist_stream_interface == CORBA_OBJECT_NIL)
 		return NULL;
@@ -745,12 +748,12 @@
 			camel_mime_part_set_encoding (part, plain_encoding);
 		camel_object_unref (current);
 
-		account = e_msg_composer_hdrs_get_from_account (hdrs);
+		account = e_composer_header_table_get_account (table);
 
 		if (account && account->pgp_key && *account->pgp_key) {
 			pgp_userid = account->pgp_key;
 		} else {
-			from = e_msg_composer_hdrs_get_from(hdrs);
+			from = e_msg_composer_get_from (composer);
 			camel_internet_address_get(from, 0, NULL, &pgp_userid);
 		}
 
@@ -1162,13 +1165,13 @@
 static char *
 get_signature_html (EMsgComposer *composer)
 {
-	EMsgComposerHdrs *hdrs;
+	EComposerHeaderTable *table;
 	char *text = NULL, *html = NULL;
 	ESignature *signature;
 	gboolean format_html;
 
-	hdrs = E_MSG_COMPOSER_HDRS (composer->priv->hdrs);
-	signature = e_msg_composer_hdrs_get_signature (hdrs);
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	signature = e_composer_header_table_get_signature (table);
 
 	if (!signature)
 		return NULL;
@@ -1190,7 +1193,7 @@
 		char *address;
 		char *name;
 
-		id = e_msg_composer_hdrs_get_from_account (hdrs)->id;
+		id = e_composer_header_table_get_account (table)->id;
 		address = id->address ? camel_text_to_html (id->address, CONVERT_SPACES, 0) : NULL;
 		name = id->name ? camel_text_to_html (id->name, CONVERT_SPACES, 0) : NULL;
 		organization = id->organization ? camel_text_to_html (id->organization, CONVERT_SPACES, 0) : NULL;
@@ -1723,9 +1726,9 @@
 static void
 do_exit (EMsgComposer *composer)
 {
+	EComposerHeaderTable *table;
 	const char *subject;
 	int button;
-	EMsgComposerPrivate *p = composer->priv;
 
 	if (!e_msg_composer_is_dirty (composer) && !e_msg_composer_is_autosaved (composer)) {
 		gtk_widget_destroy (GTK_WIDGET (composer));
@@ -1734,7 +1737,8 @@
 
 	gdk_window_raise (GTK_WIDGET (composer)->window);
 
-	subject = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (p->hdrs));
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	subject = e_composer_header_table_get_subject (table);
 
 	button = e_error_run((GtkWindow *)composer, "mail-composer:exit-unsaved",
 			     subject && subject[0] ? subject : _("Untitled Message"), NULL);
@@ -2438,27 +2442,18 @@
 		_("Show _Attachment Bar"));
  }
 static void
-subject_changed_cb (EMsgComposerHdrs *hdrs,
-		    gchar *subject,
-		    void *data)
+subject_changed_cb (EMsgComposer *composer)
 {
-	EMsgComposer *composer;
-
-	composer = E_MSG_COMPOSER (data);
-
-	gtk_window_set_title (GTK_WINDOW (composer), subject[0] ? subject : _("Compose Message"));
-}
+	EComposerHeaderTable *table;
+	const gchar *subject;
 
-static void
-hdrs_changed_cb (EMsgComposerHdrs *hdrs,
-		 void *data)
-{
-	EMsgComposer *composer;
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	subject = e_composer_header_table_get_subject (table);
 
-	composer = E_MSG_COMPOSER (data);
+	if (subject == NULL || *subject == '\0')
+		subject = _("Compose Message");
 
-	/* Mark the composer as changed so it prompts about unsaved changes on close */
-	e_msg_composer_set_changed (composer);
+	gtk_window_set_title (GTK_WINDOW (composer), subject);
 }
 
 enum {
@@ -2467,7 +2462,7 @@
 };
 
 static void
-update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs)
+update_auto_recipients (EComposerHeaderTable *table, int mode, const char *auto_addrs)
 {
 	EDestination *dest, **destv = NULL;
 	CamelInternetAddress *iaddr;
@@ -2516,10 +2511,10 @@
 
 	switch (mode) {
 	case UPDATE_AUTO_CC:
-		destv = e_msg_composer_hdrs_get_cc (hdrs);
+		destv = e_composer_header_table_get_destinations_cc (table);
 		break;
 	case UPDATE_AUTO_BCC:
-		destv = e_msg_composer_hdrs_get_bcc (hdrs);
+		destv = e_composer_header_table_get_destinations_bcc (table);
 		break;
 	default:
 		g_return_if_reached ();
@@ -2553,10 +2548,10 @@
 
 	switch (mode) {
 	case UPDATE_AUTO_CC:
-		e_msg_composer_hdrs_set_cc (hdrs, destv);
+		e_composer_header_table_set_destinations_cc (table, destv);
 		break;
 	case UPDATE_AUTO_BCC:
-		e_msg_composer_hdrs_set_bcc (hdrs, destv);
+		e_composer_header_table_set_destinations_bcc (table, destv);
 		break;
 	default:
 		g_return_if_reached ();
@@ -2566,13 +2561,14 @@
 }
 
 static void
-from_changed_cb (EMsgComposerHdrs *hdrs, void *data)
+account_changed_cb (EMsgComposer *composer)
 {
-	EMsgComposer *composer = E_MSG_COMPOSER (data);
 	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
 	EAccount *account;
 
-	account = e_msg_composer_hdrs_get_from_account (hdrs);
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	account = e_composer_header_table_get_account (table);
 
 	if (account) {
 		e_msg_composer_set_pgp_sign (composer,
@@ -2581,11 +2577,11 @@
 					      g_ascii_strncasecmp (p->mime_type, "text/calendar", 13) != 0));
 		e_msg_composer_set_smime_sign (composer, account->smime_sign_default);
 		e_msg_composer_set_smime_encrypt (composer, account->smime_encrypt_default);
-		update_auto_recipients (hdrs, UPDATE_AUTO_CC, account->always_cc ? account->cc_addrs : NULL);
-		update_auto_recipients (hdrs, UPDATE_AUTO_BCC, account->always_bcc ? account->bcc_addrs : NULL);
+		update_auto_recipients (table, UPDATE_AUTO_CC, account->always_cc ? account->cc_addrs : NULL);
+		update_auto_recipients (table, UPDATE_AUTO_BCC, account->always_bcc ? account->bcc_addrs : NULL);
 	} else {
-		update_auto_recipients (hdrs, UPDATE_AUTO_CC, NULL);
-		update_auto_recipients (hdrs, UPDATE_AUTO_BCC, NULL);
+		update_auto_recipients (table, UPDATE_AUTO_CC, NULL);
+		update_auto_recipients (table, UPDATE_AUTO_BCC, NULL);
 	}
 
 	set_editor_signature (composer);
@@ -2691,6 +2687,10 @@
 		gtk_widget_destroy (p->hdrs);
 		p->hdrs = NULL;
 	}
+	if (p->header_table != NULL) {
+		g_object_unref (p->header_table);
+		p->header_table = NULL;
+	}
 
 	if (p->notify_id) {
 		GConfClient *gconf = gconf_client_get_default ();
@@ -3322,29 +3322,32 @@
 static void
 map_default_cb (EMsgComposer *composer, gpointer user_data)
 {
+	EComposerHeaderTable *table;
 	GtkWidget *widget;
 	CORBA_Environment ev;
-	const char *subject;
 	const char *text;
 	EMsgComposerPrivate *p = composer->priv;
 
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+
 	/* If the 'To:' field is empty, focus it */
 
-	widget = e_msg_composer_hdrs_get_to_entry (E_MSG_COMPOSER_HDRS (p->hdrs));
+	widget = e_composer_header_table_get_header (
+		table, E_COMPOSER_HEADER_TO)->input_widget;
 	text = gtk_entry_get_text (GTK_ENTRY (widget));
 
 	if (!text || text[0] == '\0') {
 		gtk_widget_grab_focus (widget);
-
 		return;
 	}
 
 	/* If not, check the subject field */
 
-	subject = e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (p->hdrs));
+	widget = e_composer_header_table_get_header (
+		table, E_COMPOSER_HEADER_SUBJECT)->input_widget;
+	text = gtk_entry_get_text (GTK_ENTRY (widget));
 
-	if (!subject || subject[0] == '\0') {
-		widget = e_msg_composer_hdrs_get_subject_entry (E_MSG_COMPOSER_HDRS (p->hdrs));
+	if (!text || text[0] == '\0') {
 		gtk_widget_grab_focus (widget);
 		return;
 	}
@@ -3369,7 +3372,10 @@
 {
 	GtkWidget *widget;
 	EMsgComposerPrivate *p = composer->priv;
-	widget = e_msg_composer_hdrs_get_subject_entry (E_MSG_COMPOSER_HDRS (p->hdrs));
+
+	widget = e_composer_header_table_get_header (
+		E_COMPOSER_HEADER_TABLE (composer->priv->header_table),
+		E_COMPOSER_HEADER_SUBJECT)->input_widget;
 
 #ifdef HAVE_XFREE
 	if (event->keyval == XF86XK_Send) {
@@ -3450,33 +3456,48 @@
 static void
 setup_cut_copy_paste (EMsgComposer *composer)
 {
-	EMsgComposerHdrs *hdrs;
-	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
 	GtkWidget *entry;
 
-	hdrs = (EMsgComposerHdrs *) p->hdrs;
+	/* XXX Shouldn't EComposerHeader be handling this? */
+
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+
+	entry = e_composer_header_table_get_header (
+		table, E_COMPOSER_HEADER_SUBJECT)->input_widget;
 
-	entry = e_msg_composer_hdrs_get_subject_entry (hdrs);
 	g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
 	g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
 
-	entry = e_msg_composer_hdrs_get_reply_to_entry (hdrs);
+	entry = e_composer_header_table_get_header (
+		table, E_COMPOSER_HEADER_REPLY_TO)->input_widget;
+
 	g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
 	g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
 
-	entry = e_msg_composer_hdrs_get_to_entry (hdrs);
+	entry = e_composer_header_table_get_header (
+		table, E_COMPOSER_HEADER_TO)->input_widget;
+
 	g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
 	g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
 
-	entry = e_msg_composer_hdrs_get_cc_entry (hdrs);
+	entry = e_composer_header_table_get_header (
+		table, E_COMPOSER_HEADER_CC)->input_widget;
+
 	g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
 	g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
 
-	entry = e_msg_composer_hdrs_get_bcc_entry (hdrs);
+	entry = e_composer_header_table_get_header (
+		E_COMPOSER_HEADER_TABLE (composer->priv->header_table),
+		E_COMPOSER_HEADER_BCC)->input_widget;
+
 	g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
 	g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
 
-	entry = e_msg_composer_hdrs_get_post_to_label (hdrs);
+	entry = e_composer_header_table_get_header (
+		E_COMPOSER_HEADER_TABLE (composer->priv->header_table),
+		E_COMPOSER_HEADER_POST_TO)->input_widget;
+
 	g_signal_connect (entry, "focus_in_event", G_CALLBACK (composer_entry_focus_in_event_cb), composer);
 	g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
 }
@@ -3719,18 +3740,33 @@
 
 	gtk_box_set_spacing (GTK_BOX (vbox), 6);
 	gtk_box_pack_start (GTK_BOX (vbox), p->hdrs, FALSE, FALSE, 0);
-	g_signal_connect (p->hdrs, "subject_changed",
-			  G_CALLBACK (subject_changed_cb), composer);
-	g_signal_connect (p->hdrs, "hdrs_changed",
-			  G_CALLBACK (hdrs_changed_cb), composer);
-	g_signal_connect (p->hdrs, "from_changed",
-			  G_CALLBACK (from_changed_cb), composer);
 	g_signal_connect_swapped (
-                p->hdrs, "signature_changed",
-                G_CALLBACK (e_msg_composer_show_sig_file), composer);
+		p->header_table, "account::notify",
+		G_CALLBACK (account_changed_cb), composer);
+	g_signal_connect_swapped (
+		p->header_table, "destinations-bcc::notify",
+		G_CALLBACK (e_msg_composer_set_changed), composer);
+	g_signal_connect_swapped (
+		p->header_table, "destinations-cc::notify",
+		G_CALLBACK (e_msg_composer_set_changed), composer);
+	g_signal_connect_swapped (
+		p->header_table, "destinations-to::notify",
+		G_CALLBACK (e_msg_composer_set_changed), composer);
+	g_signal_connect_swapped (
+		p->header_table, "reply-to::notify",
+		G_CALLBACK (e_msg_composer_set_changed), composer);
+	g_signal_connect_swapped (
+		p->header_table, "signature::notify",
+		G_CALLBACK (e_msg_composer_show_sig_file), composer);
+	g_signal_connect_swapped (
+		p->header_table, "subject::notify",
+		G_CALLBACK (subject_changed_cb), composer);
+	g_signal_connect_swapped (
+		p->header_table, "subject::notify",
+		G_CALLBACK (e_msg_composer_set_changed), composer);
 	gtk_widget_show (p->hdrs);
 
-	from_changed_cb((EMsgComposerHdrs *)p->hdrs, composer);
+	account_changed_cb (composer);
 
 	/* Editor component.  */
 	p->eeditor = bonobo_widget_new_control (
@@ -3870,18 +3906,18 @@
 static void
 set_editor_signature (EMsgComposer *composer)
 {
-	EMsgComposerHdrs *hdrs;
+	EComposerHeaderTable *header_table;
 	ESignature *signature;
 	EAccount *account;
 	const gchar *uid;
 
-	hdrs = E_MSG_COMPOSER_HDRS (composer->priv->hdrs);
-	account = e_msg_composer_hdrs_get_from_account (hdrs);
+	header_table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	account = e_composer_header_table_get_account (header_table);
 	g_return_if_fail (account != NULL);
 
 	uid = account->id->sig_uid;
 	signature = uid ? mail_config_get_signature_by_uid (uid) : NULL;
-	e_msg_composer_hdrs_set_signature (hdrs, signature);
+	e_composer_header_table_set_signature (header_table, signature);
 }
 
 /**
@@ -4300,11 +4336,8 @@
 {
 	CORBA_Environment ev;
 	EMsgComposerPrivate *p = composer->priv;
-	EMsgComposerHdrs *hdrs;
 	ESignature *signature = NULL;
 
-	hdrs = E_MSG_COMPOSER_HDRS (composer->priv->hdrs);
-
 	CORBA_exception_init (&ev);
 	if (GNOME_GtkHTML_Editor_Engine_searchByData (p->eeditor_engine, 1, "ClueFlow", "signature", "1", &ev)) {
 		char *name, *str = NULL;
@@ -4322,7 +4355,9 @@
 			}
 		}
 
-		e_msg_composer_hdrs_set_signature (hdrs, signature);
+		e_composer_header_table_set_signature (
+			E_COMPOSER_HEADER_TABLE (p->header_table),
+			signature);
 	}
 	CORBA_exception_free (&ev);
 }
@@ -4671,8 +4706,8 @@
 static void
 handle_mailto (EMsgComposer *composer, const char *mailto)
 {
-	EMsgComposerHdrs *hdrs;
 	EMsgComposerPrivate *priv = composer->priv;
+	EComposerHeaderTable *table;
 	GList *to = NULL, *cc = NULL, *bcc = NULL;
 	EDestination **tov, **ccv, **bccv;
 	char *subject = NULL, *body = NULL;
@@ -4682,6 +4717,8 @@
 	int len, clen;
 	CamelURL *url;
 
+	table = E_COMPOSER_HEADER_TABLE (priv->header_table);
+
 	buf = g_strdup (mailto);
 
 	/* Parse recipients (everything after ':' until '?' or eos). */
@@ -4792,20 +4829,16 @@
 	g_list_free (cc);
 	g_list_free (bcc);
 
-	hdrs = E_MSG_COMPOSER_HDRS (priv->hdrs);
-
-	e_msg_composer_hdrs_set_to (hdrs, tov);
-	e_msg_composer_hdrs_set_cc (hdrs, ccv);
-	e_msg_composer_hdrs_set_bcc (hdrs, bccv);
+	e_composer_header_table_set_destinations_to (table, tov);
+	e_composer_header_table_set_destinations_cc (table, ccv);
+	e_composer_header_table_set_destinations_bcc (table, bccv);
 
 	e_destination_freev (tov);
 	e_destination_freev (ccv);
 	e_destination_freev (bccv);
 
-	if (subject) {
-		e_msg_composer_hdrs_set_subject (hdrs, subject);
-		g_free (subject);
-	}
+	e_composer_header_table_set_subject (table, subject);
+	g_free (subject);
 
 	if (body) {
 		char *htmlbody;
@@ -4891,18 +4924,17 @@
 			    EDestination **bcc,
 			    const char *subject)
 {
-	EMsgComposerHdrs *hdrs;
-	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
 
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-	hdrs = E_MSG_COMPOSER_HDRS (p->hdrs);
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
 
-	e_msg_composer_hdrs_set_to (hdrs, to);
-	e_msg_composer_hdrs_set_cc (hdrs, cc);
-	e_msg_composer_hdrs_set_bcc (hdrs, bcc);
-	e_msg_composer_hdrs_set_subject (hdrs, subject);
-	e_msg_composer_hdrs_set_from_account (hdrs, from);
+	e_composer_header_table_set_account_name (table, from);
+	e_composer_header_table_set_destinations_to (table, to);
+	e_composer_header_table_set_destinations_cc (table, cc);
+	e_composer_header_table_set_destinations_bcc (table, bcc);
+	e_composer_header_table_set_subject (table, subject);
 }
 
 
@@ -4936,8 +4968,12 @@
 			 const char *mime_type)
 {
 	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
+
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
+	table = E_COMPOSER_HEADER_TABLE (p->header_table);
+
 	set_editor_text (composer, _("<b>(The composer contains a non-text message body, which cannot be edited.)</b>"), -1, FALSE, FALSE);
 	e_msg_composer_set_send_html (composer, FALSE);
 	disable_editor (composer);
@@ -4948,10 +4984,9 @@
 	p->mime_type = g_strdup (mime_type);
 
 	if (g_ascii_strncasecmp (p->mime_type, "text/calendar", 13) == 0) {
-		EMsgComposerHdrs *hdrs = E_MSG_COMPOSER_HDRS (p->hdrs);
 		EAccount *account;
 
-		account = e_msg_composer_hdrs_get_from_account (hdrs);
+		account = e_composer_header_table_get_account (table);
 		if (account && account->pgp_no_imip_sign)
 			e_msg_composer_set_pgp_sign (composer, FALSE);
 	}
@@ -5420,14 +5455,12 @@
 EAccount *
 e_msg_composer_get_preferred_account (EMsgComposer *composer)
 {
-	EMsgComposerPrivate *p = composer->priv;
-	EMsgComposerHdrs *hdrs;
+	EComposerHeaderTable *table;
 
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-	hdrs = E_MSG_COMPOSER_HDRS (p->hdrs);
-
-	return e_msg_composer_hdrs_get_from_account (hdrs);
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	return e_composer_header_table_get_account (table);
 }
 
 
@@ -6002,49 +6035,105 @@
 				      "state", p->set_priority ? "1" : "0", NULL);
 }
 
+CamelInternetAddress *
+e_msg_composer_get_from (EMsgComposer *composer)
+{
+	CamelInternetAddress *address;
+	EComposerHeaderTable *table;
+	EAccount *account;
+
+	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
+
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+
+	account = e_composer_header_table_get_account (table);
+	if (account == NULL)
+		return NULL;
+
+	address = camel_internet_address_new ();
+	camel_internet_address_add (
+		address, account->id->name, account->id->address);
+
+	return address;
+}
+
+CamelInternetAddress *
+e_msg_composer_get_reply_to (EMsgComposer *composer)
+{
+	CamelInternetAddress *address;
+	EComposerHeaderTable *table;
+	const gchar *reply_to;
+
+	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
+
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+
+	reply_to = e_composer_header_table_get_reply_to (table);
+	if (reply_to == NULL || *reply_to == '\0')
+		return NULL;
+
+	address = camel_internel_address_new ();
+	if (camel_address_unformat (CAMEL_ADDRESS (address), reply_to) == -1) {
+		camel_object_unref (CAMEL_OBJECT (address));
+		return NULL;
+	}
+
+	return address;
+}
+
 EDestination **
 e_msg_composer_get_recipients (EMsgComposer *composer)
 {
-	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
+
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-	return p->hdrs ? e_msg_composer_hdrs_get_recipients (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	return e_composer_header_table_get_destinations (table);
 }
 
 EDestination **
 e_msg_composer_get_to (EMsgComposer *composer)
 {
-	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
+
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-	return p->hdrs ? e_msg_composer_hdrs_get_to (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	return e_composer_header_table_get_destinations_to (table);
 }
 
 EDestination **
 e_msg_composer_get_cc (EMsgComposer *composer)
 {
-	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
+
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-	return p->hdrs ? e_msg_composer_hdrs_get_cc (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	return e_composer_header_table_get_destinations_cc (table);
 }
 
 EDestination **
 e_msg_composer_get_bcc (EMsgComposer *composer)
 {
-	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
+
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-	return p->hdrs ? e_msg_composer_hdrs_get_bcc (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	return e_composer_header_table_get_destinations_bcc (table);
 }
 
 const char *
 e_msg_composer_get_subject (EMsgComposer *composer)
 {
-	EMsgComposerPrivate *p = composer->priv;
+	EComposerHeaderTable *table;
+
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
 
-	return p->hdrs ? e_msg_composer_hdrs_get_subject (E_MSG_COMPOSER_HDRS (p->hdrs)) : NULL;
+	table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+	return e_composer_header_table_get_subject (table);
 }
 
 
@@ -6470,11 +6559,12 @@
 	}
 }
 
-EMsgComposerHdrs*
-e_msg_composer_get_hdrs (EMsgComposer *composer)
+EComposerHeaderTable *
+e_msg_composer_get_header_table (EMsgComposer *composer)
 {
-	EMsgComposerPrivate *p = composer->priv;
-	return (EMsgComposerHdrs*)p->hdrs;
+	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
+
+	return composer->priv->header_table;
 }
 
 void

Modified: branches/mbarnes-composer/composer/e-msg-composer.h
==============================================================================
--- branches/mbarnes-composer/composer/e-msg-composer.h	(original)
+++ branches/mbarnes-composer/composer/e-msg-composer.h	Thu Jan 24 05:59:44 2008
@@ -30,8 +30,12 @@
 
 #include <bonobo/bonobo-window.h>
 #include <bonobo/bonobo-ui-component.h>
+#include <camel/camel-internet-address.h>
+#include <camel/camel-mime-message.h>
+#include <libedataserver/e-account.h>
+#include <libebook/e-destination.h>
 
-#include "e-msg-composer-hdrs.h"
+#include "e-composer-header-table.h"
 #include "Editor.h"
 
 #ifdef __cplusplus
@@ -128,10 +132,12 @@
 void                     e_msg_composer_set_request_receipt              (EMsgComposer *composer,
 									  gboolean      request_receipt);
 
-gboolean                 e_msg_composer_get_priority              (EMsgComposer *composer);
-void                     e_msg_composer_set_priority              (EMsgComposer *composer,
-								  gboolean      set_priority);
+gboolean                 e_msg_composer_get_priority                     (EMsgComposer *composer);
+void                     e_msg_composer_set_priority                     (EMsgComposer *composer,
+								          gboolean      set_priority);
 
+CamelInternetAddress    *e_msg_composer_get_from                         (EMsgComposer *composer);
+CamelInternetAddress    *e_msg_composer_get_reply_to                     (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);
@@ -188,7 +194,7 @@
 
 void			 e_msg_composer_link_clicked			 (EMsgComposer *composer, const gchar *url);
 
-EMsgComposerHdrs*	 e_msg_composer_get_hdrs			 (EMsgComposer *composer);
+EComposerHeaderTable *	e_msg_composer_get_header_table		 (EMsgComposer *composer);
 void			 e_msg_composer_set_saved			 (EMsgComposer *composer);
 void			 e_msg_composer_set_send_options		 (EMsgComposer *composer,
 									  gboolean      send_enable);

Modified: branches/mbarnes-composer/mail/em-composer-utils.c
==============================================================================
--- branches/mbarnes-composer/mail/em-composer-utils.c	(original)
+++ branches/mbarnes-composer/mail/em-composer-utils.c	Thu Jan 24 05:59:44 2008
@@ -687,7 +687,9 @@
 
 	if (fromuri
 	    && (account = mail_config_get_account_by_source_url(fromuri)))
-		e_msg_composer_hdrs_set_from_account(e_msg_composer_get_hdrs(composer), account->name);
+		e_composer_header_table_set_account_name (
+			e_msg_composer_get_header_table (composer),
+			account->name);
 
 	e_msg_composer_unset_changed (composer);
 	e_msg_composer_drop_editor_undo (composer);
@@ -723,7 +725,9 @@
 		g_free (url);
 
 		if (account)
-			e_msg_composer_hdrs_set_from_account (e_msg_composer_get_hdrs(composer), account->name);
+			e_composer_header_table_set_account_name (
+				e_msg_composer_get_header_table (composer),
+				account->name);
 	}
 
 	em_composer_utils_setup_default_callbacks (composer);

Modified: branches/mbarnes-composer/plugins/exchange-operations/exchange-mail-send-options.c
==============================================================================
--- branches/mbarnes-composer/plugins/exchange-operations/exchange-mail-send-options.c	(original)
+++ branches/mbarnes-composer/plugins/exchange-operations/exchange-mail-send-options.c	Thu Jan 24 05:59:44 2008
@@ -30,7 +30,6 @@
 #include "mail/em-event.h"
 
 #include "composer/e-msg-composer.h"
-#include "composer/e-msg-composer-hdrs.h"
 #include "libedataserver/e-account.h"
 
 #include "exchange-send-options.h"
@@ -43,7 +42,6 @@
 append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
 {
 	EMsgComposer *composer;
-	EMsgComposerHdrs *hdrs;
 	CamelAddress *sender_address;
 	const char *sender_id, *recipient_id;
 	struct _camel_header_address *addr;
@@ -86,8 +84,7 @@
 		else
 			e_msg_composer_remove_header (composer, "Sensitivity");
 
-		hdrs = e_msg_composer_get_hdrs (composer);
-		sender_address = (CamelAddress *) e_msg_composer_hdrs_get_from (hdrs);
+		sender_address = (CamelAddress *) e_msg_composer_get_from (composer);
 		sender_id = (const char*) camel_address_encode (sender_address);
 
 		addr = camel_header_address_decode (dialog->options->delegate_address, NULL);
@@ -122,11 +119,12 @@
 		}
 
 		if (dialog->options->delivery_enabled) {
-			EMsgComposerHdrs *hdrs = e_msg_composer_get_hdrs(composer);
+			EComposerHeaderTable *table;
 			EAccount *account;
 			char *mdn_address;
 
-			account = e_msg_composer_hdrs_get_from_account (hdrs);
+			table = e_msg_composer_get_header_table (composer);
+			account = e_composer_header_table_get_account (table);
 			mdn_address = account->id->reply_to;
 			if (!mdn_address || !*mdn_address)
 				mdn_address = account->id->address;
@@ -136,11 +134,12 @@
 			e_msg_composer_remove_header (composer, "Return-Receipt-To");
 
 		if (dialog->options->read_enabled) {
-			EMsgComposerHdrs *hdrs = e_msg_composer_get_hdrs(composer);
+			EComposerHeaderTable *table;
 			EAccount *account;
 			char *mdn_address;
 
-			account = e_msg_composer_hdrs_get_from_account (hdrs);
+			table = e_msg_composer_get_header_table (composer);
+			account = e_composer_header_table_get_account (table);
 			mdn_address = account->id->reply_to;
 			if (!mdn_address || !*mdn_address)
 				mdn_address = account->id->address;

Modified: branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c
==============================================================================
--- branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c	(original)
+++ branches/mbarnes-composer/plugins/mailing-list-actions/mailing-list-actions.c	Thu Jan 24 05:59:44 2008
@@ -150,7 +150,9 @@
 				/* directly send message */
 				composer = e_msg_composer_new_from_url (url);
 				if ((account = mail_config_get_account_by_source_url (action_data->uri)))
-					e_msg_composer_hdrs_set_from_account (e_msg_composer_get_hdrs(composer), account->name);
+					e_composer_header_table_set_account (
+						e_msg_composer_get_header_table (composer),
+						account->name);
 				em_utils_composer_send_cb (composer, NULL);
 			} else if (send_message_response == GTK_RESPONSE_NO) {
 				/* show composer */

Modified: branches/mbarnes-composer/widgets/misc/e-account-combo-box.c
==============================================================================
--- branches/mbarnes-composer/widgets/misc/e-account-combo-box.c	(original)
+++ branches/mbarnes-composer/widgets/misc/e-account-combo-box.c	Thu Jan 24 05:59:44 2008
@@ -156,8 +156,12 @@
 skip:
 	/* Restore the previously selected account. */
 	account = e_account_combo_box_get_active (combo_box);
+	if (account != NULL)
+		g_object_ref (account);
 	gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), model);
 	e_account_combo_box_set_active (combo_box, account);
+	if (account != NULL)
+		g_object_unref (account);
 
 	g_signal_emit (combo_box, signal_ids[REFRESHED], 0);
 }
@@ -305,6 +309,14 @@
 	camel_session = session;
 }
 
+EAccountList *
+e_account_combo_box_get_account_list (EAccountComboBox *combo_box)
+{
+	g_return_val_if_fail (E_IS_ACCOUNT_COMBO_BOX (combo_box), NULL);
+
+	return combo_box->priv->account_list;
+}
+
 void
 e_account_combo_box_set_account_list (EAccountComboBox *combo_box,
                                       EAccountList *account_list)

Modified: branches/mbarnes-composer/widgets/misc/e-account-combo-box.h
==============================================================================
--- branches/mbarnes-composer/widgets/misc/e-account-combo-box.h	(original)
+++ branches/mbarnes-composer/widgets/misc/e-account-combo-box.h	Thu Jan 24 05:59:44 2008
@@ -43,6 +43,8 @@
 GType		e_account_combo_box_get_type	(void);
 GtkWidget *	e_account_combo_box_new		(void);
 void		e_account_combo_box_set_session	(CamelSession *session);
+EAccountList *	e_account_combo_box_get_account_list
+						(EAccountComboBox *combo_box);
 void		e_account_combo_box_set_account_list
 						(EAccountComboBox *combo_box,
 						 EAccountList *account_list);

Modified: branches/mbarnes-composer/widgets/misc/e-signature-combo-box.c
==============================================================================
--- branches/mbarnes-composer/widgets/misc/e-signature-combo-box.c	(original)
+++ branches/mbarnes-composer/widgets/misc/e-signature-combo-box.c	Thu Jan 24 05:59:44 2008
@@ -94,8 +94,12 @@
 skip:
 	/* Restore the previously selected signature. */
 	signature = e_signature_combo_box_get_active (combo_box);
+	if (signature != NULL)
+		g_object_ref (signature);
 	gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), model);
 	e_signature_combo_box_set_active (combo_box, signature);
+	if (signature != NULL)
+		g_object_unref (signature);
 
 	g_signal_emit (combo_box, signal_ids[REFRESHED], 0);
 }
@@ -229,6 +233,14 @@
 	return g_object_new (E_TYPE_SIGNATURE_COMBO_BOX, NULL);
 }
 
+ESignatureList *
+e_signature_combo_box_get_signature_list (ESignatureComboBox *combo_box)
+{
+	g_return_val_if_fail (E_IS_SIGNATURE_COMBO_BOX (combo_box), NULL);
+
+	return combo_box->priv->signature_list;
+}
+
 void
 e_signature_combo_box_set_signature_list (ESignatureComboBox *combo_box,
                                           ESignatureList *signature_list)

Modified: branches/mbarnes-composer/widgets/misc/e-signature-combo-box.h
==============================================================================
--- branches/mbarnes-composer/widgets/misc/e-signature-combo-box.h	(original)
+++ branches/mbarnes-composer/widgets/misc/e-signature-combo-box.h	Thu Jan 24 05:59:44 2008
@@ -2,8 +2,8 @@
 #define E_SIGNATURE_COMBO_BOX_H
 
 #include <gtk/gtk.h>
-#include "e-util/e-signature.h"
-#include "e-util/e-signature-list.h"
+#include <e-util/e-signature.h>
+#include <e-util/e-signature-list.h>
 
 /* Standard GObject macros */
 #define E_TYPE_SIGNATURE_COMBO_BOX \
@@ -41,6 +41,8 @@
 
 GType		e_signature_combo_box_get_type	(void);
 GtkWidget *	e_signature_combo_box_new	(void);
+ESignatureList *e_signature_combo_box_get_signature_list
+					(ESignatureComboBox *combo_box);
 void		e_signature_combo_box_set_signature_list
 					(ESignatureComboBox *combo_box,
 					 ESignatureList *signature_list);



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