summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2009-07-04 15:53:19 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2009-07-04 15:53:19 (GMT)
commit5f2cd35c377989e07b241870f89fdf87d851465d (patch)
treeaf0831fb6bb0bd303f8295005cec6284d1444b01 /src
parenta60e81ac70b3d829f486ce7b6534005a9d025206 (diff)
Improved the link lines management.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@90 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src')
-rw-r--r--src/graph/layout.c2
-rw-r--r--src/gtkext/gtkgraphview.c17
2 files changed, 17 insertions, 2 deletions
diff --git a/src/graph/layout.c b/src/graph/layout.c
index 93d6b28..725d76c 100644
--- a/src/graph/layout.c
+++ b/src/graph/layout.c
@@ -97,6 +97,8 @@ bool build_graph_view(GtkGraphView *view, GtkBinView **views, size_t count)
links = create_links_from_graph_layout(layout, &links_count);
gtk_graph_view_attach_links(view, links, links_count);
+ gtk_widget_queue_draw(GTK_WIDGET(view));
+
delete_graph_layout(layout);
/* TODO : free nodes */
diff --git a/src/gtkext/gtkgraphview.c b/src/gtkext/gtkgraphview.c
index 14cd5b2..0db03f0 100644
--- a/src/gtkext/gtkgraphview.c
+++ b/src/gtkext/gtkgraphview.c
@@ -200,6 +200,21 @@ static void gtk_graph_view_reset(GtkGraphView *view)
{
size_t i; /* Boucle de parcours */
+ view->start = 0;
+ view->end = 0;
+
+ for (i = 0; i < view->links_count; i++)
+ gtk_object_destroy(view->links[i]);
+
+ if (view->links_count > 0)
+ {
+ free(view->links);
+ view->links = NULL;
+
+ view->links_count = 0;
+
+ }
+
for (i = 0; i < view->childs_count; i++)
gtk_widget_destroy(view->childs[i]);
@@ -468,8 +483,6 @@ static GtkBinView **gtk_graph_view_load_nodes(openida_binary *binary, GRendering
void gtk_graph_view_attach_links(GtkGraphView *view, GtkLinkRenderer **links, size_t count)
{
- /* TODO : free ? */
-
view->links = links;
view->links_count = count;