aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog10
-rw-r--r--composer/e-msg-composer-hdrs.c8
-rw-r--r--composer/e-msg-composer.c3
3 files changed, 16 insertions, 5 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 5d6819c395..258d58ddcf 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,13 @@
+2001-02-15 Dan Winship <danw@ximian.com>
+
+ * 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).
+
2001-02-13 Jeffrey Stedfast <fejj@ximian.com>
* evolution-composer.c (corba_recipientlist_to_glist): Use the
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;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 92249af5bb..da370614cd 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2046,7 +2046,8 @@ e_msg_composer_show_attachments (EMsgComposer *composer,
/**
* e_msg_composer_set_headers:
* @composer: a composer object
- * @from: the name of the account the user will send from
+ * @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