diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-10-11 04:47:46 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-10-11 04:47:46 +0800 |
commit | 7e628d1745b79a7af4529d9cb2c2957613e1328a (patch) | |
tree | 1a1099c14f09bd0dcb903f1a0068ba821939c4b1 /composer/e-msg-composer-hdrs.c | |
parent | 484c8193e1ae11a967e002b132dd04fa8b4e460d (diff) | |
download | gsoc2013-evolution-7e628d1745b79a7af4529d9cb2c2957613e1328a.tar.gz gsoc2013-evolution-7e628d1745b79a7af4529d9cb2c2957613e1328a.tar.zst gsoc2013-evolution-7e628d1745b79a7af4529d9cb2c2957613e1328a.zip |
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
Diffstat (limited to 'composer/e-msg-composer-hdrs.c')
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index 90bbddd941..ec08a94f7a 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -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); |