Index: Tomboy.mdp
===================================================================
--- Tomboy.mdp	(revision 1117)
+++ Tomboy.mdp	(working copy)
@@ -43,6 +43,7 @@
     <File name="./Tomboy/Plugins/NoteOfTheDay.cs" subtype="Code" buildaction="Compile" />
     <File name="./Tomboy/Plugins/PrintNotes.cs" subtype="Code" buildaction="Compile" />
     <File name="./Tomboy/Plugins/StickyNoteImport.cs" subtype="Code" buildaction="Compile" />
+    <File name="./Tomboy/CleanBrokenLinksPlugin.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" RelativeMakefileName="./Makefile.am" ExecuteTargetName="run">
     <BuildFilesVar />
Index: Tomboy/PluginManager.cs
===================================================================
--- Tomboy/PluginManager.cs	(revision 1117)
+++ Tomboy/PluginManager.cs	(working copy)
@@ -323,6 +323,7 @@
 			typeof (NoteLinkWatcher),
 			typeof (NoteWikiWatcher),
 			typeof (MouseHandWatcher),
+			typeof (CleanBrokenLinksPlugin),
 			
 			// Not ready yet:
 			// typeof (NoteRelatedToWatcher),
Index: Tomboy/CleanBrokenLinksPlugin.cs
===================================================================
--- Tomboy/CleanBrokenLinksPlugin.cs	(revision 0)
+++ Tomboy/CleanBrokenLinksPlugin.cs	(revision 0)
@@ -0,0 +1,38 @@
+
+using System;
+using Mono.Unix;
+
+namespace Tomboy
+{
+	public class CleanBrokenLinksPlugin : NotePlugin
+	{
+		Gtk.ImageMenuItem item;
+
+		protected override void Initialize ()
+		{
+			item = 
+				new Gtk.ImageMenuItem (Catalog.GetString ("Clean up broken links"));
+			item.Image = new Gtk.Image (Gtk.Stock.Clear, Gtk.IconSize.Menu);
+			item.Activated += OnCleanUpBrokenLinks;
+			item.Show ();
+			AddPluginMenuItem (item);
+		}
+
+		protected override void Shutdown ()
+		{
+			// Disconnect the event handlers so
+			// there aren't any memory leaks.
+			item.Activated -= OnCleanUpBrokenLinks;
+		}
+
+		protected override void OnNoteOpened () 
+		{
+			// Do nothing.
+		}
+		
+		protected void OnCleanUpBrokenLinks (object sender, EventArgs args)
+		{
+			Buffer.RemoveTag ("link:broken", Buffer.StartIter, Buffer.EndIter);
+		}
+	}
+}
Index: Tomboy/Makefile.am
===================================================================
--- Tomboy/Makefile.am	(revision 1117)
+++ Tomboy/Makefile.am	(working copy)
@@ -40,6 +40,7 @@
 	$(srcdir)/Tomboy.cs 			\
 	$(srcdir)/ActionManager.cs		\
 	$(srcdir)/Applet.cs 			\
+	$(srcdir)/CleanBrokenLinksPlugin.cs	\
 	$(srcdir)/Logger.cs			\
 	$(srcdir)/Note.cs 			\
 	$(srcdir)/NoteManager.cs 		\
