evolution r34901 - in branches/mbarnes-composer: composer mail plugins/exchange-operations plugins/groupwise-features
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r34901 - in branches/mbarnes-composer: composer mail plugins/exchange-operations plugins/groupwise-features
- Date: Sun, 27 Jan 2008 03:33:58 +0000 (GMT)
Author: mbarnes
Date: Sun Jan 27 03:33:58 2008
New Revision: 34901
URL: http://svn.gnome.org/viewvc/evolution?rev=34901&view=rev
Log:
Shave off some redundant parts of the EMsgComposer API and
polish things up a bit.
Modified:
branches/mbarnes-composer/composer/e-msg-composer.c
branches/mbarnes-composer/composer/e-msg-composer.h
branches/mbarnes-composer/composer/evolution-composer.c
branches/mbarnes-composer/mail/em-composer-utils.c
branches/mbarnes-composer/plugins/exchange-operations/exchange-mail-send-options.c
branches/mbarnes-composer/plugins/groupwise-features/mail-send-options.c
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 Sun Jan 27 03:33:58 2008
@@ -621,7 +621,7 @@
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (msg));
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
/* Subject: */
subject = e_composer_header_table_get_subject (table);
@@ -721,7 +721,7 @@
char *charset;
int i;
- table = E_COMPOSER_HEADER_TABLE (p->header_table);
+ table = e_msg_composer_get_header_table (composer);
account = e_composer_header_table_get_account (table);
if (p->persist_stream_interface == CORBA_OBJECT_NIL)
@@ -1450,7 +1450,7 @@
ESignature *signature;
gboolean format_html;
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
signature = e_composer_header_table_get_signature (table);
if (!signature)
@@ -2017,7 +2017,7 @@
gdk_window_raise (GTK_WIDGET (composer)->window);
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
subject = e_composer_header_table_get_subject (table);
button = e_error_run((GtkWindow *)composer, "mail-composer:exit-unsaved",
@@ -2727,7 +2727,7 @@
EComposerHeaderTable *table;
const gchar *subject;
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
subject = e_composer_header_table_get_subject (table);
if (subject == NULL || *subject == '\0')
@@ -2847,7 +2847,7 @@
EComposerHeaderTable *table;
EAccount *account;
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
account = e_composer_header_table_get_account (table);
if (account) {
@@ -3572,7 +3572,7 @@
const char *text;
EMsgComposerPrivate *p = composer->priv;
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
/* If the 'To:' field is empty, focus it */
@@ -3615,11 +3615,12 @@
composer_key_pressed (EMsgComposer *composer, GdkEventKey *event, void *user_data)
{
GtkWidget *widget;
+ EComposerHeaderTable *table;
EMsgComposerPrivate *p = composer->priv;
+ table = e_msg_composer_get_header_table (composer);
widget = e_composer_header_table_get_header (
- E_COMPOSER_HEADER_TABLE (composer->priv->header_table),
- E_COMPOSER_HEADER_SUBJECT)->input_widget;
+ table, E_COMPOSER_HEADER_SUBJECT)->input_widget;
#ifdef HAVE_XFREE
if (event->keyval == XF86XK_Send) {
@@ -3705,7 +3706,7 @@
/* XXX Shouldn't EComposerHeader be handling this? */
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
entry = e_composer_header_table_get_header (
table, E_COMPOSER_HEADER_SUBJECT)->input_widget;
@@ -3732,15 +3733,13 @@
g_signal_connect (entry, "focus_out_event", G_CALLBACK (composer_entry_focus_out_event_cb), composer);
entry = e_composer_header_table_get_header (
- E_COMPOSER_HEADER_TABLE (composer->priv->header_table),
- E_COMPOSER_HEADER_BCC)->input_widget;
+ 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_composer_header_table_get_header (
- E_COMPOSER_HEADER_TABLE (composer->priv->header_table),
- E_COMPOSER_HEADER_POST_TO)->input_widget;
+ 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);
@@ -3933,7 +3932,7 @@
gboolean visible[E_COMPOSER_NUM_HEADERS];
gint visible_mask, ii;
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
visible_mask = composer->priv->visible_mask;
visible[E_COMPOSER_HEADER_FROM] = composer->priv->view_from;
@@ -3957,8 +3956,7 @@
e_composer_header_table_set_header_visible (
table, ii, visible[ii]);
- gtk_widget_queue_resize (composer->priv->header_table);
-
+ gtk_widget_queue_resize (GTK_WIDGET (table));
}
static EMsgComposer *
@@ -4031,35 +4029,35 @@
update_header_visibility (composer);
gtk_box_set_spacing (GTK_BOX (vbox), 6);
- gtk_box_pack_start (GTK_BOX (vbox), p->header_table, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, FALSE, 0);
g_signal_connect_swapped (
- p->header_table, "notify::account",
+ table, "notify::account",
G_CALLBACK (account_changed_cb), composer);
g_signal_connect_swapped (
- p->header_table, "notify::destinations-bcc",
+ table, "notify::destinations-bcc",
G_CALLBACK (e_msg_composer_set_changed), composer);
g_signal_connect_swapped (
- p->header_table, "notify::destinations-cc",
+ table, "notify::destinations-cc",
G_CALLBACK (e_msg_composer_set_changed), composer);
g_signal_connect_swapped (
- p->header_table, "notify::destinations-to",
+ table, "notify::destinations-to",
G_CALLBACK (e_msg_composer_set_changed), composer);
g_signal_connect_swapped (
- p->header_table, "notify::reply-to",
+ table, "notify::reply-to",
G_CALLBACK (e_msg_composer_set_changed), composer);
g_signal_connect_swapped (
- p->header_table, "notify::signature",
+ table, "notify::signature",
G_CALLBACK (e_msg_composer_show_sig_file), composer);
g_signal_connect_swapped (
- p->header_table, "notify::subject",
+ table, "notify::subject",
G_CALLBACK (subject_changed_cb), composer);
g_signal_connect_swapped (
- p->header_table, "notify::subject",
+ table, "notify::subject",
G_CALLBACK (e_msg_composer_set_changed), composer);
g_signal_connect_swapped (
- p->header_table, "notify::signature",
+ table, "notify::signature",
G_CALLBACK (e_msg_composer_show_sig_file), composer);
- gtk_widget_show (p->header_table);
+ gtk_widget_show (GTK_WIDGET (table));
account_changed_cb (composer);
@@ -4202,18 +4200,18 @@
static void
set_editor_signature (EMsgComposer *composer)
{
- EComposerHeaderTable *header_table;
+ EComposerHeaderTable *table;
ESignature *signature;
EAccount *account;
const gchar *uid;
- header_table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
- account = e_composer_header_table_get_account (header_table);
+ table = e_msg_composer_get_header_table (composer);
+ account = e_composer_header_table_get_account (table);
g_return_if_fail (account != NULL);
uid = account->id->sig_uid;
signature = uid ? mail_config_get_signature_by_uid (uid) : NULL;
- e_composer_header_table_set_signature (header_table, signature);
+ e_composer_header_table_set_signature (table, signature);
}
/**
@@ -4631,9 +4629,12 @@
set_signature_gui (EMsgComposer *composer)
{
CORBA_Environment ev;
+ EComposerHeaderTable *table;
EMsgComposerPrivate *p = composer->priv;
ESignature *signature = NULL;
+ table = e_msg_composer_get_header_table (composer);
+
CORBA_exception_init (&ev);
if (GNOME_GtkHTML_Editor_Engine_searchByData (p->eeditor_engine, 1, "ClueFlow", "signature", "1", &ev)) {
char *name, *str = NULL;
@@ -4652,9 +4653,7 @@
CORBA_free (str);
}
- e_composer_header_table_set_signature (
- E_COMPOSER_HEADER_TABLE (p->header_table),
- signature);
+ e_composer_header_table_set_signature (table, signature);
}
CORBA_exception_free (&ev);
}
@@ -4703,7 +4702,7 @@
return NULL;
}
- table = E_COMPOSER_HEADER_TABLE (new->priv->header_table);
+ table = e_msg_composer_get_header_table (new);
if (postto) {
e_composer_header_table_set_post_to_list (table, postto);
@@ -4838,7 +4837,11 @@
subject = camel_mime_message_get_subject (message);
- e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject);
+ e_composer_header_table_set_account_name (table, account_name);
+ 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_composer_header_table_set_subject (table, subject);
g_free (account_name);
@@ -4969,20 +4972,21 @@
e_msg_composer_new_redirect (CamelMimeMessage *message, const char *resent_from)
{
EMsgComposer *composer;
- EMsgComposerPrivate *p;
+ EComposerHeaderTable *table;
const char *subject;
g_return_val_if_fail (CAMEL_IS_MIME_MESSAGE (message), NULL);
composer = e_msg_composer_new_with_message (message);
- p = composer->priv;
+ table = e_msg_composer_get_header_table (composer);
subject = camel_mime_message_get_subject (message);
- p->redirect = message;
+ composer->priv->redirect = message;
camel_object_ref (message);
- e_msg_composer_set_headers (composer, resent_from, NULL, NULL, NULL, subject);
+ e_composer_header_table_set_account_name (table, resent_from);
+ e_composer_header_table_set_subject (table, subject);
disable_editor (composer);
@@ -5027,7 +5031,7 @@
int len, clen;
CamelURL *url;
- table = E_COMPOSER_HEADER_TABLE (priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
buf = g_strdup (mailto);
@@ -5215,40 +5219,6 @@
}
/**
- * e_msg_composer_set_headers:
- * @composer: a composer object
- * @from: the name of the account the user will send from,
- * or %NULL for the default account
- * @to: the values for the "To" header
- * @cc: the values for the "Cc" header
- * @bcc: the values for the "Bcc" header
- * @subject: the value for the "Subject" header
- *
- * Sets the headers in the composer to the given values.
- **/
-void
-e_msg_composer_set_headers (EMsgComposer *composer,
- const char *from,
- EDestination **to,
- EDestination **cc,
- EDestination **bcc,
- const char *subject)
-{
- EComposerHeaderTable *table;
-
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
-
- 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);
-}
-
-
-/**
* e_msg_composer_set_body_text:
* @composer: a composer object
* @text: the HTML text to initialize the editor with
@@ -5282,7 +5252,7 @@
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- table = E_COMPOSER_HEADER_TABLE (p->header_table);
+ table = e_msg_composer_get_header_table (composer);
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);
@@ -5571,6 +5541,7 @@
CamelMimeMessage *
e_msg_composer_get_message_draft (EMsgComposer *composer)
{
+ EComposerHeaderTable *table;
CamelMimeMessage *msg;
EAccount *account;
gboolean old_flags[4];
@@ -5579,6 +5550,8 @@
int i;
EMsgComposerPrivate *p = composer->priv;
+ table = e_msg_composer_get_header_table (composer);
+
/* always save drafts as HTML to preserve formatting */
old_send_html = p->send_html;
p->send_html = TRUE;
@@ -5602,7 +5575,7 @@
p->smime_encrypt = old_flags[3];
/* Attach account info to the draft. */
- account = e_msg_composer_get_preferred_account (composer);
+ account = e_composer_header_table_get_account (table);
if (account && account->name)
camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-Account", account->uid);
@@ -5764,24 +5737,6 @@
/**
- * e_msg_composer_get_preferred_account:
- * @composer: composer
- *
- * Returns the user-specified account (from field).
- */
-EAccount *
-e_msg_composer_get_preferred_account (EMsgComposer *composer)
-{
- EComposerHeaderTable *table;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
- return e_composer_header_table_get_account (table);
-}
-
-
-/**
* e_msg_composer_set_pgp_sign:
* @composer: A message composer widget
* @send_html: Whether the composer should have the "PGP Sign" flag set
@@ -6355,7 +6310,7 @@
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
account = e_composer_header_table_get_account (table);
if (account == NULL)
@@ -6377,7 +6332,7 @@
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
+ table = e_msg_composer_get_header_table (composer);
reply_to = e_composer_header_table_get_reply_to (table);
if (reply_to == NULL || *reply_to == '\0')
@@ -6392,62 +6347,6 @@
return address;
}
-EDestination **
-e_msg_composer_get_recipients (EMsgComposer *composer)
-{
- EComposerHeaderTable *table;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), 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)
-{
- EComposerHeaderTable *table;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), 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)
-{
- EComposerHeaderTable *table;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), 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)
-{
- EComposerHeaderTable *table;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), 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)
-{
- EComposerHeaderTable *table;
-
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
-
- table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
- return e_composer_header_table_get_subject (table);
-}
-
-
/**
* e_msg_composer_guess_mime_type:
* @file_name: filename
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 Sun Jan 27 03:33:58 2008
@@ -73,12 +73,6 @@
void e_msg_composer_set_alternative (EMsgComposer *composer,
gboolean alt);
-void e_msg_composer_set_headers (EMsgComposer *composer,
- const char *from,
- EDestination **to,
- EDestination **cc,
- EDestination **bcc,
- const char *subject);
void e_msg_composer_set_body_text (EMsgComposer *composer,
const char *text,
ssize_t len);
@@ -138,13 +132,7 @@
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);
-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);
void e_msg_composer_clear_inlined_table (EMsgComposer *composer);
char *e_msg_composer_guess_mime_type (const char *file_name);
void e_msg_composer_set_changed (EMsgComposer *composer);
Modified: branches/mbarnes-composer/composer/evolution-composer.c
==============================================================================
--- branches/mbarnes-composer/composer/evolution-composer.c (original)
+++ branches/mbarnes-composer/composer/evolution-composer.c Sun Jan 27 03:33:58 2008
@@ -87,6 +87,7 @@
{
BonoboObject *bonobo_object;
EvolutionComposer *composer;
+ EComposerHeaderTable *table;
EDestination **tov, **ccv, **bccv;
EAccountList *accounts;
EAccount *account;
@@ -95,6 +96,7 @@
bonobo_object = bonobo_object_from_servant (servant);
composer = EVOLUTION_COMPOSER (bonobo_object);
+ table = e_msg_composer_get_header_table (composer->composer);
account = mail_config_get_account_by_name (from);
if (!account) {
@@ -121,8 +123,11 @@
ccv = corba_recipientlist_to_destv (cc);
bccv = corba_recipientlist_to_destv (bcc);
- e_msg_composer_set_headers (composer->composer, account->name,
- tov, ccv, bccv, subject);
+ e_composer_header_table_set_account (table, account);
+ e_composer_header_table_set_subject (table, subject);
+ 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);
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 Sun Jan 27 03:33:58 2008
@@ -272,7 +272,7 @@
(e.g. to get a passphrase to sign a message) */
/* get the message recipients */
- recipients = e_msg_composer_get_recipients (composer);
+ recipients = e_composer_header_table_get_destinations (table);
cia = camel_internet_address_new ();
@@ -297,7 +297,7 @@
}
}
- recipients_bcc = e_msg_composer_get_bcc (composer);
+ recipients_bcc = e_composer_header_table_get_destinations_bcc (table);
if (recipients_bcc) {
for (i = 0; recipients_bcc[i] != NULL; i++) {
const char *addr = e_destination_get_address (recipients_bcc[i]);
@@ -357,7 +357,7 @@
}
/* Check for no subject */
- subject = e_msg_composer_get_subject (composer);
+ subject = e_composer_header_table_get_subject (table);
if (subject == NULL || subject[0] == '\0') {
if (!ask_confirm_for_empty_subject (composer))
goto finished;
@@ -386,7 +386,7 @@
goto finished;
/* Add info about the sending account */
- account = e_msg_composer_get_preferred_account (composer);
+ account = e_composer_header_table_get_account (table);
if (account) {
/* FIXME: Why isn't this crap just in e_msg_composer_get_message? */
@@ -413,13 +413,15 @@
void
em_utils_composer_send_cb (EMsgComposer *composer, gpointer user_data)
{
+ EComposerHeaderTable *table;
CamelMimeMessage *message;
CamelMessageInfo *info;
struct _send_data *send;
CamelFolder *mail_folder;
EAccount *account;
- account = e_msg_composer_get_preferred_account (composer);
+ table = e_msg_composer_get_header_table (composer);
+ account = e_composer_header_table_get_account (table);
if (!account || !account->enabled) {
e_error_run((GtkWindow *)composer, "mail:send-no-account-enabled", NULL);
return;
@@ -534,6 +536,7 @@
{
const char *default_drafts_folder_uri = mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
CamelFolder *drafts_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_DRAFTS);
+ EComposerHeaderTable *table;
struct _save_draft_info *sdi;
CamelFolder *folder = NULL;
CamelMimeMessage *msg;
@@ -546,7 +549,8 @@
g_object_ref(composer);
msg = e_msg_composer_get_message_draft (composer);
- account = e_msg_composer_get_preferred_account (composer);
+ table = e_msg_composer_get_header_table (composer);
+ account = e_composer_header_table_get_account (table);
sdi = g_malloc(sizeof(struct _save_draft_info));
sdi->composer = composer;
@@ -622,6 +626,7 @@
create_new_composer (const char *subject, const char *fromuri)
{
EMsgComposer *composer;
+ EComposerHeaderTable *table;
EAccount *account = NULL;
composer = e_msg_composer_new ();
@@ -631,14 +636,9 @@
if (fromuri)
account = mail_config_get_account_by_source_url(fromuri);
- /* If the account corresponding to the fromuri is not enabled.
- * We get the preffered account from the composer and use that
- * as the account to send the mail.
- */
- if (!account)
- account = e_msg_composer_get_preferred_account (composer);
-
- e_msg_composer_set_headers (composer, account?account->name:NULL, NULL, NULL, NULL, subject);
+ table = e_msg_composer_get_header_table (composer);
+ e_composer_header_table_set_account (table, account);
+ e_composer_header_table_set_subject (table, subject);
em_composer_utils_setup_default_callbacks (composer);
@@ -1438,8 +1438,6 @@
} else
composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST);
- table = e_msg_composer_get_header_table (composer);
-
/* Set the subject of the new message. */
if ((subject = (char *) camel_mime_message_get_subject (message))) {
if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0)
@@ -1450,7 +1448,11 @@
subject = g_strdup ("");
}
- e_msg_composer_set_headers (composer, account ? account->name : NULL, tov, ccv, NULL, subject);
+ table = e_msg_composer_get_header_table (composer);
+ e_composer_header_table_set_account (table, account);
+ e_composer_header_table_set_subject (table, subject);
+ e_composer_header_table_set_destinations_to (table, tov);
+ e_composer_header_table_set_destinations_cc (table, ccv);
g_free (subject);
@@ -2082,7 +2084,6 @@
get_reply_sender (message, to, NULL);
composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL_POST);
- table = e_msg_composer_get_header_table (composer);
/* construct the tov/ccv */
tov = em_utils_camel_address_to_destination (to);
@@ -2097,7 +2098,10 @@
subject = g_strdup ("");
}
- e_msg_composer_set_headers (composer, account ? account->name : NULL, tov, NULL, NULL, subject);
+ table = e_msg_composer_get_header_table (composer);
+ e_composer_header_table_set_account (table, account);
+ e_composer_header_table_set_subject (table, subject);
+ e_composer_header_table_set_destinations_to (table, tov);
g_free (subject);
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 Sun Jan 27 03:33:58 2008
@@ -168,10 +168,12 @@
org_gnome_exchange_send_options (EPlugin *ep, EMEventTargetComposer *target)
{
EMsgComposer *composer = target->composer;
+ EComposerHeaderTable *table;
EAccount *account = NULL;
char *temp = NULL;
- account = e_msg_composer_get_preferred_account (composer);
+ table = e_msg_composer_get_header_table (composer);
+ account = e_composer_header_table_get_account (table);
if (!account)
return;
Modified: branches/mbarnes-composer/plugins/groupwise-features/mail-send-options.c
==============================================================================
--- branches/mbarnes-composer/plugins/groupwise-features/mail-send-options.c (original)
+++ branches/mbarnes-composer/plugins/groupwise-features/mail-send-options.c Sun Jan 27 03:33:58 2008
@@ -142,10 +142,12 @@
{
EMsgComposer *comp = (struct _EMsgComposer *)t->composer ;
+ EComposerHeaderTable *table;
EAccount *account = NULL;
char *temp = NULL;
- account = e_msg_composer_get_preferred_account (comp) ;
+ table = e_msg_composer_get_header_table (comp);
+ account = e_composer_header_table_get_account (table);
if (!account)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]