[gnote/gnome-3-10] Fix spell-check breaking note links
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote/gnome-3-10] Fix spell-check breaking note links
- Date: Sun, 27 Oct 2013 14:38:06 +0000 (UTC)
commit 0b0d90b4f45bfa4ecf0a77703225522d5f78c077
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sun Oct 6 16:08:49 2013 +0300
Fix spell-check breaking note links
Fixes Bug 703664.
src/watchers.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/watchers.cpp b/src/watchers.cpp
index 45a28f2..7e53e3e 100644
--- a/src/watchers.cpp
+++ b/src/watchers.cpp
@@ -309,7 +309,7 @@ namespace gnote {
}
m_tag_applied_cid = get_buffer()->signal_apply_tag().connect(
- sigc::mem_fun(*this, &NoteSpellChecker::tag_applied));
+ sigc::mem_fun(*this, &NoteSpellChecker::tag_applied), false); // connect before
if (!m_obj_ptr) {
m_obj_ptr = gtk_spell_checker_new();
@@ -360,7 +360,8 @@ namespace gnote {
const Glib::RefPtr<const Gtk::TextTag>& atag(*tag_iter);
if ((tag != atag) &&
!NoteTagTable::tag_is_spell_checkable (atag)) {
- remove = true;
+ // cancel attempt to add misspelled tag on non-spell-check place
+ get_buffer()->signal_apply_tag().emission_stop();
break;
}
}
@@ -370,6 +371,7 @@ namespace gnote {
}
if (remove) {
+ // adding non-spell-check tag on misspelled text, remove the spell-check first
get_buffer()->remove_tag_by_name("gtkspell-misspelled",
start_char, end_char);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]