summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/nodes
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-08-31 15:56:10 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-08-31 15:56:10 (GMT)
commited4bb73e5d68c1f81b8e0c3210aa221ec6f2675b (patch)
tree006a4641fc7a5c820d6a4253ff75e79ef01e368b /src/gtkext/graph/nodes
parent4658d4fa406bad4abe36a76746412cf02c984af0 (diff)
Loaded a binary strip into the editor.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@358 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph/nodes')
-rw-r--r--src/gtkext/graph/nodes/flow.c4
-rw-r--r--src/gtkext/graph/nodes/virtual.c16
2 files changed, 14 insertions, 6 deletions
diff --git a/src/gtkext/graph/nodes/flow.c b/src/gtkext/graph/nodes/flow.c
index fad520d..6bb2617 100644
--- a/src/gtkext/graph/nodes/flow.c
+++ b/src/gtkext/graph/nodes/flow.c
@@ -581,6 +581,10 @@ void g_flow_node_link(GFlowNode *node, GGraphLayout *layout, GGraphNode *nodes)
void g_flow_node_place(const GFlowNode *node, GtkGraphView *view)
{
+ printf("[put] %p (%d ; %d) - (%d ; %d)\n", node,
+ G_GRAPH_NODE(node)->alloc.x, G_GRAPH_NODE(node)->alloc.y,
+ G_GRAPH_NODE(node)->alloc.width, G_GRAPH_NODE(node)->alloc.height);
+
gtk_graph_view_put(view, GTK_WIDGET(node->view), &G_GRAPH_NODE(node)->alloc);
}
diff --git a/src/gtkext/graph/nodes/virtual.c b/src/gtkext/graph/nodes/virtual.c
index 48cc1fb..de0e75e 100644
--- a/src/gtkext/graph/nodes/virtual.c
+++ b/src/gtkext/graph/nodes/virtual.c
@@ -473,7 +473,7 @@ static void g_virtual_node_apply_position(GVirtualNode *node)
{
gint min; /* Valeur minimale rencontrée */
size_t i; /* Boucle de parcours */
- gint pos_x; /* Nouvelle position #1 */
+ gint x_pos; /* Nouvelle position #1 */
gint offset; /* Décallage à faire suivre */
g_virtual_node_apply_x_line(node);
@@ -484,8 +484,8 @@ static void g_virtual_node_apply_position(GVirtualNode *node)
for (i = 0; i < node->count; i++)
{
- g_graph_node_get_position(node->children[i], &pos_x, NULL);
- min = MIN(min, pos_x);
+ g_graph_node_get_position(node->children[i], &x_pos, NULL);
+ min = MIN(min, x_pos);
}
/* Espace pour les liens remontants */
@@ -503,10 +503,14 @@ static void g_virtual_node_apply_position(GVirtualNode *node)
{
/* BUG_ON(node->children[i]->alloc.x != UNINITIALIZED_NODE_POS); */
- g_graph_node_get_position(node->children[i], &pos_x, NULL);
- pos_x += offset;
+ g_graph_node_get_position(node->children[i], &x_pos, NULL);
+
+ printf(" == vapply == %p : %d + %d -> %d\n",
+ node->children[i], x_pos, offset, (int)(x_pos + offset));
- g_graph_node_set_x_position(node->children[i], pos_x);
+ x_pos += offset;
+
+ g_graph_node_set_x_position(node->children[i], x_pos);
}