Frame—Note set_label always destroys :label-widget

The fact that it doesn’t reuse the existing GtkLabel if present is not
immediately obvious to users (or is it just me?), so clarify that the
pre-existing :label-widget, if any, is always removed and replaced.
This commit is contained in:
Daniel Boles 2017-02-21 21:18:01 +00:00
parent b106c5e4d5
commit e0b70f3629

View File

@ -420,8 +420,8 @@ gtk_frame_forall (GtkContainer *container,
* @frame: a #GtkFrame * @frame: a #GtkFrame
* @label: (allow-none): the text to use as the label of the frame * @label: (allow-none): the text to use as the label of the frame
* *
* Sets the text of the label. If @label is %NULL, * Removes the current #GtkFrame:label-widget. If @label is not %NULL, creates a
* the current label is removed. * new #GtkLabel with that text and adds it as the #GtkFrame:label-widget.
**/ **/
void void
gtk_frame_set_label (GtkFrame *frame, gtk_frame_set_label (GtkFrame *frame,
@ -476,9 +476,8 @@ gtk_frame_get_label (GtkFrame *frame)
* @frame: a #GtkFrame * @frame: a #GtkFrame
* @label_widget: (nullable): the new label widget * @label_widget: (nullable): the new label widget
* *
* Sets the label widget for the frame. This is the widget that * Sets the #GtkFrame:label-widget for the frame. This is the widget that
* will appear embedded in the top edge of the frame as a * will appear embedded in the top edge of the frame as a title.
* title.
**/ **/
void void
gtk_frame_set_label_widget (GtkFrame *frame, gtk_frame_set_label_widget (GtkFrame *frame,