aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-10 11:15:20 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-13 22:49:05 +0800
commitbe8ee5393471a83b24aed4de1669afd723cb3168 (patch)
treef8a8e50d3830ec32f83fd2fa7e8815ebfc8316dc /plugins
parented0cdbd79042a962ec229f739b4c3284b00a4dc0 (diff)
downloadgsoc2013-evolution-be8ee5393471a83b24aed4de1669afd723cb3168.tar
gsoc2013-evolution-be8ee5393471a83b24aed4de1669afd723cb3168.tar.gz
gsoc2013-evolution-be8ee5393471a83b24aed4de1669afd723cb3168.tar.bz2
gsoc2013-evolution-be8ee5393471a83b24aed4de1669afd723cb3168.tar.lz
gsoc2013-evolution-be8ee5393471a83b24aed4de1669afd723cb3168.tar.xz
gsoc2013-evolution-be8ee5393471a83b24aed4de1669afd723cb3168.tar.zst
gsoc2013-evolution-be8ee5393471a83b24aed4de1669afd723cb3168.zip
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/<shell-backend>/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().
Diffstat (limited to 'plugins')
-rw-r--r--plugins/groupwise-features/install-shared.c2
-rw-r--r--plugins/groupwise-features/share-folder-common.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c
index 67b1b5bdee..e9fd927894 100644
--- a/plugins/groupwise-features/install-shared.c
+++ b/plugins/groupwise-features/install-shared.c
@@ -166,6 +166,8 @@ accept_clicked(GnomeDruidPage *page, GtkWidget *druid, CamelMimeMessage *msg)
accept_data = g_new0(struct AcceptData, 1);
model = mail_component_peek_tree_model (NULL);
folder_tree = (EMFolderTree *) em_folder_tree_new_with_model (model);
+ em_folder_tree_clone_expanded (folder_tree);
+
dialog = em_folder_selector_create_new (folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
uri = em_folder_tree_get_selected_uri(folder_tree);
em_folder_selector_set_selected ((EMFolderSelector *) dialog, uri);
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
index 50bb6fccf3..900d949251 100644
--- a/plugins/groupwise-features/share-folder-common.c
+++ b/plugins/groupwise-features/share-folder-common.c
@@ -383,6 +383,8 @@ create_shared_folder(EPopup *ep, EPopupItem *p, gpointer data)
model = mail_component_peek_tree_model (mail_component_peek ());
folder_tree = (EMFolderTree *) em_folder_tree_new_with_model (model);
+ em_folder_tree_clone_expanded (folder_tree);
+
dialog = em_folder_selector_create_new (folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
uri = em_folder_tree_get_selected_uri(folder_tree);
em_folder_selector_set_selected ((EMFolderSelector *) dialog, uri);