Add a missing since tag

gtk_text_child_anchor_new_with_replacement was
recently added.
This commit is contained in:
Matthias Clasen 2021-12-10 08:26:59 -05:00
parent 935c6aade0
commit 2d062fedd9

View File

@ -232,7 +232,7 @@ child_segment_delete_func (GtkTextLineSegment *seg,
GSList *copy;
_gtk_text_btree_unregister_child_anchor (seg->body.child.obj);
seg->body.child.tree = NULL;
seg->body.child.line = NULL;
@ -254,9 +254,9 @@ child_segment_delete_func (GtkTextLineSegment *seg,
g_assert (seg->body.child.widgets == NULL);
g_slist_free (copy);
_gtk_widget_segment_unref (seg);
_gtk_widget_segment_unref (seg);
return 0;
}
@ -308,7 +308,7 @@ _gtk_widget_segment_new (GtkTextChildAnchor *anchor)
seg->body.child.line = NULL;
g_object_ref (anchor);
return seg;
#pragma GCC diagnostic pop
}
@ -321,7 +321,7 @@ _gtk_widget_segment_add (GtkTextLineSegment *widget_segment,
g_return_if_fail (widget_segment->body.child.tree != NULL);
g_object_ref (child);
widget_segment->body.child.widgets =
g_slist_prepend (widget_segment->body.child.widgets,
child);
@ -332,7 +332,7 @@ _gtk_widget_segment_remove (GtkTextLineSegment *widget_segment,
GtkWidget *child)
{
g_return_if_fail (widget_segment->type == &gtk_text_child_type);
widget_segment->body.child.widgets =
g_slist_remove (widget_segment->body.child.widgets,
child);
@ -359,7 +359,7 @@ _gtk_widget_segment_unref (GtkTextLineSegment *widget_segment)
GtkTextLayout*
_gtk_anchored_child_get_layout (GtkWidget *child)
{
return g_object_get_data (G_OBJECT (child), "gtk-text-child-anchor-layout");
return g_object_get_data (G_OBJECT (child), "gtk-text-child-anchor-layout");
}
static void
@ -368,9 +368,9 @@ _gtk_anchored_child_set_layout (GtkWidget *child,
{
g_object_set_data (G_OBJECT (child),
I_("gtk-text-child-anchor-layout"),
layout);
layout);
}
static void gtk_text_child_anchor_finalize (GObject *obj);
G_DEFINE_TYPE (GtkTextChildAnchor, gtk_text_child_anchor, G_TYPE_OBJECT)
@ -391,14 +391,14 @@ gtk_text_child_anchor_class_init (GtkTextChildAnchorClass *klass)
/**
* gtk_text_child_anchor_new:
*
*
* Creates a new `GtkTextChildAnchor`.
*
* Usually you would then insert it into a `GtkTextBuffer` with
* [method@Gtk.TextBuffer.insert_child_anchor]. To perform the
* creation and insertion in one step, use the convenience
* function [method@Gtk.TextBuffer.create_child_anchor].
*
*
* Returns: a new `GtkTextChildAnchor`
**/
GtkTextChildAnchor*
@ -416,6 +416,8 @@ gtk_text_child_anchor_new (void)
* [method@Gtk.TextBuffer.insert_child_anchor].
*
* Returns: a new `GtkTextChildAnchor`
*
* Since: 4.6
**/
GtkTextChildAnchor *
gtk_text_child_anchor_new_with_replacement (const char *replacement_character)
@ -433,11 +435,11 @@ gtk_text_child_anchor_finalize (GObject *obj)
{
GtkTextChildAnchor *anchor;
GtkTextLineSegment *seg;
anchor = GTK_TEXT_CHILD_ANCHOR (obj);
seg = anchor->segment;
if (seg)
{
if (seg->body.child.tree != NULL)
@ -462,7 +464,7 @@ gtk_text_child_anchor_finalize (GObject *obj)
* gtk_text_child_anchor_get_widgets:
* @anchor: a `GtkTextChildAnchor`
* @out_len: (out): return location for the length of the array
*
*
* Gets a list of all widgets anchored at this child anchor.
*
* The order in which the widgets are returned is not defined.
@ -527,7 +529,7 @@ gtk_text_child_anchor_get_deleted (GtkTextChildAnchor *anchor)
GtkTextLineSegment *seg = anchor->segment;
CHECK_IN_BUFFER_RETURN (anchor, TRUE);
g_return_val_if_fail (seg->type == &gtk_text_child_type, TRUE);
return seg->body.child.tree == NULL;
@ -542,9 +544,9 @@ gtk_text_child_anchor_register_child (GtkTextChildAnchor *anchor,
g_return_if_fail (GTK_IS_WIDGET (child));
CHECK_IN_BUFFER (anchor);
_gtk_anchored_child_set_layout (child, layout);
_gtk_widget_segment_add (anchor->segment, child);
gtk_text_child_anchor_queue_resize (anchor, layout);
@ -558,15 +560,15 @@ gtk_text_child_anchor_unregister_child (GtkTextChildAnchor *anchor,
g_return_if_fail (GTK_IS_WIDGET (child));
CHECK_IN_BUFFER (anchor);
if (_gtk_anchored_child_get_layout (child))
{
gtk_text_child_anchor_queue_resize (anchor,
_gtk_anchored_child_get_layout (child));
}
_gtk_anchored_child_set_layout (child, NULL);
_gtk_widget_segment_remove (anchor->segment, child);
}
@ -577,22 +579,22 @@ gtk_text_child_anchor_queue_resize (GtkTextChildAnchor *anchor,
GtkTextIter start;
GtkTextIter end;
GtkTextLineSegment *seg;
g_return_if_fail (GTK_IS_TEXT_CHILD_ANCHOR (anchor));
g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout));
CHECK_IN_BUFFER (anchor);
seg = anchor->segment;
if (seg->body.child.tree == NULL)
return;
gtk_text_buffer_get_iter_at_child_anchor (layout->buffer,
&start, anchor);
end = start;
gtk_text_iter_forward_char (&end);
gtk_text_layout_invalidate (layout, &start, &end);
}
@ -602,6 +604,6 @@ gtk_text_anchored_child_set_layout (GtkWidget *child,
{
g_return_if_fail (GTK_IS_WIDGET (child));
g_return_if_fail (layout == NULL || GTK_IS_TEXT_LAYOUT (layout));
_gtk_anchored_child_set_layout (child, layout);
}