[gnote] Fix linking to existing note
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix linking to existing note
- Date: Sat, 8 Oct 2011 17:20:37 +0000 (UTC)
commit 5128c8ce31d58c142ecd44e0667e8f899126ab82
Author: Aurimas Äernius <aurisc4 gmail com>
Date: Sat Oct 8 15:35:49 2011 +0300
Fix linking to existing note
When selecting text and pressing "link", the link is not created
when new note is not created (already exists).
src/notewindow.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index ba1e55c..39c9604 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -592,6 +592,12 @@ namespace gnote {
return;
}
}
+ else {
+ Gtk::TextIter start, end;
+ m_note.get_buffer()->get_selection_bounds(start, end);
+ m_note.get_buffer()->remove_tag(m_note.get_tag_table()->get_broken_link_tag(), start, end);
+ m_note.get_buffer()->apply_tag(m_note.get_tag_table()->get_link_tag(), start, end);
+ }
match->get_window()->present();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]