aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-11-30 09:41:27 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-11-30 09:41:27 +0800
commit8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c (patch)
tree186f61a606ab537a678f589d8a8010c969d7e6fe /shell
parent57d95cb3b74694ab500d10ae16f06827b9acf3ff (diff)
downloadgsoc2013-evolution-8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c.tar
gsoc2013-evolution-8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c.tar.gz
gsoc2013-evolution-8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c.tar.bz2
gsoc2013-evolution-8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c.tar.lz
gsoc2013-evolution-8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c.tar.xz
gsoc2013-evolution-8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c.tar.zst
gsoc2013-evolution-8f5cd24b3ec3a36d53fe8b49f97c85421ea2d79c.zip
Fixes bug #3290.
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> svn path=/trunk/; revision=14820
Diffstat (limited to 'shell')
-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),