diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-11-19 21:26:51 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-11-19 21:26:51 (GMT) |
commit | 5a70286f7f56cc72a0249fcaf404afabfb033956 (patch) | |
tree | ef2b94b04a3e84b93832749ccf6cd9b9cc370d3c /src/gtkext/graph/dot.c | |
parent | 760e2e7346518dd1264126c1696f9ad88884d64c (diff) |
Handled Dalvik exception handlers in the graphic view.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@285 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph/dot.c')
-rw-r--r-- | src/gtkext/graph/dot.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gtkext/graph/dot.c b/src/gtkext/graph/dot.c index 4c35089..0e7091e 100644 --- a/src/gtkext/graph/dot.c +++ b/src/gtkext/graph/dot.c @@ -25,6 +25,7 @@ #include <malloc.h> +#include <string.h> #include <graphviz/gvc.h> #include <graphviz/types.h> @@ -210,14 +211,19 @@ GtkLinkRenderer **create_links_from_graph_layout(const graph_layout *layout, siz /* Détermination de la couleur */ + color = LKC_DEFAULT; + attrib = agfindedgeattr(agraphof(agtail(eiter)), "color"); - if (eiter->attr[attrib->index][0] == 'g') /* "green" */ - color = LKC_GREEN; - else if (eiter->attr[attrib->index][0] == 'r') /* "red" */ - color = LKC_RED; - else - color = LKC_DEFAULT; + if (attrib != NULL) + { + if (strcmp("green", eiter->attr[attrib->index]) == 0) + color = LKC_GREEN; + else if (strcmp("red", eiter->attr[attrib->index]) == 0) + color = LKC_RED; + else if (strcmp("gray", eiter->attr[attrib->index]) == 0) + color = LKC_DASHED_GRAY; + } /* Raccordement au point de départ */ |