aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog12
-rw-r--r--shell/e-shell-folder-selection-dialog.c19
2 files changed, 30 insertions, 1 deletions
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 <federico@ximian.com>
+
+ 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 <ettore@ximian.com>
* 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),