[gnote/gnome-3-10] Do not remove link tag when adding another



commit 259e6a8d6d82381703cf56acdd9f71ce9e2c8e14
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Wed Oct 9 23:16:20 2013 +0300

    Do not remove link tag when adding another
    
    Fixes Bug 702160, Bug 702239.

 src/watchers.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 7e53e3e..3caa976 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -865,9 +865,11 @@ namespace gnote {
   }
 
 
-  void NoteLinkWatcher::on_apply_tag(const Glib::RefPtr<Gtk::TextBuffer::Tag> & /*tag*/,
+  void NoteLinkWatcher::on_apply_tag(const Glib::RefPtr<Gtk::TextBuffer::Tag> & tag,
                                      const Gtk::TextIter & start, const Gtk::TextIter &end)
   {
+    if (tag->property_name() != get_note()->get_tag_table()->get_link_tag()->property_name())
+      return;
     std::string link_name = start.get_text (end);
     Note::Ptr link = manager().find (link_name);
     if(!link)


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