[gtk/wip/otte/nodeeditor: 7/12] singleselection: Add forgotten notify emission
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/nodeeditor: 7/12] singleselection: Add forgotten notify emission
- Date: Tue, 12 Mar 2019 14:08:31 +0000 (UTC)
commit b0e05142638ef643034474b4891686719c2f40e9
Author: Benjamin Otte <otte redhat com>
Date: Sun Mar 10 23:45:19 2019 +0100
singleselection: Add forgotten notify emission
Also, add docs for the model property while I'm looking at the file.
gtk/gtksingleselection.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtksingleselection.c b/gtk/gtksingleselection.c
index ce25eb91d1..5f9517fbed 100644
--- a/gtk/gtksingleselection.c
+++ b/gtk/gtksingleselection.c
@@ -451,10 +451,15 @@ gtk_single_selection_class_init (GtkSingleSelectionClass *klass)
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ /**
+ * GtkSingleSelection:model:
+ *
+ * The model being managed
+ */
properties[PROP_MODEL] =
g_param_spec_object ("model",
P_("The model"),
- P_("The model"),
+ P_("The model being managed"),
G_TYPE_LIST_MODEL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
@@ -548,7 +553,9 @@ gtk_single_selection_set_selected (GtkSingleSelection *self,
gtk_selection_model_selection_changed (GTK_SELECTION_MODEL (self), position, old_position - position +
1);
else
gtk_selection_model_selection_changed (GTK_SELECTION_MODEL (self), old_position, position - old_position
+ 1);
+
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED]);
+ g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]