aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-02-16 01:38:54 +0800
committerDan Winship <danw@src.gnome.org>2001-02-16 01:38:54 +0800
commitbd655cb765f3ad19b68ab188dd95d07b0fbad216 (patch)
treee3b6f29b37aff995c18dffd5c6ab62df4c2c0d13 /composer
parent1e18d9fb96e4f893b8f5a768af9ab0579208274d (diff)
downloadgsoc2013-evolution-bd655cb765f3ad19b68ab188dd95d07b0fbad216.tar.gz
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')
-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