diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2004-06-11 06:08:41 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-06-11 06:08:41 +0800 |
commit | cb21428ef8f23891a4870886ed1f9dfec3969a61 (patch) | |
tree | 048652d03889e5dbf1ee916c3e36131dd9833a12 /mail/em-folder-tree-model.h | |
parent | 0678d00b52c75cc685dd64a82c77c5adb4b5be71 (diff) | |
download | gsoc2013-evolution-cb21428ef8f23891a4870886ed1f9dfec3969a61.tar.gz gsoc2013-evolution-cb21428ef8f23891a4870886ed1f9dfec3969a61.tar.zst gsoc2013-evolution-cb21428ef8f23891a4870886ed1f9dfec3969a61.zip |
Fixes bug #58825. Ugh. Really Gross Hack (tm).
2004-06-10 Jeffrey Stedfast <fejj@novell.com>
Fixes bug #58825. Ugh. Really Gross Hack (tm).
* em-folder-tree.c (emft_tree_row_expanded): If the store that we
are expanding matches the uri that we've been requested to select
(e.g. from before the store was added to the tree), then give the
uri to the get_folder_info_op.
(em_folder_tree_set_selected): If the store for the uri isn't in
the tree yet, save the uri for later.
* mail-component.c (folder_selected_cb): Set the selected state of
the folder-tree and save it.
(impl_createControls): Restore the selected state on the
folder-tree.
* em-folder-tree-model.c (em_folder_tree_model_set_selected): New
function to set the selected-uri saved state.
(em_folder_tree_model_get_selected): New function to get the
selected uri saved state.
(em_folder_tree_model_save_state): Renamed.
* em-folder-tree.c (emft_update_model_expanded_state): Don't let
path be NULL if the node is a store node (path == NULL for any
other case is a bug).
(emft_maybe_expand_row): Same.
svn path=/trunk/; revision=26294
Diffstat (limited to 'mail/em-folder-tree-model.h')
-rw-r--r-- | mail/em-folder-tree-model.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h index 83d2490c36..db46741657 100644 --- a/mail/em-folder-tree-model.h +++ b/mail/em-folder-tree-model.h @@ -84,7 +84,7 @@ struct _EMFolderTreeModel { GtkTreeStore parent_object; char *filename; /* state filename */ - xmlDocPtr expanded; /* saved expanded state from previous session */ + 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 */ @@ -103,13 +103,16 @@ struct _EMFolderTreeModelClass { GtkTreePath *path, GtkTreeIter *iter); - void (* loaded_row) (EMFolderTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter); + void (* loaded_row) (EMFolderTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter); void (* folder_added) (EMFolderTreeModel *model, const char *path, const char *uri); + + void (* store_added) (EMFolderTreeModel *model, + const char *uri); }; @@ -128,9 +131,13 @@ 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); +char *em_folder_tree_model_get_selected (EMFolderTreeModel *model); +void em_folder_tree_model_set_selected (EMFolderTreeModel *model, const char *uri); + gboolean em_folder_tree_model_get_expanded (EMFolderTreeModel *model, const char *key); void em_folder_tree_model_set_expanded (EMFolderTreeModel *model, const char *key, gboolean expanded); -void em_folder_tree_model_save_expanded (EMFolderTreeModel *model); + +void em_folder_tree_model_save_state (EMFolderTreeModel *model); typedef void (* EMFTModelExpandFunc) (EMFolderTreeModel *model, const char *path, void *user_data); void em_folder_tree_model_expand_foreach (EMFolderTreeModel *model, EMFTModelExpandFunc func, void *user_data); |