diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-09-18 00:23:45 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-09-18 00:23:45 +0800 |
commit | c395aaafd6c16e5b35c681db650dcc91eea78a70 (patch) | |
tree | 1efdc929c1ba25923aad7a4291d02fe319e4f6d6 | |
parent | 27a4ae413001ad90d7fbcbe58414a7796a092281 (diff) | |
download | gsoc2013-evolution-c395aaafd6c16e5b35c681db650dcc91eea78a70.tar.gz gsoc2013-evolution-c395aaafd6c16e5b35c681db650dcc91eea78a70.tar.zst gsoc2013-evolution-c395aaafd6c16e5b35c681db650dcc91eea78a70.zip |
(e_storage_removed_folder): When a highlighted
folder gets removed, update the parent to not have a highlight.
[#24062]
svn path=/trunk/; revision=18085
-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); |