From be8ee5393471a83b24aed4de1669afd723cb3168 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 9 Jun 2009 23:15:20 -0400 Subject: Use key files for tracking widget states. Each EShellView now maintains a GKeyFile for recording disposable widget state such as tree view path expansion, scroll bar positions, combo box selections, etc. The EShellView records changes to the key file to ~/.evolution//config/state, and automatically restores the GKeyFile at startup. Currently only the mailer uses the key file, but it's intended to serve all shell views. It replaces the use of Camel "cmeta" files, as well as "et-expanded-*" and "folder-tree-expand-state.xml" files. Also, the mailer's folder tree model now includes a column for tracking which sidebar folders are expanded. Folder tree widgets appearing in dialog windows can copy the sidebar's expanded state using em_folder_tree_clone_expanded(). --- mail/em-composer-utils.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mail/em-composer-utils.c') diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 74438b2043..6c35a4e7e8 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -117,8 +117,6 @@ emcs_set_drafts_info (struct emcs_t *emcs, camel_object_ref (drafts_folder); emcs->drafts_folder = drafts_folder; emcs->drafts_uid = g_strdup (drafts_uid); - - g_debug ("%s", G_STRFUNC); } static void @@ -141,8 +139,6 @@ emcs_set_folder_info (struct emcs_t *emcs, emcs->uid = g_strdup (uid); emcs->flags = flags; emcs->set = set; - - g_debug ("%s", G_STRFUNC); } static void @@ -2412,8 +2408,9 @@ post_header_clicked_cb (EComposerPostHeader *header, model = e_mail_shell_backend_get_folder_tree_model (mail_shell_backend); folder_tree = em_folder_tree_new_with_model (model); - em_folder_tree_set_multiselect ( - EM_FOLDER_TREE (folder_tree), TRUE); + em_folder_tree_clone_expanded (EM_FOLDER_TREE (folder_tree)); + em_folder_tree_set_multiselect (EM_FOLDER_TREE (folder_tree), TRUE); + em_folder_tree_set_excluded ( EM_FOLDER_TREE (folder_tree), EMFT_EXCLUDE_NOSELECT | -- cgit