aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-01-15 06:24:27 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-01-15 06:24:27 +0800
commitbf4a0dab77e39d4178d4f55dfce4c2839ba31a3e (patch)
tree5d98addc2267977a75eace39ae271a94914a0379 /mail/mail-config.c
parent0f1117954123779f282c9a71852bb195e9b2ed64 (diff)
downloadgsoc2013-evolution-bf4a0dab77e39d4178d4f55dfce4c2839ba31a3e.tar.gz
gsoc2013-evolution-bf4a0dab77e39d4178d4f55dfce4c2839ba31a3e.tar.zst
gsoc2013-evolution-bf4a0dab77e39d4178d4f55dfce4c2839ba31a3e.zip
Call mail_config_save_accounts ().
2003-01-14 Jeffrey Stedfast <fejj@ximian.com> * mail-account-gui.c (mail_account_gui_save): Call mail_config_save_accounts (). * mail-config.c (mail_config_save_accounts): New function to save accounts without having to re-load them. svn path=/trunk/; revision=19464
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 6017da17b6..ae2391b8f8 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -78,6 +78,7 @@ typedef struct {
gboolean corrupt;
GSList *accounts;
+ guint accounts_notify_id;
GHashTable *threaded_hash;
@@ -631,6 +632,17 @@ accounts_save (void)
gconf_client_suggest_sync (config->gconf, NULL);
}
+void
+mail_config_save_accounts (void)
+{
+ gconf_client_notify_remove (config->gconf, config->accounts_notify_id);
+
+ accounts_save ();
+
+ config->accounts_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/accounts",
+ accounts_changed, NULL, NULL, NULL);
+}
+
/* Config struct routines */
void
mail_config_init (void)
@@ -644,8 +656,8 @@ mail_config_init (void)
gconf_client_add_dir (config->gconf, "/apps/evolution/mail/accounts",
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_notify_add (config->gconf, "/apps/evolution/mail/accounts",
- accounts_changed, NULL, NULL, NULL);
+ config->accounts_notify_id = gconf_client_notify_add (config->gconf, "/apps/evolution/mail/accounts",
+ accounts_changed, NULL, NULL, NULL);
config_read ();
}
@@ -1198,7 +1210,7 @@ mail_config_add_account (MailConfigAccount *account)
{
config->accounts = g_slist_append (config->accounts, account);
- accounts_save ();
+ mail_config_save_accounts ();
}
const GSList *
@@ -1222,7 +1234,7 @@ mail_config_remove_account (MailConfigAccount *account)
config->accounts = g_slist_remove (config->accounts, account);
account_destroy (account);
- accounts_save ();
+ mail_config_save_accounts ();
return config->accounts;
}