diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-10 11:15:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-13 22:49:05 +0800 |
commit | be8ee5393471a83b24aed4de1669afd723cb3168 (patch) | |
tree | f8a8e50d3830ec32f83fd2fa7e8815ebfc8316dc /mail/em-folder-tree-model.h | |
parent | ed0cdbd79042a962ec229f739b4c3284b00a4dc0 (diff) | |
download | gsoc2013-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 'mail/em-folder-tree-model.h')
-rw-r--r-- | mail/em-folder-tree-model.h | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h index 418248acd6..f8952d0982 100644 --- a/mail/em-folder-tree-model.h +++ b/mail/em-folder-tree-model.h @@ -24,7 +24,6 @@ #define EM_FOLDER_TREE_MODEL_H #include <gtk/gtk.h> -#include <libxml/tree.h> #include <camel/camel-store.h> #include <libedataserver/e-account-list.h> #include <mail/e-mail-shell-backend.h> @@ -64,6 +63,7 @@ enum { COL_UINT_UNREAD, /* unread count */ COL_UINT_FLAGS, /* FolderInfo.flags */ + COL_BOOL_EXPANDED, /* node is expanded in sidebar */ COL_BOOL_IS_STORE, /* toplevel store node? */ COL_BOOL_IS_FOLDER, /* folder (not a store) */ COL_BOOL_LOAD_SUBDIRS, /* %TRUE only if the store/folder @@ -93,9 +93,6 @@ struct _EMFolderTreeModel { GtkTreeStore parent; EMFolderTreeModelPrivate *priv; - gchar *filename; /* state filename */ - xmlDocPtr state; /* saved expanded state from previous session */ - GHashTable *store_hash; /* maps CamelStore's to store-info's */ GHashTable *uri_hash; /* maps URI's to GtkTreeRowReferences */ @@ -120,9 +117,6 @@ struct _EMFolderTreeModelClass { void (* folder_added) (EMFolderTreeModel *model, const gchar *path, const gchar *uri); - - void (* store_added) (EMFolderTreeModel *model, - const gchar *uri); }; @@ -142,20 +136,6 @@ void em_folder_tree_model_remove_store (EMFolderTreeModel *model, CamelStore *st void em_folder_tree_model_remove_folders (EMFolderTreeModel *model, struct _EMFolderTreeModelStoreInfo *si, GtkTreeIter *toplevel); -gchar *em_folder_tree_model_get_selected (EMFolderTreeModel *model); -void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const gchar *uri); - -gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const gchar *key); -void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const gchar *key, gboolean expanded); - -gboolean em_folder_tree_model_get_expanded_uri (EMFolderTreeModel *model, const gchar *uri); -void em_folder_tree_model_set_expanded_uri (EMFolderTreeModel *model, const gchar *uri, gboolean expanded); - -void em_folder_tree_model_save_state (EMFolderTreeModel *model); - -typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const gchar *path, gpointer user_data); -void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, gpointer user_data); - void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *store, const gchar *path, gint unread); gboolean em_folder_tree_model_is_type_inbox (EMFolderTreeModel *model, CamelStore *store, const gchar *full); gchar * em_folder_tree_model_get_folder_name (EMFolderTreeModel *model, CamelStore *store, const gchar *full); |