[libdazzle/elbren/graphmodel-changesignal] graph: value changed signal in graph model
- From: Daniel Brendle <elbren src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle/elbren/graphmodel-changesignal] graph: value changed signal in graph model
- Date: Wed, 15 Jan 2020 23:27:53 +0000 (UTC)
commit 37104ae53d176d47213ede64d7210235439ba7a6
Author: grindhold <grindhold gmx net>
Date: Thu Jan 16 00:26:46 2020 +0100
graph: value changed signal in graph model
src/graphing/dzl-graph-model.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/src/graphing/dzl-graph-model.c b/src/graphing/dzl-graph-model.c
index c53ecdb..0279338 100644
--- a/src/graphing/dzl-graph-model.c
+++ b/src/graphing/dzl-graph-model.c
@@ -57,6 +57,7 @@ enum {
enum {
CHANGED,
+ VALUE_CHANGED,
LAST_SIGNAL
};
@@ -471,6 +472,8 @@ dzl_graph_view_model_iter_set_value (DzlGraphModelIter *iter,
g_assert (col != NULL);
_dzl_graph_view_column_set_value (col, impl->index, value);
+
+ g_signal_emit (impl->table, signals [VALUE_CHANGED], 0);
}
static void
@@ -598,9 +601,22 @@ dzl_graph_view_model_class_init (DzlGraphModelClass *klass)
NULL, NULL, NULL,
G_TYPE_NONE,
0);
+
+ signals [VALUE_CHANGED] = g_signal_new ("value-changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL, NULL,
+ G_TYPE_NONE,
+ 0);
+
g_signal_set_va_marshaller (signals [CHANGED],
G_TYPE_FROM_CLASS (klass),
g_cclosure_marshal_VOID__VOIDv);
+
+ g_signal_set_va_marshaller (signals [VALUE_CHANGED],
+ G_TYPE_FROM_CLASS (klass),
+ g_cclosure_marshal_VOID__VOIDv);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]