[gtk/misc-multiselection] singleselection: Clarify docs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/misc-multiselection] singleselection: Clarify docs
- Date: Sat, 6 Jun 2020 15:54:30 +0000 (UTC)
commit e72c243acab7eab57c98f05c93adb8f69e727281
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 6 11:53:33 2020 -0400
singleselection: Clarify docs
Mention persistence and sorting.
gtk/gtksingleselection.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtksingleselection.c b/gtk/gtksingleselection.c
index 63db37d0de..5d0172c7b1 100644
--- a/gtk/gtksingleselection.c
+++ b/gtk/gtksingleselection.c
@@ -30,9 +30,14 @@
* @Title: GtkSingleSelection
* @see_also: #GtkSelectionModel
*
- * GtkSingleSelection is an implementation of the #GtkSelectionModel interface
+ * GtkSingleSelection is an implementation of the #GtkSelectionModel interface
* that allows selecting a single element. It is the default selection method
* used by list widgets in GTK.
+ *
+ * Note that the selection is *persistent* -- if the selected item is removed
+ * and re-added in the same ::items-changed emission, it stays selected. In
+ * particular, this means that changing the sort order of an underlying sort
+ * model will preserve the selection.
*/
struct _GtkSingleSelection
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]