aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-12 13:27:52 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-12 13:27:52 +0800
commit2f9fd80fc095224ff91fa43953d8a8d5f284a336 (patch)
tree1365b3130671d7c8b3ac04c72d47cbc33c99a64f /mail/mail-config.c
parent6ea77903b10c8da838293e5a81076400430ac4c2 (diff)
downloadgsoc2013-evolution-2f9fd80fc095224ff91fa43953d8a8d5f284a336.tar
gsoc2013-evolution-2f9fd80fc095224ff91fa43953d8a8d5f284a336.tar.gz
gsoc2013-evolution-2f9fd80fc095224ff91fa43953d8a8d5f284a336.tar.bz2
gsoc2013-evolution-2f9fd80fc095224ff91fa43953d8a8d5f284a336.tar.lz
gsoc2013-evolution-2f9fd80fc095224ff91fa43953d8a8d5f284a336.tar.xz
gsoc2013-evolution-2f9fd80fc095224ff91fa43953d8a8d5f284a336.tar.zst
gsoc2013-evolution-2f9fd80fc095224ff91fa43953d8a8d5f284a336.zip
New convenience function that I will need later when I redo the composer
2001-01-12 Jeffrey Stedfast <fejj@ximian.com> * mail-config.c (mail_config_get_account_by_name): New convenience function that I will need later when I redo the composer From field. svn path=/trunk/; revision=7435
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index f238207d79..c5ba93f4a1 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -521,6 +521,7 @@ mail_config_get_default_account (void)
account = l->data;
if (account->default_account)
return account;
+
l = l->next;
}
@@ -531,6 +532,25 @@ mail_config_get_default_account (void)
return account;
}
+const MailConfigAccount *
+mail_config_get_account_by_name (const char *account_name)
+{
+ /* FIXME: this should really use a hash */
+ const MailConfigAccount *account;
+ GSList *l;
+
+ l = config->accounts;
+ while (l) {
+ account = l->data;
+ if (!strcmp (account->name, account_name))
+ return account;
+
+ l = l->next;
+ }
+
+ return NULL;
+}
+
const GSList *
mail_config_get_accounts (void)
{