From e335802981396bacf6d20a2168853d94ba15df9c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 5 Nov 2007 11:49:53 +0000 Subject: ** Fix for bug #343011 (restore collapse state of selected folder after 2007-11-05 Milan Crha ** Fix for bug #343011 (restore collapse state of selected folder after start) * em-folder-tree.c: (emft_maybe_expand_row): Do not expand subtree of a node, only make it visible. * em-folder-tree-model.h: (em_folder_tree_model_get_expanded_uri), (em_folder_tree_model_set_expanded_uri): * em-folder-tree-model.c: (em_folder_tree_model_get_expanded_uri), (em_folder_tree_model_set_expanded_uri): Same as ..._get/_set_expanded, but using 'uri', instead of 'key'. * em-folder-tree-model.c: (emftm_uri_to_key): New helper function. * mail-component.c: (impl_createView): Restore collapsed state after selecting last selected folder, if necessary. svn path=/trunk/; revision=34503 --- mail/mail-component.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mail/mail-component.c') diff --git a/mail/mail-component.c b/mail/mail-component.c index 04198ecfb6..9237a1793d 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -699,8 +699,15 @@ impl_createView (PortableServer_Servant servant, em_folder_tree_enable_drag_and_drop ((EMFolderTree *) tree_widget); if ((uri = em_folder_tree_model_get_selected (priv->model))) { + gboolean expanded; + + expanded = em_folder_tree_model_get_expanded_uri (priv->model, uri); em_folder_tree_set_selected ((EMFolderTree *) tree_widget, uri, FALSE); em_folder_view_set_folder_uri ((EMFolderView *) view_widget, uri); + + if (!expanded) + em_folder_tree_model_set_expanded_uri (priv->model, uri, expanded); + g_free (uri); } -- cgit