diff options
author | Dan Winship <danw@src.gnome.org> | 2001-02-16 01:38:54 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-02-16 01:38:54 +0800 |
commit | bd655cb765f3ad19b68ab188dd95d07b0fbad216 (patch) | |
tree | e3b6f29b37aff995c18dffd5c6ab62df4c2c0d13 /composer/e-msg-composer-hdrs.c | |
parent | 1e18d9fb96e4f893b8f5a768af9ab0579208274d (diff) | |
download | gsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.tar gsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.tar.gz gsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.tar.bz2 gsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.tar.lz gsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.tar.xz gsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.tar.zst gsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.zip |
If @account_name is NULL, pick the default account rather than giving a
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account): If
@account_name is NULL, pick the default account rather than giving
a g_warning.
* e-msg-composer.c (e_msg_composer_set_headers): Note in the
doc comment that @from can be NULL if you want the default account
(since there is code that expects this).
svn path=/trunk/; revision=8243
Diffstat (limited to 'composer/e-msg-composer-hdrs.c')
-rw-r--r-- | composer/e-msg-composer-hdrs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c index de6f37477c..3fa0634e52 100644 --- a/composer/e-msg-composer-hdrs.c +++ b/composer/e-msg-composer-hdrs.c @@ -641,10 +641,9 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs, g_return_if_fail (hdrs != NULL); g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs)); - g_return_if_fail (account_name != NULL); - + omenu = GTK_OPTION_MENU (hdrs->priv->from_entry); - + /* find the item that represents the account and activate it */ l = hdrs->priv->from_options; while (l) { @@ -652,7 +651,8 @@ e_msg_composer_hdrs_set_from_account (EMsgComposerHdrs *hdrs, item = l->data; account = gtk_object_get_data (GTK_OBJECT (item), "account"); - if (!strcmp (account_name, account->name)) { + if ((account_name && !strcmp (account_name, account->name)) || + (!account_name && account->default_account)) { gtk_option_menu_set_history (omenu, i); gtk_signal_emit_by_name (GTK_OBJECT (item), "activate", hdrs); return; |