Hello community, here is the log from the commit of package libyui-qt-graph for openSUSE:Factory checked in at 2014-01-20 20:43:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-qt-graph (Old) and /work/SRC/openSUSE:Factory/.libyui-qt-graph.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-qt-graph" Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-qt-graph/libyui-qt-graph.changes 2014-01-09 17:25:23.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libyui-qt-graph.new/libyui-qt-graph.changes 2014-01-23 15:48:57.000000000 +0100 @@ -1,0 +2,7 @@ +Mon Jan 13 16:48:36 CET 2014 - [email protected] + +- use cgraph interfaces if available, to fix building with + graphviz 2.30 (dvaleev) + 0001-use-cgraph-instead-of-graph-interfaces.patch + +------------------------------------------------------------------- New: ---- 0001-use-cgraph-instead-of-graph-interfaces.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-qt-graph.spec ++++++ --- /var/tmp/diff_new_pack.GVGopY/_old 2014-01-23 15:48:58.000000000 +0100 +++ /var/tmp/diff_new_pack.GVGopY/_new 2014-01-23 15:48:58.000000000 +0100 @@ -20,6 +20,7 @@ Version: 2.43.0 Release: 0 Source: libyui-qt-graph-%{version}.tar.bz2 +Patch: 0001-use-cgraph-instead-of-graph-interfaces.patch BuildRequires: cmake >= 2.8 BuildRequires: gcc-c++ @@ -79,6 +80,7 @@ %prep %setup -q -n libyui-qt-graph-%{version} +%patch -p1 %build ++++++ 0001-use-cgraph-instead-of-graph-interfaces.patch ++++++ >From 6d9694134f2fa7510100f430e10044782069895e Mon Sep 17 00:00:00 2001 From: Dinar Valeev <[email protected]> Date: Fri, 10 Jan 2014 14:34:36 +0100 Subject: [PATCH] use cgraph instead of graph interfaces Signed-off-by: Dinar Valeev <[email protected]> --- examples/SimpleCreate.cc | 18 ++++++++++++++++++ src/QY2Graph.cc | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/examples/SimpleCreate.cc b/examples/SimpleCreate.cc index 2dcf8fa..03ebc23 100644 --- a/examples/SimpleCreate.cc +++ b/examples/SimpleCreate.cc @@ -45,6 +45,23 @@ GVC_t* gvc = gvContext(); +#ifdef WITH_CGRAPH + graph_t* graph = agopen(strdup("test"), Agdirected, 0); + + node_t* node1 = agnode(graph, strdup("1"), 1); + node_t* node2 = agnode(graph, strdup("2"), 1); + + agattr(graph, AGNODE, strdup("fillcolor"), strdup("gray")); + agset(node1, strdup("fillcolor"), strdup("red")); + agset(node2, strdup("fillcolor"), strdup("green")); + + edge_t* edge1 = agedge(graph, node1, node2, NULL, 1); + edge_t* edge2 = agedge(graph, node2, node1, NULL, 1); + + agattr(graph, AGEDGE, strdup("color"), strdup("black")); + agset(edge1, strdup("color"), strdup("red")); + agset(edge2, strdup("color"), strdup("green")); +#else graph_t* graph = agopen(strdup("test"), AGDIGRAPH); node_t* node1 = agnode(graph, strdup("1")); @@ -60,6 +77,7 @@ agedgeattr(graph, strdup("color"), strdup("black")); agset(edge1, strdup("color"), strdup("red")); agset(edge2, strdup("color"), strdup("green")); +#endif gvLayout(gvc, graph, "dot"); diff --git a/src/QY2Graph.cc b/src/QY2Graph.cc index 46fdcbe..873191e 100644 --- a/src/QY2Graph.cc +++ b/src/QY2Graph.cc @@ -224,7 +224,11 @@ GVC_t* gvc = gvContext(); if (gvc != NULL) { +#ifdef WITH_CGRAPH + graph_t* graph = agread(fp, NULL); +#else graph_t* graph = agread(fp); +#endif if (graph != NULL) { if (gvLayout(gvc, graph, const_cast<char*>(layoutAlgorithm.c_str())) == 0) @@ -375,7 +379,11 @@ drawLabel(ND_label(node), &painter); painter.end(); +#ifdef WITH_CGRAPH + QY2Node* item = new QY2Node(makeShape(node), picture, agnameof(node)); +#else QY2Node* item = new QY2Node(makeShape(node), picture, node->name); +#endif item->setPos(gToQ(ND_coord(node))); -- 1.8.4 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
