[gtk+] Don't use gtk_text_iter_begins_tag() (deprecated)



commit e2d1042b6bcf424d3ae86ebd8e23b8d64ca98bfd
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Dec 6 17:49:01 2015 +0100

    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

 gtk/gtktextbufferrichtext.c |    4 ++--
 gtk/gtktextiter.c           |    6 +++---
 testsuite/gtk/textbuffer.c  |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtktextbufferrichtext.c b/gtk/gtktextbufferrichtext.c
index 7b6fc78..513b43e 100644
--- a/gtk/gtktextbufferrichtext.c
+++ b/gtk/gtktextbufferrichtext.c
@@ -585,10 +585,10 @@ gtk_text_buffer_deserialize (GtkTextBuffer  *register_buffer,
 
               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
                */
-              if (gtk_text_iter_begins_tag (iter, tag))
+              if (gtk_text_iter_starts_tag (iter, tag))
                 split_tags = g_slist_remove (split_tags, tag);
             }
 
diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c
index c806237..dc3891a 100644
--- a/gtk/gtktextiter.c
+++ b/gtk/gtktextiter.c
@@ -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
  * at the end of the tagged range, but that the character
  * 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.
  *
  * 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
  * @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
  * @tag applied to it begins or ends at @iter.
  *
@@ -1323,7 +1323,7 @@ gtk_text_iter_toggles_tag (const GtkTextIter  *iter,
  * @tag: a #GtkTextTag
  *
  * 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
  **/
diff --git a/testsuite/gtk/textbuffer.c b/testsuite/gtk/textbuffer.c
index e1d0e88..3e74c0c 100644
--- a/testsuite/gtk/textbuffer.c
+++ b/testsuite/gtk/textbuffer.c
@@ -200,7 +200,7 @@ check_specific_tag_in_range (GtkTextBuffer     *buffer,
 
           last_offset = this_offset;
           
-          if (gtk_text_iter_begins_tag (&iter, tag))
+          if (gtk_text_iter_starts_tag (&iter, tag))
             {
               if (state)
                 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;
 
-          if (gtk_text_iter_begins_tag (&iter, tag))
+          if (gtk_text_iter_starts_tag (&iter, tag))
             {
               if (!state)
                 g_error ("Tag %p wasn't on when we got to the on toggle going backward?", tag);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]