summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-09-06 15:53:59 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-09-06 15:53:59 +0000
commit1150c23b0f7d9504730e9de03cc38542bc6b758a (patch)
tree845a9e1e4ffa79f3e24a63f21f61de16a524c06a
parentbd7aa1782cc2d10ba1cf44db6df277c3bfee04dc (diff)
parente0134aaf15cb3d88f48d2655a53885a0770daf3d (diff)
downloadgtk+-1150c23b0f7d9504730e9de03cc38542bc6b758a.tar.gz
Merge branch 'listwidgets-doc-fix' into 'master'
docs: Update list widgets docs See merge request GNOME/gtk!2537
-rw-r--r--gtk/gtkcolumnview.c7
-rw-r--r--gtk/gtkdropdown.c2
-rw-r--r--gtk/gtkgridview.c7
-rw-r--r--gtk/gtklistview.c11
4 files changed, 12 insertions, 15 deletions
diff --git a/gtk/gtkcolumnview.c b/gtk/gtkcolumnview.c
index c3cb62839e..57d56fa080 100644
--- a/gtk/gtkcolumnview.c
+++ b/gtk/gtkcolumnview.c
@@ -58,10 +58,9 @@
* separators between the rows or columns.
*
* GtkColumnView allows the user to select items according to the selection
- * characteristics of the model. If the provided model is not a #GtkSelectionModel,
- * GtkColumnView will wrap it in a #GtkSingleSelection. For models that allow
- * multiple selected items, it is possible to turn on *rubberband selection*,
- * using #GtkColumnView:enable-rubberband.
+ * characteristics of the model. For models that allow multiple selected items,
+ * it is possible to turn on *rubberband selection*, using
+ * #GtkColumnView:enable-rubberband.
*
* The column view supports sorting that can be customized by the user by
* clicking on column headers. To set this up, the #GtkSorter returned by
diff --git a/gtk/gtkdropdown.c b/gtk/gtkdropdown.c
index feebfa1888..2cbd04e6a6 100644
--- a/gtk/gtkdropdown.c
+++ b/gtk/gtkdropdown.c
@@ -909,7 +909,7 @@ gtk_drop_down_get_enable_search (GtkDropDown *self)
*
* Sets the expression that gets evaluated to obtain strings from items
* when searching in the popup. The expression must have a value type of
- * #GTK_TYPE_STRING.
+ * #G_TYPE_STRING.
*/
void
gtk_drop_down_set_expression (GtkDropDown *self,
diff --git a/gtk/gtkgridview.c b/gtk/gtkgridview.c
index f20c34ba84..ba8ce422af 100644
--- a/gtk/gtkgridview.c
+++ b/gtk/gtkgridview.c
@@ -55,10 +55,9 @@
* grid reflows vertically or horizontally.
*
* GtkGridView allows the user to select items according to the selection
- * characteristics of the model. If the provided model is not a #GtkSelectionModel,
- * GtkGridView will wrap it in a #GtkSingleSelection. For models that allow
- * multiple selected items, it is possible to turn on _rubberband selection_,
- * using #GtkGridView:enable-rubberband.
+ * characteristics of the model. For models that allow multiple selected items,
+ * it is possible to turn on _rubberband selection_, using
+ * #GtkGridView:enable-rubberband.
*
* To learn more about the list widget framework, see the [overview](#ListWidget).
*
diff --git a/gtk/gtklistview.c b/gtk/gtklistview.c
index e7f2cf18bb..d04799b3a4 100644
--- a/gtk/gtklistview.c
+++ b/gtk/gtklistview.c
@@ -54,10 +54,9 @@
* between the rows.
*
* GtkListView allows the user to select items according to the selection
- * characteristics of the model. If the provided model is not a #GtkSelectionModel,
- * GtkListView will wrap it in a #GtkSingleSelection. For models that allow
- * multiple selected items, it is possible to turn on _rubberband selection_,
- * using #GtkListView:enable-rubberband.
+ * characteristics of the model. For models that allow multiple selected items,
+ * it is possible to turn on _rubberband selection_, using
+ * #GtkListView:enable-rubberband.
*
* If you need multiple columns with headers, see #GtkColumnView.
*
@@ -95,7 +94,7 @@
* {
* GAppInfo *app_info;
*
- * app_info = g_list_model_get_item (gtk_list_view_get_model (list), position);
+ * app_info = g_list_model_get_item (G_LIST_MODEL (gtk_list_view_get_model (list)), position);
* g_app_info_launch (app_info, NULL, NULL, NULL);
* g_object_unref (app_info);
* }
@@ -108,7 +107,7 @@
* g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
* g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);
*
- * list = gtk_list_view_new (model, factory);
+ * list = gtk_list_view_new (GTK_SELECTION_MODEL (gtk_single_selection_new (model)), factory);
*
* g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
*