aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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
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')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-account-gui.c1
-rw-r--r--mail/mail-config.c20
-rw-r--r--mail/mail-config.h1
4 files changed, 26 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 675d2050d1..e3ce6c3bc3 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2003-01-14 Radek Doulik <rodo@ximian.com>
* folder-browser.c (etree_key): use gtk_scrolled_window_*
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 73a341fa57..cf9285f154 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1963,6 +1963,7 @@ mail_account_gui_save (MailAccountGui *gui)
if (gtk_toggle_button_get_active (gui->default_account))
mail_config_set_default_account (account);
+ mail_config_save_accounts ();
mail_config_write_account_sig (account, -1);
mail_autoreceive_setup ();
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;
}
diff --git a/mail/mail-config.h b/mail/mail-config.h
index ab16c992f6..79a6414f91 100644
--- a/mail/mail-config.h
+++ b/mail/mail-config.h
@@ -183,6 +183,7 @@ void mail_config_set_default_account (const MailConfi
const MailConfigIdentity *mail_config_get_default_identity (void);
const MailConfigService *mail_config_get_default_transport (void);
+void mail_config_save_accounts (void);
/* uri's got changed by the store, etc */
void mail_config_uri_renamed(GCompareFunc uri_cmp, const char *old, const char *new);