aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-25 04:12:47 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-25 04:12:47 +0800
commit49bad5e10fbf9a6f084d53ff1076df4f10aff049 (patch)
tree1b7d7ce712ac52086b96abcaa8d428cc038bd303 /mail/mail-config.c
parent1ec137b9d68f02523919059d9bc4c22dea581c07 (diff)
downloadgsoc2013-evolution-49bad5e10fbf9a6f084d53ff1076df4f10aff049.tar
gsoc2013-evolution-49bad5e10fbf9a6f084d53ff1076df4f10aff049.tar.gz
gsoc2013-evolution-49bad5e10fbf9a6f084d53ff1076df4f10aff049.tar.bz2
gsoc2013-evolution-49bad5e10fbf9a6f084d53ff1076df4f10aff049.tar.lz
gsoc2013-evolution-49bad5e10fbf9a6f084d53ff1076df4f10aff049.tar.xz
gsoc2013-evolution-49bad5e10fbf9a6f084d53ff1076df4f10aff049.tar.zst
gsoc2013-evolution-49bad5e10fbf9a6f084d53ff1076df4f10aff049.zip
Do a case-insensitive comparison. (mail_generate_reply): Only resort to
2001-07-24 Jeffrey Stedfast <fejj@ximian.com> * mail-callbacks.c (guess_me): Do a case-insensitive comparison. (mail_generate_reply): Only resort to the source account's identity if we can't find out which identity to use based on the recipients of the message first. * mail-config.c (mail_config_get_default_account): Make sure to return the 0th account if we don't have a default. We don't want to return NULL. * mail-callbacks.c (empty_trash): Use mail_tool_get_trash for the remote store trash folders. * mail-tools.c (mail_tool_get_trash): New convenience function. svn path=/trunk/; revision=11353
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index ada42089ec..080b8e46e0 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1266,21 +1266,21 @@ mail_config_set_default_charset (const char *charset)
const MailConfigAccount *
mail_config_get_default_account (void)
{
- const MailConfigAccount *account;
- GSList *l;
MailConfigAccount *retval;
if (!config->accounts)
return NULL;
-
+
retval = g_slist_nth_data (config->accounts,
config->default_account);
-
+
/* Looks like we have no default, so make the first account
the default */
- if (retval == NULL)
+ if (retval == NULL) {
mail_config_set_default_account_num (0);
-
+ retval = config->accounts->data;
+ }
+
return retval;
}
@@ -1367,13 +1367,12 @@ mail_config_set_default_account_num (gint new_default)
void
mail_config_set_default_account (const MailConfigAccount *account)
{
- GSList *node = config->accounts;
- gint position = 0;
-
+ int position;
+
position = g_slist_index (config->accounts, (void*)account);
-
+
config->default_account = position;
-
+
return;
}