[graph-gtk] Added graph_gtk_node_remove_pads
- From: Isaac Wagner <isaacbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [graph-gtk] Added graph_gtk_node_remove_pads
- Date: Sat, 4 Aug 2012 17:12:53 +0000 (UTC)
commit 250ad5147701f5c8b57f2214d601fc0a235cedc5
Author: Isaac Wagner <isaacbw src gnome org>
Date: Sat Aug 4 13:12:36 2012 -0400
Added graph_gtk_node_remove_pads
graph-gtk/graph-gtk-node.c | 12 ++++++++++++
graph-gtk/graph-gtk-node.h | 1 +
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/graph-gtk/graph-gtk-node.c b/graph-gtk/graph-gtk-node.c
index e6fdb0f..7984c46 100644
--- a/graph-gtk/graph-gtk-node.c
+++ b/graph-gtk/graph-gtk-node.c
@@ -575,3 +575,15 @@ graph_gtk_node_show_image(GraphGtkNode* self, gboolean show_image)
self->show_image = show_image;
graph_gtk_node_recalculate_size(self);
}
+
+void
+graph_gtk_node_remove_pads(GraphGtkNode *self)
+{
+ g_list_free_full(self->output_pads, g_free);
+ g_list_free_full(self->input_pads, g_free);
+
+ self->output_pads = NULL;
+ self->input_pads = NULL;
+
+ graph_gtk_node_recalculate_size(self);
+}
diff --git a/graph-gtk/graph-gtk-node.h b/graph-gtk/graph-gtk-node.h
index b9bb58c..3b07e7b 100644
--- a/graph-gtk/graph-gtk-node.h
+++ b/graph-gtk/graph-gtk-node.h
@@ -75,6 +75,7 @@ void graph_gtk_node_set_name(GraphGtkNode* self, const gchar* name);
const gchar* graph_gtk_node_get_name(GraphGtkNode* self);
void graph_gtk_node_render(GraphGtkNode* self, cairo_t* cairo);
void graph_gtk_node_add_pad(GraphGtkNode* self, const gchar* pad_name, gboolean output);
+void graph_gtk_node_remove_pads(GraphGtkNode *self);
GList* graph_gtk_node_get_pads(GraphGtkNode* self);
GList* graph_gtk_node_get_input_pads(GraphGtkNode* self);
GList* graph_gtk_node_get_output_pads(GraphGtkNode* self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]