[gnome-builder] tree: add get_text and set_text for GbTreeNode



commit dbacc1ee565043961b3442f3ec71403337c953ea
Author: Christian Hergert <christian hergert me>
Date:   Sat Apr 18 18:54:30 2015 -0700

    tree: add get_text and set_text for GbTreeNode

 src/tree/gb-tree-node.c |   10 +++++++++-
 src/tree/gb-tree-node.h |    3 +++
 2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/tree/gb-tree-node.c b/src/tree/gb-tree-node.c
index 0bb6a74..36e6f96 100644
--- a/src/tree/gb-tree-node.c
+++ b/src/tree/gb-tree-node.c
@@ -304,6 +304,14 @@ gb_tree_node_set_parent (GbTreeNode *node,
     }
 }
 
+const gchar *
+gb_tree_node_get_text (GbTreeNode *node)
+{
+  g_return_val_if_fail (GB_IS_TREE_NODE (node), NULL);
+
+  return node->priv->text;
+}
+
 /**
  * gb_tree_node_set_text:
  * @node: (in): A #GbTreeNode.
@@ -312,7 +320,7 @@ gb_tree_node_set_parent (GbTreeNode *node,
  * Sets the text of the node. This is displayed in the text
  * cell of the GbTree.
  */
-static void
+void
 gb_tree_node_set_text (GbTreeNode  *node,
                        const gchar *text)
 {
diff --git a/src/tree/gb-tree-node.h b/src/tree/gb-tree-node.h
index c0394d2..be4eeb7 100644
--- a/src/tree/gb-tree-node.h
+++ b/src/tree/gb-tree-node.h
@@ -80,6 +80,9 @@ void           gb_tree_node_rebuild       (GbTreeNode   *node);
 gboolean       gb_tree_node_get_expanded  (GbTreeNode   *node);
 void           gb_tree_node_show_popover  (GbTreeNode   *node,
                                            GtkPopover   *popover);
+const gchar   *gb_tree_node_get_text      (GbTreeNode   *node);
+void           gb_tree_node_set_text      (GbTreeNode   *node,
+                                           const gchar  *text);
 
 G_END_DECLS
 


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