Check for either a matching account name, or for a matching e-mail address
2001-10-10 Jon Trowbridge <trow@ximian.com> * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account): Check for either a matching account name, or for a matching e-mail address embedded in the passed-in string. (Fixes half of bug #3255) (destroy): Call bonobo_object_release_unref on corba_select_names, not CORBA_Object_release. Otherwise we leak stuff all over the place. (Bug #11878) * e-msg-composer.c (e_msg_composer_new_with_message): If our message doesn't contain an X-Evolution-Account header, pass in the From header as the account name. (Fixes the other half of #3255) svn path=/trunk/; revision=13567
This commit is contained in:
committed by
Jon Trowbridge
parent
484c8193e1
commit
7e628d1745
@ -1,3 +1,17 @@
|
||||
2001-10-10 Jon Trowbridge <trow@ximian.com>
|
||||
|
||||
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account):
|
||||
Check for either a matching account name, or for a matching e-mail
|
||||
address embedded in the passed-in string. (Fixes half of bug
|
||||
#3255)
|
||||
(destroy): Call bonobo_object_release_unref on corba_select_names,
|
||||
not CORBA_Object_release. Otherwise we leak stuff all over the
|
||||
place. (Bug #11878)
|
||||
|
||||
* e-msg-composer.c (e_msg_composer_new_with_message): If our message
|
||||
doesn't contain an X-Evolution-Account header, pass in the From
|
||||
header as the account name. (Fixes the other half of #3255)
|
||||
|
||||
2001-10-10 Larry Ewing <lewing@ximian.com>
|
||||
|
||||
* e-msg-composer.h: add prototype.
|
||||
|
||||
@ -497,9 +497,8 @@ destroy (GtkObject *object)
|
||||
|
||||
if (priv->corba_select_names != CORBA_OBJECT_NIL) {
|
||||
CORBA_Environment ev;
|
||||
|
||||
CORBA_exception_init (&ev);
|
||||
CORBA_Object_release (priv->corba_select_names, &ev);
|
||||
bonobo_object_release_unref (priv->corba_select_names, &ev);
|
||||
CORBA_exception_free (&ev);
|
||||
}
|
||||
|
||||
@ -770,7 +769,10 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
|
||||
|
||||
omenu = GTK_OPTION_MENU (hdrs->priv->from.entry);
|
||||
|
||||
default_account = mail_config_get_default_account_num ();
|
||||
if (account_name)
|
||||
default_account = -1;
|
||||
else
|
||||
default_account = mail_config_get_default_account_num ();
|
||||
|
||||
/* find the item that represents the account and activate it */
|
||||
l = hdrs->priv->from_options;
|
||||
@ -779,8 +781,9 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs,
|
||||
item = l->data;
|
||||
|
||||
account = gtk_object_get_data (GTK_OBJECT (item), "account");
|
||||
if ((account_name && !strcmp (account_name, account->name)) ||
|
||||
(!account_name && i == default_account)) {
|
||||
if (i == default_account ||
|
||||
(account_name && ((account->name && !strcmp (account_name, account->name))
|
||||
|| (account->id->address && strstr (account_name, account->id->address))))) {
|
||||
/* set the correct optionlist item */
|
||||
gtk_option_menu_set_history (omenu, i);
|
||||
gtk_signal_emit_by_name (GTK_OBJECT (item), "activate", hdrs);
|
||||
|
||||
@ -2710,6 +2710,9 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg)
|
||||
while (*account_name && isspace ((unsigned) *account_name))
|
||||
account_name++;
|
||||
}
|
||||
if (account_name == NULL) {
|
||||
account_name = camel_medium_get_header (CAMEL_MEDIUM (msg), "From");
|
||||
}
|
||||
|
||||
e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user