Avoid refering to old GtkContainer API in the docs

This commit is contained in:
Timm Bäder 2020-08-01 15:34:59 +02:00
parent e976825342
commit 65b79d2585
6 changed files with 13 additions and 24 deletions

View File

@ -629,7 +629,7 @@ gtk_button_buildable_iface_init (GtkBuildableIface *iface)
* gtk_button_new:
*
* Creates a new #GtkButton widget. To add a child widget to the button,
* use gtk_container_add().
* use gtk_button_set_child().
*
* Returns: The newly created #GtkButton widget.
*/

View File

@ -48,7 +48,7 @@
* The children of a GtkFlowBox can be dynamically sorted and filtered.
*
* Although a GtkFlowBox must have only #GtkFlowBoxChild children,
* you can add any kind of widget to it via gtk_container_add(), and
* you can add any kind of widget to it via gtk_flow_box_insert(), and
* a GtkFlowBoxChild widget will automatically be inserted between
* the box and the widget.
*
@ -4042,8 +4042,7 @@ gtk_flow_box_insert_css_node (GtkFlowBox *box,
* Inserts the @widget into @box at @position.
*
* If a sort function is set, the widget will actually be inserted
* at the calculated position and this function has the same effect
* as gtk_container_add().
* at the calculated position.
*
* If @position is -1, or larger than the total number of children
* in the @box, then the @widget will be appended to the end.
@ -4239,7 +4238,7 @@ gtk_flow_box_check_model_compat (GtkFlowBox *box)
* If @model is %NULL, @box is left empty.
*
* It is undefined to add or remove widgets directly (for example, with
* gtk_flow_box_insert() or gtk_container_add()) while @box is bound to a
* gtk_flow_box_insert()) while @box is bound to a
* model.
*
* Note that using a model is incompatible with the filtering and sorting

View File

@ -55,7 +55,8 @@
* button in it).
*
* Although a #GtkListBox must have only #GtkListBoxRow children you can
* add any kind of widget to it via gtk_container_add(), and a #GtkListBoxRow
* add any kind of widget to it via gtk_list_box_prepend(),
* gtk_list_box_append() and gtk_list_box_insert() and a #GtkListBoxRow
* widget will automatically be inserted between the list and the widget.
*
* #GtkListBoxRows can be marked as activatable or selectable. If a row
@ -2574,8 +2575,7 @@ gtk_list_box_size_allocate (GtkWidget *widget,
* @child: the #GtkWidget to add
*
* Prepend a widget to the list. If a sort function is set, the widget will
* actually be inserted at the calculated position and this function has the
* same effect of gtk_container_add().
* actually be inserted at the calculated position.
*/
void
gtk_list_box_prepend (GtkListBox *box,
@ -2590,8 +2590,7 @@ gtk_list_box_prepend (GtkListBox *box,
* @child: the #GtkWidget to add
*
* Append a widget to the list. If a sort function is set, the widget will
* actually be inserted at the calculated position and this function has the
* same effect of gtk_container_add().
* actually be inserted at the calculated position.
*/
void
gtk_list_box_append (GtkListBox *box,
@ -2607,8 +2606,7 @@ gtk_list_box_append (GtkListBox *box,
* @position: the position to insert @child in
*
* Insert the @child into the @box at @position. If a sort function is
* set, the widget will actually be inserted at the calculated position and
* this function has the same effect of gtk_container_add().
* set, the widget will actually be inserted at the calculated position.
*
* If @position is -1, or larger than the total number of items in the
* @box, then the @child will be appended to the end.
@ -3578,7 +3576,7 @@ gtk_list_box_check_model_compat (GtkListBox *box)
* If @model is %NULL, @box is left empty.
*
* It is undefined to add or remove widgets directly (for example, with
* gtk_list_box_insert() or gtk_container_add()) while @box is bound to a
* gtk_list_box_insert()) while @box is bound to a
* model.
*
* Note that using a model is incompatible with the filtering and sorting

View File

@ -420,7 +420,7 @@ gtk_overlay_new (void)
* Adds @widget to @overlay.
*
* The widget will be stacked on top of the main widget
* added with gtk_container_add().
* added with gtk_overlay_set_child().
*
* The position at which @widget is placed is determined
* from its #GtkWidget:halign and #GtkWidget:valign properties.

View File

@ -68,12 +68,12 @@
* Widgets with native scrolling support, i.e. those whose classes implement the
* #GtkScrollable interface, are added directly. For other types of widget, the
* class #GtkViewport acts as an adaptor, giving scrollability to other widgets.
* GtkScrolledWindows implementation of gtk_container_add() intelligently
* gtk_scrolled_window_set_child() intelligently
* accounts for whether or not the added child is a #GtkScrollable. If it isnt,
* #GtkScrolledWindow wraps the child in a #GtkViewport and adds that for you.
* Therefore, you can just add any child widget and not worry about the details.
*
* If gtk_container_add() has added a #GtkViewport for you, you can remove
* If gtk_scrolled_window_set_child() has added a #GtkViewport for you, you can remove
* both your added child widget from the #GtkViewport, and the #GtkViewport
* from the GtkScrolledWindow, like this:
*

View File

@ -49,14 +49,6 @@
* capabilities. Use GtkViewport to scroll child widgets such as
* #GtkGrid, #GtkBox, and so on.
*
* If a widget has native scrolling abilities, such as #GtkTextView,
* #GtkTreeView or #GtkIconView, it can be added to a #GtkScrolledWindow
* with gtk_container_add(). If a widget does not, you must first add the
* widget to a #GtkViewport, then add the viewport to the scrolled window.
* gtk_container_add() does this automatically if a child that does not
* implement #GtkScrollable is added to a #GtkScrolledWindow, so you can
* ignore the presence of the viewport.
*
* The GtkViewport will start scrolling content only if allocated less
* than the child widgets minimum size in a given orientation.
*