aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-02-21 09:42:12 +0800
committerDan Winship <danw@src.gnome.org>2001-02-21 09:42:12 +0800
commit33041e67fcbf0e88b449ea4991d6648b51a84b38 (patch)
tree2f424511831e28538e1624aeedb19237352f9505 /shell/e-storage.c
parentf0e49c7c18dff132093b74ae794f53675ac2d3d0 (diff)
downloadgsoc2013-evolution-33041e67fcbf0e88b449ea4991d6648b51a84b38.tar
gsoc2013-evolution-33041e67fcbf0e88b449ea4991d6648b51a84b38.tar.gz
gsoc2013-evolution-33041e67fcbf0e88b449ea4991d6648b51a84b38.tar.bz2
gsoc2013-evolution-33041e67fcbf0e88b449ea4991d6648b51a84b38.tar.lz
gsoc2013-evolution-33041e67fcbf0e88b449ea4991d6648b51a84b38.tar.xz
gsoc2013-evolution-33041e67fcbf0e88b449ea4991d6648b51a84b38.tar.zst
gsoc2013-evolution-33041e67fcbf0e88b449ea4991d6648b51a84b38.zip
split "highlighted" into self_highlight and child_highligh.
* e-folder.c (_EFolderPrivate): split "highlighted" into self_highlight and child_highligh. (e_folder_get_highlighted): Return TRUE if either self_highlight is true or any child is highlighted. (e_folder_set_child_highlight): New function to tell the folder about a child highlight change. * e-storage.c (folder_changed_cb): Update child highlights correctly on folders so that folders will be highlighted whenever their children are. svn path=/trunk/; revision=8311
Diffstat (limited to 'shell/e-storage.c')
-rw-r--r--shell/e-storage.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/shell/e-storage.c b/shell/e-storage.c
index 6eb746e8a7..7045ef47d5 100644
--- a/shell/e-storage.c
+++ b/shell/e-storage.c
@@ -92,7 +92,8 @@ folder_changed_cb (EFolder *folder,
{
EStorage *storage;
EStoragePrivate *priv;
- const char *path;
+ const char *path, *p;
+ gboolean highlight;
g_assert (E_IS_STORAGE (data));
@@ -103,6 +104,21 @@ folder_changed_cb (EFolder *folder,
g_assert (path != NULL);
gtk_signal_emit (GTK_OBJECT (storage), signals[UPDATED_FOLDER], path);
+
+ highlight = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (folder), "last_highlight"));
+ if (highlight != e_folder_get_highlighted (folder)) {
+ highlight = !highlight;
+ gtk_object_set_data (GTK_OBJECT (folder), "last_highlight",
+ GINT_TO_POINTER (highlight));
+ p = strrchr (path, '/');
+ if (p && p != path) {
+ path = g_strndup (path, p - path);
+ folder = e_folder_tree_get_folder (priv->folder_tree, path);
+ if (folder)
+ e_folder_set_child_highlight (folder, highlight);
+ g_free (path);
+ }
+ }
}