Merge branch 'gtk3-selection-docs' into 'gtk-3-24'

docs: Fix gtk_tree_selection_get_selected()

See merge request GNOME/gtk!4012
This commit is contained in:
Emmanuele Bassi 2021-09-30 00:12:20 +00:00
commit 3935a4a44a

View File

@ -460,16 +460,21 @@ gtk_tree_selection_get_tree_view (GtkTreeSelection *selection)
/**
* gtk_tree_selection_get_selected:
* @selection: A #GtkTreeSelection.
* @model: (out) (allow-none) (transfer none): A pointer to set to the #GtkTreeModel, or NULL.
* @iter: (out) (allow-none): The #GtkTreeIter, or NULL.
* @model: (out) (optional) (transfer none): the model
* @iter: (out) (optional): the iterator for the selected row
*
* Sets @iter to the currently selected node if @selection is set to
* #GTK_SELECTION_SINGLE or #GTK_SELECTION_BROWSE. @iter may be NULL if you
* just want to test if @selection has any selected nodes. @model is filled
* with the current model as a convenience. This function will not work if you
* use @selection is #GTK_SELECTION_MULTIPLE.
* Sets @iter to the currently selected node, if @selection is set to
* %GTK_SELECTION_SINGLE or %GTK_SELECTION_BROWSE.
*
* Returns: TRUE, if there is a selected node.
* The @iter argument may be %NULL if you just want to test if @selection
* has any selected nodes.
*
* The @model argument is filled with the current model as a convenience.
*
* This function will not work with %GTK_SELECTION_MULTIPLE. See
* gtk_tree_selection_get_selected_rows() instead.
*
* Returns: %TRUE, if there is a selected node.
**/
gboolean
gtk_tree_selection_get_selected (GtkTreeSelection *selection,
@ -536,17 +541,21 @@ gtk_tree_selection_get_selected (GtkTreeSelection *selection,
* @selection: A #GtkTreeSelection.
* @model: (out) (allow-none) (transfer none): A pointer to set to the #GtkTreeModel, or %NULL.
*
* Creates a list of path of all selected rows. Additionally, if you are
* planning on modifying the model after calling this function, you may
* want to convert the returned list into a list of #GtkTreeRowReferences.
* Creates a list of path of all selected rows.
*
* Additionally, if you are planning on modifying the model after calling
* this function, you may want to convert the returned list into a list
* of #GtkTreeRowReferences.
*
* To do this, you can use gtk_tree_row_reference_new().
*
* To free the return value, use:
*
* |[<!-- language="C" -->
* g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
* ]|
*
* Returns: (element-type GtkTreePath) (transfer full): A #GList containing a #GtkTreePath for each selected row.
* Returns: (element-type GtkTreePath) (transfer full): the selected paths
*
* Since: 2.2
**/