aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--my-evolution/ChangeLog9
-rw-r--r--my-evolution/e-summary-mail.c4
-rw-r--r--my-evolution/e-summary-preferences.c23
3 files changed, 28 insertions, 8 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index deb7798445..c57f6b0449 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,5 +1,14 @@
2001-06-29 Iain Holmes <iain@ximian.com>
+ * e-summary-preferences.c (property_box_destroy_cb): Hook up the saving.
+ (str_list_from_vector): Fix memory corruption.
+ (e_summary_preferences_save): Write the preferences out to disk.
+ I *always* forget that.
+
+ * e-summary-mail.c (e_summary_mail_init): Init ->shown to NULL.
+
+2001-06-29 Iain Holmes <iain@ximian.com>
+
* e-summary-preferences.c: Do everything preferences related.
* my-evolution.glade: Glade file for the preferences box.
diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c
index f8a3f68f7e..2453a93d6a 100644
--- a/my-evolution/e-summary-mail.c
+++ b/my-evolution/e-summary-mail.c
@@ -137,7 +137,7 @@ new_folder_cb (EvolutionStorageListener *listener,
ESummaryMailFolder *mail_folder;
GList *p;
- /* Don't care about none mail */
+ /* Don't care about non mail */
if (strcmp (folder->type, "mail") != 0 ||
strncmp (folder->physical_uri, "file://", 7) != 0) {
return;
@@ -249,6 +249,7 @@ e_summary_mail_init (ESummary *summary,
mail = g_new (ESummaryMail, 1);
summary->mail = mail;
+
CORBA_exception_init (&ev);
mail->folder_info = oaf_activate_from_id (MAIL_IID, 0, NULL, &ev);
if (BONOBO_EX (&ev)) {
@@ -262,6 +263,7 @@ e_summary_mail_init (ESummary *summary,
/* Create a hash table for the folders */
mail->folders = g_hash_table_new (g_str_hash, g_str_equal);
+ mail->shown = NULL;
/* Create a BonoboListener for all the notifies. */
mail->listener = bonobo_listener_new (NULL, NULL);
diff --git a/my-evolution/e-summary-preferences.c b/my-evolution/e-summary-preferences.c
index 939c31ba26..8611109944 100644
--- a/my-evolution/e-summary-preferences.c
+++ b/my-evolution/e-summary-preferences.c
@@ -84,9 +84,9 @@ static GList *
str_list_from_vector (const char *vector)
{
GList *strlist = NULL;
- char **tokens;
+ char **tokens, **t;
- tokens = g_strsplit (vector, " ", 8196);
+ t = tokens = g_strsplit (vector, " ", 8196);
if (tokens == NULL) {
return NULL;
@@ -96,7 +96,7 @@ str_list_from_vector (const char *vector)
strlist = g_list_prepend (strlist, g_strdup (*tokens));
}
- g_strfreev (tokens);
+ g_strfreev (t);
strlist = g_list_reverse (strlist);
return strlist;
@@ -152,7 +152,7 @@ e_summary_preferences_restore (ESummaryPrefs *prefs)
prefs->weather_refresh_time = gnome_config_get_int ("weather_refresh_time");
gnome_config_pop_prefix ();
- key = g_strdup_printf ("=%s=/Schedule", evolution_dir);
+ key = g_strdup_printf ("=%s=/Schedule/", evolution_dir);
gnome_config_push_prefix (key);
g_free (key);
@@ -173,6 +173,7 @@ e_summary_preferences_save (ESummaryPrefs *prefs)
g_return_if_fail (prefs != NULL);
+ g_print ("Saving stuff\n");
evolution_dir = gnome_util_prepend_user_home ("evolution/config/my-evolution");
key = g_strdup_printf ("=%s=/Mail/", evolution_dir);
gnome_config_push_prefix (key);
@@ -210,7 +211,7 @@ e_summary_preferences_save (ESummaryPrefs *prefs)
gnome_config_set_int ("weather_refresh_time", prefs->weather_refresh_time);
gnome_config_pop_prefix ();
- key = g_strdup_printf ("=%s=/Schedule", evolution_dir);
+ key = g_strdup_printf ("=%s=/Schedule/", evolution_dir);
gnome_config_push_prefix (key);
g_free (key);
@@ -218,6 +219,10 @@ e_summary_preferences_save (ESummaryPrefs *prefs)
gnome_config_set_int ("show_tasks", prefs->show_tasks);
gnome_config_pop_prefix ();
+
+ gnome_config_sync ();
+ gnome_config_drop_all ();
+
g_free (evolution_dir);
}
@@ -956,8 +961,6 @@ property_box_clicked_cb (GnomeDialog *dialog,
{
if (page_num == -1) {
e_summary_reconfigure (pd->summary);
- e_summary_preferences_free (pd->summary->old_prefs);
- pd->summary->old_prefs = NULL;
}
}
@@ -965,6 +968,12 @@ static void
property_box_destroy_cb (GtkObject *object,
PropertyData *pd)
{
+ if (pd->summary->old_prefs != NULL) {
+ e_summary_preferences_free (pd->summary->old_prefs);
+ pd->summary->old_prefs = NULL;
+ }
+
+ e_summary_preferences_save (pd->summary->preferences);
free_property_dialog (pd);
}