Don't use gtk_text_iter_begins_tag() (deprecated)

Use gtk_text_iter_starts_tag() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=759092
This commit is contained in:
Sébastien Wilmet 2015-12-06 17:49:01 +01:00
parent 1dcb3a0f88
commit e2d1042b6b
3 changed files with 7 additions and 7 deletions

View File

@ -585,10 +585,10 @@ gtk_text_buffer_deserialize (GtkTextBuffer *register_buffer,
list = list->next; list = list->next;
/* If a tag begins at the insertion point, ignore it /* If a tag starts at the insertion point, ignore it
* because it doesn't affect the pasted text * because it doesn't affect the pasted text
*/ */
if (gtk_text_iter_begins_tag (iter, tag)) if (gtk_text_iter_starts_tag (iter, tag))
split_tags = g_slist_remove (split_tags, tag); split_tags = g_slist_remove (split_tags, tag);
} }

View File

@ -1238,7 +1238,7 @@ gtk_text_iter_begins_tag (const GtkTextIter *iter,
* Note that if gtk_text_iter_ends_tag() returns %TRUE, it means that @iter is * Note that if gtk_text_iter_ends_tag() returns %TRUE, it means that @iter is
* at the end of the tagged range, but that the character * at the end of the tagged range, but that the character
* at @iter is outside the tagged range. In other words, * at @iter is outside the tagged range. In other words,
* unlike gtk_text_iter_begins_tag(), if gtk_text_iter_ends_tag() returns %TRUE, * unlike gtk_text_iter_starts_tag(), if gtk_text_iter_ends_tag() returns %TRUE,
* gtk_text_iter_has_tag() will return %FALSE for the same parameters. * gtk_text_iter_has_tag() will return %FALSE for the same parameters.
* *
* Returns: whether @iter is the end of a range tagged with @tag * Returns: whether @iter is the end of a range tagged with @tag
@ -1280,7 +1280,7 @@ gtk_text_iter_ends_tag (const GtkTextIter *iter,
* @iter: an iterator * @iter: an iterator
* @tag: (allow-none): a #GtkTextTag, or %NULL * @tag: (allow-none): a #GtkTextTag, or %NULL
* *
* This is equivalent to (gtk_text_iter_begins_tag() || * This is equivalent to (gtk_text_iter_starts_tag() ||
* gtk_text_iter_ends_tag()), i.e. it tells you whether a range with * gtk_text_iter_ends_tag()), i.e. it tells you whether a range with
* @tag applied to it begins or ends at @iter. * @tag applied to it begins or ends at @iter.
* *
@ -1323,7 +1323,7 @@ gtk_text_iter_toggles_tag (const GtkTextIter *iter,
* @tag: a #GtkTextTag * @tag: a #GtkTextTag
* *
* Returns %TRUE if @iter points to a character that is part of a range tagged * Returns %TRUE if @iter points to a character that is part of a range tagged
* with @tag. See also gtk_text_iter_begins_tag() and gtk_text_iter_ends_tag(). * with @tag. See also gtk_text_iter_starts_tag() and gtk_text_iter_ends_tag().
* *
* Returns: whether @iter is tagged with @tag * Returns: whether @iter is tagged with @tag
**/ **/

View File

@ -200,7 +200,7 @@ check_specific_tag_in_range (GtkTextBuffer *buffer,
last_offset = this_offset; last_offset = this_offset;
if (gtk_text_iter_begins_tag (&iter, tag)) if (gtk_text_iter_starts_tag (&iter, tag))
{ {
if (state) if (state)
g_error ("Tag %p is already on, and was toggled on?", tag); g_error ("Tag %p is already on, and was toggled on?", tag);
@ -244,7 +244,7 @@ check_specific_tag_in_range (GtkTextBuffer *buffer,
last_offset = this_offset; last_offset = this_offset;
if (gtk_text_iter_begins_tag (&iter, tag)) if (gtk_text_iter_starts_tag (&iter, tag))
{ {
if (!state) if (!state)
g_error ("Tag %p wasn't on when we got to the on toggle going backward?", tag); g_error ("Tag %p wasn't on when we got to the on toggle going backward?", tag);