aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-12-03 23:30:43 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-12-03 23:30:43 +0800
commit09c5eeed505f4221e96abab1c1f954542e7401c8 (patch)
tree0d5ac114437b5eddb1072783fe326413789608ad /mail/em-folder-tree.c
parent33efd90a82fbbbfb3f7645a149cfbfed471596fb (diff)
downloadgsoc2013-evolution-09c5eeed505f4221e96abab1c1f954542e7401c8.tar.gz
gsoc2013-evolution-09c5eeed505f4221e96abab1c1f954542e7401c8.tar.zst
gsoc2013-evolution-09c5eeed505f4221e96abab1c1f954542e7401c8.zip
save the state immediately if there is a timeout set
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 svn path=/trunk/; revision=23593
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c17
1 files changed, 10 insertions, 7 deletions
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
}