diff options
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-storage.c | 19 |
2 files changed, 24 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 93a004602d..e84af7105c 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2002-09-17 Ettore Perazzoli <ettore@ximian.com> + + * e-storage.c (e_storage_removed_folder): When a highlighted + folder gets removed, update the parent to not have a highlight. + [#24062] + 2002-09-16 Ettore Perazzoli <ettore@ximian.com> * evolution-nognome.in: New script to run Evolution under a diff --git a/shell/e-storage.c b/shell/e-storage.c index 5983f7c535..8db704883b 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -683,6 +683,8 @@ e_storage_removed_folder (EStorage *storage, const char *path) { EStoragePrivate *priv; + EFolder *folder; + const char *p; g_return_val_if_fail (storage != NULL, FALSE); g_return_val_if_fail (E_IS_STORAGE (storage), FALSE); @@ -691,9 +693,24 @@ e_storage_removed_folder (EStorage *storage, priv = storage->priv; - if (e_folder_tree_get_folder (priv->folder_tree, path) == NULL) + folder = e_folder_tree_get_folder (priv->folder_tree, path); + if (folder == NULL) return FALSE; + p = strrchr (path, '/'); + if (p != NULL && p != path) { + EFolder *parent_folder; + char *parent_path; + + parent_path = g_strndup (path, p - path); + parent_folder = e_folder_tree_get_folder (priv->folder_tree, parent_path); + + if (e_folder_get_highlighted (folder)) + e_folder_set_child_highlight (parent_folder, FALSE); + + g_free (parent_path); + } + gtk_signal_emit (GTK_OBJECT (storage), signals[REMOVED_FOLDER], path); e_folder_tree_remove (priv->folder_tree, path); |