[gnote] Replace deprecated begins_tag with starts_tag in NoteBuffer



commit 25f9cb8c2698a62e0a016cd761e2f815935328cc
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Fri May 7 23:07:53 2021 +0300

    Replace deprecated begins_tag with starts_tag in NoteBuffer

 src/notebuffer.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/notebuffer.cpp b/src/notebuffer.cpp
index 4fa76ab8..6572ce8a 100644
--- a/src/notebuffer.cpp
+++ b/src/notebuffer.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2017,2019-2020 Aurimas Cernius
+ * Copyright (C) 2010-2017,2019-2021 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -217,7 +217,7 @@ namespace gnote {
       if (find_depth_tag(iter)) {
         iter.forward_chars(2);
       }
-      if(iter.begins_tag(tag) || iter.has_tag(tag)) {
+      if(iter.starts_tag(tag) || iter.has_tag(tag)) {
         // consider tag active only if it applies to the entire selection
         if (iter.forward_to_tag_toggle(tag)) {
           return select_end <= iter;
@@ -680,7 +680,7 @@ namespace gnote {
     for(Glib::SListHandle<Glib::RefPtr<Gtk::TextTag> >::const_iterator tag_iter = tag_list.begin();
         tag_iter != tag_list.end(); ++tag_iter) {
       const Glib::RefPtr<Gtk::TextTag> & tag(*tag_iter);
-      if (!iter.begins_tag(tag) && NoteTagTable::tag_is_growable(tag)) {
+      if(!iter.starts_tag(tag) && NoteTagTable::tag_is_growable(tag)) {
         m_active_tags.push_back(tag);
       }
     }
@@ -1213,8 +1213,7 @@ namespace gnote {
       for(Glib::SListHandle<Glib::RefPtr<Gtk::TextTag> >::const_iterator tag_iter = tag_list2.begin();
           tag_iter != tag_list2.end(); ++tag_iter) {
         const Glib::RefPtr<Gtk::TextTag> & tag(*tag_iter);
-        if (iter.begins_tag (tag)) {
-
+        if(iter.starts_tag(tag)) {
           if (!(DepthNoteTag::Ptr::cast_dynamic(tag)) && NoteTagTable::tag_is_serializable(tag)) {
             write_tag (tag, xml, true);
             tag_stack.push (tag);


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