aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-06-26 23:09:06 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-06-26 23:09:06 +0800
commit04ae8da71652411c155777caecd2a59701d1067b (patch)
tree32347c8b771f15aaa7353cf9c5ddbadff3bf8b79 /mail/mail-config.c
parent9c1dcd7eaa786f6f05602a539c39e47516a86d9c (diff)
downloadgsoc2013-evolution-04ae8da71652411c155777caecd2a59701d1067b.tar.gz
gsoc2013-evolution-04ae8da71652411c155777caecd2a59701d1067b.tar.zst
gsoc2013-evolution-04ae8da71652411c155777caecd2a59701d1067b.zip
Read in the default show_preview value. (mail_config_write_on_exit): Save
2001-06-26 Jeffrey Stedfast <fejj@ximian.com> * mail-config.c (config_read): Read in the default show_preview value. (mail_config_write_on_exit): Save the default show_preview value as well as saving the individual settings for each URI that has been changed. svn path=/trunk/; revision=10500
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 1bf052fa5b..48e8fe0182 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -464,6 +464,14 @@ config_read (void)
config->thread_list = FALSE;
g_free (str);
+ /* Show Message Preview */
+ str = g_strdup_printf ("=%s/config/Mail=/Display/preview_pane",
+ evolution_dir);
+ config->show_preview = gnome_config_get_bool_with_default (str, &def);
+ if (def)
+ config->show_preview = TRUE;
+ g_free (str);
+
/* Hide deleted automatically */
str = g_strdup_printf ("=%s/config/Mail=/Display/hide_deleted",
evolution_dir);
@@ -667,11 +675,11 @@ mail_config_write (void)
}
static gboolean
-threaded_save_state (gpointer key, gpointer value, gpointer user_data)
+hash_save_state (gpointer key, gpointer value, gpointer user_data)
{
- gboolean threaded = GPOINTER_TO_INT (value);
+ gboolean bool = GPOINTER_TO_INT (value);
- gnome_config_set_bool ((char *) key, threaded);
+ gnome_config_set_bool ((char *) key, bool);
g_free (key);
return TRUE;
@@ -690,6 +698,12 @@ mail_config_write_on_exit (void)
gnome_config_set_bool (str, config->thread_list);
g_free (str);
+ /* Show Message Preview */
+ str = g_strdup_printf ("=%s/config/Mail=/Display/preview_pane",
+ evolution_dir);
+ gnome_config_set_bool (str, config->show_preview);
+ g_free (str);
+
/* Hide deleted automatically */
str = g_strdup_printf ("=%s/config/Mail=/Display/hide_deleted",
evolution_dir);
@@ -777,7 +791,15 @@ mail_config_write_on_exit (void)
gnome_config_push_prefix (str);
g_free (str);
- g_hash_table_foreach_remove (config->threaded_hash, threaded_save_state, NULL);
+ g_hash_table_foreach_remove (config->threaded_hash, hash_save_state, NULL);
+
+ gnome_config_pop_prefix ();
+
+ str = g_strdup_printf ("=%s/config/Mail=/Preview/", evolution_dir);
+ gnome_config_push_prefix (str);
+ g_free (str);
+
+ g_hash_table_foreach_remove (config->preview_hash, hash_save_state, NULL);
gnome_config_pop_prefix ();
@@ -1354,7 +1376,8 @@ struct _check_msg {
gboolean *success;
};
-static void check_service_check(struct _mail_msg *mm)
+static void
+check_service_check (struct _mail_msg *mm)
{
struct _check_msg *m = (struct _check_msg *)mm;
CamelService *service = NULL;