From 8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 30 Nov 2001 01:41:27 +0000 Subject: Fixes bug #3290. 2001-11-28 Federico Mena Quintero Fixes bug #3290. * e-shell-folder-selection-dialog.c (e_shell_folder_selection_dialog_construct): Use our own filename for the collapsation state of the tree, instead of sharing the one of shell view number 0. (save_expanded_state): New function, saves the collapsation state of the tree. (impl_destroy): Call save_expanded_state(). 2001-11-14 Ettore Perazzoli svn path=/trunk/; revision=14820 --- shell/ChangeLog | 12 ++++++++++++ shell/e-shell-folder-selection-dialog.c | 19 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 4e47ed1469..5d72ac4eb2 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,15 @@ +2001-11-28 Federico Mena Quintero + + Fixes bug #3290. + + * e-shell-folder-selection-dialog.c + (e_shell_folder_selection_dialog_construct): Use our own filename + for the collapsation state of the tree, instead of sharing the one + of shell view number 0. + (save_expanded_state): New function, saves the collapsation state + of the tree. + (impl_destroy): Call save_expanded_state(). + 2001-11-14 Ettore Perazzoli * e-shell-about-box.c: Add more contributors to the box. diff --git a/shell/e-shell-folder-selection-dialog.c b/shell/e-shell-folder-selection-dialog.c index 2fab2077f3..5419da4431 100644 --- a/shell/e-shell-folder-selection-dialog.c +++ b/shell/e-shell-folder-selection-dialog.c @@ -129,6 +129,21 @@ folder_creation_dialog_result_cb (EShell *shell, /* GtkObject methods. */ +/* Saves the expanded state of the tree to a common filename */ +static void +save_expanded_state (EShellFolderSelectionDialog *folder_selection_dialog) +{ + EShellFolderSelectionDialogPrivate *priv; + char *filename; + + priv = folder_selection_dialog->priv; + + filename = g_strdup_printf ("%s/config/storage-set-view-expanded:folder-selection-dialog", + e_shell_get_local_directory (priv->shell)); + e_tree_save_expanded_state (E_TREE (priv->storage_set_view), filename); + g_free (filename); +} + static void impl_destroy (GtkObject *object) { @@ -138,6 +153,8 @@ impl_destroy (GtkObject *object) folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (object); priv = folder_selection_dialog->priv; + save_expanded_state (folder_selection_dialog); + if (priv->storage_set != NULL) gtk_object_unref (GTK_OBJECT (priv->storage_set)); @@ -387,7 +404,7 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s e_storage_set_view_set_allow_dnd (E_STORAGE_SET_VIEW (priv->storage_set_view), FALSE); /* Load the expanded state for this StorageSetView */ - filename = g_strdup_printf ("%s/config/storage-set-view-expanded:view_0", + filename = g_strdup_printf ("%s/config/storage-set-view-expanded:folder-selection-dialog", e_shell_get_local_directory (priv->shell)); e_tree_load_expanded_state (E_TREE (priv->storage_set_view), -- cgit v1.2.3