[tomboy/gnome-2-26] Always share NoteTagTable, saving a bit of memory and removing a poorly-tested code path.



commit 05139e973168a1c44c661bba260b688ea98a3795
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date:   Sat May 2 07:43:13 2009 -0700

    Always share NoteTagTable, saving a bit of memory and removing a poorly-tested code path.
    
    We no longer support versions of gtkspell that choke on shared TagTables.
---
 Tomboy/Note.cs     |    9 ---------
 Tomboy/Watchers.cs |   17 ++++-------------
 2 files changed, 4 insertions(+), 22 deletions(-)

diff --git a/Tomboy/Note.cs b/Tomboy/Note.cs
index 8a4868a..0ab1586 100644
--- a/Tomboy/Note.cs
+++ b/Tomboy/Note.cs
@@ -937,19 +937,10 @@ namespace Tomboy
 		{
 			get {
 				if (tag_table == null) {
-					#if FIXED_GTKSPELL
 					// NOTE: Sharing the same TagTable means
 					// that formatting is duplicated between
 					// buffers.
 					tag_table = NoteTagTable.Instance;
-					#else
-					// NOTE: GtkSpell chokes on shared
-					// TagTables because it blindly tries to
-					// create a new "gtkspell-misspelling"
-					// tag, which fails if one already
-					// exists in the table.
-					tag_table = new NoteTagTable ();
-					#endif
 				}
 				return tag_table;
 			}
diff --git a/Tomboy/Watchers.cs b/Tomboy/Watchers.cs
index 212cf13..4d3750d 100644
--- a/Tomboy/Watchers.cs
+++ b/Tomboy/Watchers.cs
@@ -399,9 +399,8 @@ namespace Tomboy
 
 		public override void OnNoteOpened ()
 		{
-			#if FIXED_GTKSPELL
-			// NOTE: This hack helps avoid multiple URL opens for
-			// cases where the GtkSpell version is fixed to allow
+			// NOTE: This hack helps avoid multiple URL opens
+			// now that Notes always perform
 			// TagTable sharing.  This is because if the TagTable is
 			// shared, we will connect to the same Tag's event
 			// source each time a note is opened, and get called
@@ -411,9 +410,6 @@ namespace Tomboy
 				url_tag.Activated += OnUrlTagActivated;
 				text_event_connected = true;
 			}
-			#else
-			url_tag.Activated += OnUrlTagActivated;
-			#endif
 
 			click_mark = Buffer.CreateMark (null, Buffer.StartIter, true);
 
@@ -622,9 +618,8 @@ namespace Tomboy
 
 		public override void OnNoteOpened ()
 		{
-			#if FIXED_GTKSPELL
-			// NOTE: This avoid multiple link opens for cases where
-			// the GtkSpell version is fixed to allow TagTable
+			// NOTE: This avoids multiple link opens
+			// now that notes always perform TagTable
 			// sharing.  This is because if the TagTable is shared,
 			// we will connect to the same Tag's event source each
 			// time a note is opened, and get called multiple times
@@ -634,10 +629,6 @@ namespace Tomboy
 				broken_link_tag.Activated += OnLinkTagActivated;
 				text_event_connected = true;
 			}
-			#else
-			link_tag.Activated += OnLinkTagActivated;
-			broken_link_tag.Activated += OnLinkTagActivated;
-			#endif
 
 			Buffer.InsertText += OnInsertText;
 			Buffer.DeleteRange += OnDeleteRange;



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