[libdazzle] tree-node: add helper to check for dummy node



commit 23e5c999d8e35fd8d0a78ee333e6445069deffc3
Author: Christian Hergert <chergert redhat com>
Date:   Mon Dec 4 17:51:33 2017 -0800

    tree-node: add helper to check for dummy node

 src/tree/dzl-tree-node.c    |    8 ++++++++
 src/tree/dzl-tree-private.h |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/tree/dzl-tree-node.c b/src/tree/dzl-tree-node.c
index cf62721..58ce295 100644
--- a/src/tree/dzl-tree-node.c
+++ b/src/tree/dzl-tree-node.c
@@ -1046,6 +1046,14 @@ dzl_tree_node_show_popover (DzlTreeNode *self,
     }
 }
 
+gboolean 
+_dzl_tree_node_is_dummy (DzlTreeNode *self)
+{
+  g_return_val_if_fail (DZL_IS_TREE_NODE (self), FALSE);
+
+  return self->is_dummy;
+}
+
 gboolean
 _dzl_tree_node_get_needs_build (DzlTreeNode *self)
 {
diff --git a/src/tree/dzl-tree-private.h b/src/tree/dzl-tree-private.h
index ff8928a..1eb9231 100644
--- a/src/tree/dzl-tree-private.h
+++ b/src/tree/dzl-tree-private.h
@@ -79,6 +79,7 @@ void         _dzl_tree_builder_node_collapsed  (DzlTreeBuilder *builder,
                                                 DzlTreeNode    *node);
 void         _dzl_tree_builder_node_expanded   (DzlTreeBuilder *builder,
                                                 DzlTreeNode    *node);
+gboolean      _dzl_tree_node_is_dummy                   (DzlTreeNode            *self);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]