summaryrefslogtreecommitdiff
path: root/src/gtkext/graph
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-02-10 09:56:11 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-02-10 09:56:11 (GMT)
commit34e1a14aced520ba06ee1b81cfd7710e97c1643f (patch)
tree2657c22041ab954bb2165553f71141b7843956a2 /src/gtkext/graph
parent3467b0cdb09976faccc6dbef09315cc38dbe6fb5 (diff)
Improved the disassembling process by handling loops in code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@339 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph')
-rw-r--r--src/gtkext/graph/dot.c2
-rw-r--r--src/gtkext/graph/layout.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gtkext/graph/dot.c b/src/gtkext/graph/dot.c
index 64ca2b5..18c4800 100644
--- a/src/gtkext/graph/dot.c
+++ b/src/gtkext/graph/dot.c
@@ -223,6 +223,8 @@ GtkLinkRenderer **create_links_from_graph_layout(const graph_layout *layout, siz
color = LKC_GREEN;
else if (strcmp("red", eiter->attr[attrib->index]) == 0)
color = LKC_RED;
+ else if (strcmp("blue", eiter->attr[attrib->index]) == 0)
+ color = LKC_BLUE;
else if (strcmp("gray", eiter->attr[attrib->index]) == 0)
color = LKC_DASHED_GRAY;
}
diff --git a/src/gtkext/graph/layout.c b/src/gtkext/graph/layout.c
index 87ae2ec..1748c40 100644
--- a/src/gtkext/graph/layout.c
+++ b/src/gtkext/graph/layout.c
@@ -282,6 +282,14 @@ static char *complete_graph_links(const GtkGraphView *view, GtkViewPanel **views
desc = stradd(desc, cmd);
break;
+ case ILT_LOOP:
+ snprintf(cmd, LINKS_DESC_LEN,
+ "_%p:s -> _%p:n [ltail=cluster_%p, lhead=cluster_%p, " \
+ "color=blue];\n",
+ views[i], views[k], views[i], views[k]);
+ desc = stradd(desc, cmd);
+ break;
+
case ILT_CATCH_EXCEPTION:
snprintf(cmd, LINKS_DESC_LEN,
"_%p:s -> _%p:n [ltail=cluster_%p, lhead=cluster_%p, " \