aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-tree.c17
2 files changed, 17 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index bf7b82db4b..81a278d1bc 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2003-12-03 JP Rosevear <jpr@ximian.com>
+
+ * em-folder-tree.c (em_folder_tree_destroy): save the state
+ immediately if there is a timeout set
+ (em_folder_tree_save_state): be true GSourceFunc and just return
+ FALSE to remove the source
+
2003-12-03 Not Zed <NotZed@Ximian.com>
* mail-autofilter.c (rule_match_thread): changed to setup the rule
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index aac98704c1..ef8b486a1b 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -319,6 +319,12 @@ em_folder_tree_destroy (GtkObject *obj)
priv->loading_row_id = 0;
}
+ if (priv->save_state_id != 0) {
+ em_folder_tree_save_state (emft);
+ g_source_remove (priv->save_state_id);
+ priv->save_state_id = 0;
+ }
+
priv->treeview = NULL;
priv->model = NULL;
@@ -1663,17 +1669,14 @@ em_folder_tree_get_model (EMFolderTree *emft)
}
-static void
+static gboolean
em_folder_tree_save_state (EMFolderTree *emft)
{
struct _EMFolderTreePrivate *priv = emft->priv;
-
- if (priv->save_state_id != 0) {
- g_source_remove (priv->save_state_id);
- priv->save_state_id = 0;
- }
-
+
em_folder_tree_model_save_expanded (priv->model);
+
+ return FALSE
}