summaryrefslogtreecommitdiff
path: root/gtk/gtksingleselection.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-03-10 23:45:19 +0100
committerBenjamin Otte <otte@redhat.com>2019-03-19 08:48:22 +0100
commit07054ca20d7ad7e82fdb723659e478478c9b2fee (patch)
treefe0906c611e9b45e6aa678859b751946905d5b68 /gtk/gtksingleselection.c
parent8f6a48832d1876644b3de4c5ea3b348bb1db77a0 (diff)
downloadgtk+-07054ca20d7ad7e82fdb723659e478478c9b2fee.tar.gz
singleselection: Add forgotten notify emission
Also, add docs for the model property while I'm looking at the file.
Diffstat (limited to 'gtk/gtksingleselection.c')
-rw-r--r--gtk/gtksingleselection.c9
1 files changed, 8 insertions, 1 deletions
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]);
}
/**