[gnome-builder] vcs: set tree node flags when files change
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vcs: set tree node flags when files change
- Date: Fri, 28 Jun 2019 19:43:09 +0000 (UTC)
commit e1daf881c90b4f35f81514bc27e6c8437c22af82
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 28 12:42:52 2019 -0700
vcs: set tree node flags when files change
src/plugins/vcsui/gbp-vcsui-tree-addin.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/vcsui/gbp-vcsui-tree-addin.c b/src/plugins/vcsui/gbp-vcsui-tree-addin.c
index 260b8ed34..cac6d7730 100644
--- a/src/plugins/vcsui/gbp-vcsui-tree-addin.c
+++ b/src/plugins/vcsui/gbp-vcsui-tree-addin.c
@@ -300,11 +300,17 @@ gbp_vcsui_tree_addin_cell_data_func (IdeTreeAddin *addin,
if ((info = ide_vcs_monitor_ref_info (self->monitor, file)))
{
IdeVcsFileStatus status = ide_vcs_file_info_get_status (info);
+ IdeTreeNodeFlags flags = 0;
if (status == IDE_VCS_FILE_STATUS_ADDED)
- g_object_set (cell, "foreground-rgba", &self->added_color, NULL);
+ flags = IDE_TREE_NODE_FLAGS_ADDED;
else if (status == IDE_VCS_FILE_STATUS_CHANGED)
- g_object_set (cell, "foreground-rgba", &self->changed_color, NULL);
+ flags = IDE_TREE_NODE_FLAGS_CHANGED;
+
+ if (flags && ide_tree_node_has_child (node))
+ flags |= IDE_TREE_NODE_FLAGS_DESCENDANT;
+
+ ide_tree_node_set_flags (node, flags);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]