summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/gtkext/graph/edge.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/gtkext/graph/edge.c')
-rw-r--r--plugins/pychrysalide/gtkext/graph/edge.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/plugins/pychrysalide/gtkext/graph/edge.c b/plugins/pychrysalide/gtkext/graph/edge.c
index 60d5bb7..ce20ce9 100644
--- a/plugins/pychrysalide/gtkext/graph/edge.c
+++ b/plugins/pychrysalide/gtkext/graph/edge.c
@@ -33,6 +33,7 @@
#include <plugins/dt.h>
+#include "constants.h"
#include "../../access.h"
#include "../../helpers.h"
@@ -47,9 +48,6 @@ static PyObject *py_graph_edge_get_color(PyObject *, void *);
/* Fournit l'ensemble des points constituant un lien graphique. */
static PyObject *py_graph_edge_get_points(PyObject *, void *);
-/* Définit les constantes pour les liens graphiques. */
-static bool py_graph_edge_define_constants(PyTypeObject *);
-
/******************************************************************************
@@ -184,36 +182,6 @@ static PyObject *py_graph_edge_get_points(PyObject *self, void *closure)
/******************************************************************************
* *
-* Paramètres : obj_type = type dont le dictionnaire est à compléter. *
-* *
-* Description : Définit les constantes pour les liens graphiques. *
-* *
-* Retour : true en cas de succès de l'opération, false sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool py_graph_edge_define_constants(PyTypeObject *obj_type)
-{
- bool result; /* Bilan à retourner */
-
- result = true;
-
- if (result) result = PyDict_AddULongMacro(obj_type, EGC_DEFAULT);
- if (result) result = PyDict_AddULongMacro(obj_type, EGC_GREEN);
- if (result) result = PyDict_AddULongMacro(obj_type, EGC_RED);
- if (result) result = PyDict_AddULongMacro(obj_type, EGC_BLUE);
- if (result) result = PyDict_AddULongMacro(obj_type, EGC_DASHED_GRAY);
- if (result) result = PyDict_AddULongMacro(obj_type, EGC_COUNT);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : - *
* *
* Description : Fournit un accès à une définition de type à diffuser. *
@@ -302,7 +270,7 @@ bool ensure_python_graph_edge_is_registered(void)
if (!register_class_for_pygobject(dict, G_TYPE_GRAPH_EDGE, type, &PyGObject_Type))
return false;
- if (!py_graph_edge_define_constants(type))
+ if (!define_graph_edge_constants(type))
return false;
}