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
This commit is contained in:
Federico Mena Quintero
2001-11-30 01:41:27 +00:00
committed by Federico Mena Quintero
parent 57d95cb3b7
commit 8f5cd24b3e
2 changed files with 30 additions and 1 deletions

View File

@ -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),