aboutsummaryrefslogtreecommitdiff
path: root/deps/uber-graph/uber-graph.c
diff options
context:
space:
mode:
authorbigbear <ns@bigbear.dk>2024-02-08 02:56:29 +0100
committerbigbear <ns@bigbear.dk>2024-02-08 19:52:53 +0100
commit4c249cfdc742d162fdb384fba61236cada3d9f29 (patch)
treea1b00b37346bed7d0eb58dc272379f6394bc4607 /deps/uber-graph/uber-graph.c
parent3c387015ab71e9a0f4ec375e194a499019272c60 (diff)
FIX uber-graph GLIB private
Diffstat (limited to 'deps/uber-graph/uber-graph.c')
-rw-r--r--deps/uber-graph/uber-graph.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/deps/uber-graph/uber-graph.c b/deps/uber-graph/uber-graph.c
index e8a6157a..9118f263 100644
--- a/deps/uber-graph/uber-graph.c
+++ b/deps/uber-graph/uber-graph.c
@@ -68,7 +68,6 @@
* or a new #GtkStyle set, a full rendering of the graph will be required.
*/
-G_DEFINE_ABSTRACT_TYPE(UberGraph, uber_graph, GTK_TYPE_DRAWING_AREA)
struct _UberGraphPrivate
{
@@ -110,6 +109,8 @@ struct _UberGraphPrivate
gint fps_count; /* Track actual FPS. */
};
+G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(UberGraph, uber_graph, GTK_TYPE_DRAWING_AREA)
+
static gboolean show_fps = FALSE;
enum
@@ -2087,7 +2088,6 @@ uber_graph_class_init (UberGraphClass *klass) /* IN */
object_class->finalize = uber_graph_finalize;
object_class->get_property = uber_graph_get_property;
object_class->set_property = uber_graph_set_property;
- g_type_class_add_private(object_class, sizeof(UberGraphPrivate));
widget_class = GTK_WIDGET_CLASS(klass);
widget_class->draw = uber_graph_draw;
@@ -2135,9 +2135,8 @@ uber_graph_init (UberGraph *graph) /* IN */
/*
* Store pointer to private data allocation.
*/
- graph->priv = G_TYPE_INSTANCE_GET_PRIVATE(graph,
- UBER_TYPE_GRAPH,
- UberGraphPrivate);
+ graph->priv = uber_graph_get_instance_private(graph);
+
priv = graph->priv;
/*
* Enable required events.