Index: TagSelectionWidget.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/TagSelectionWidget.cs,v
retrieving revision 1.16
diff -u -r1.16 TagSelectionWidget.cs
--- TagSelectionWidget.cs	6 May 2005 18:02:30 -0000	1.16
+++ TagSelectionWidget.cs	20 Oct 2005 05:34:56 -0000
@@ -138,7 +138,7 @@
 		Tag [] tags = category.Children;
 
 		foreach (Tag t in tags) {
-			TreeIter iter = (Model as TreeStore).AppendValues (parent_iter, t.Id);
+			TreeIter iter = (Model as TreeStore).AppendValues (parent_iter, t.Id, t.Name);
 			if (t is Category)
 				LoadCategory (t as Category, iter);
 		}
@@ -173,7 +173,7 @@
 		// FIXME: This should be fixed in GTK#...  It's gross.
 
 		foreach (Tag t in tag_store.RootCategory.Children) {
-			TreeIter iter = (Model as TreeStore).AppendValues (t.Id);
+			TreeIter iter = (Model as TreeStore).AppendValues (t.Id, t.Name);
 			if (t is Category)
 				LoadCategory (t as Category, iter);
 		}
@@ -316,12 +316,12 @@
 		bool valid;
 		
 		store.GetValue(src, 0, ref value);
+		Tag tag = (Tag)tag_store.Get((uint)value);
 		if (is_parent) {
-			Tag tag = (Tag)tag_store.Get((uint)value);
 			// we need to figure out where to insert it in the correct order
 			copy = InsertInOrder(dest, is_root, tag);
 		} else { 
-			copy = store.AppendValues(dest, (uint)value);
+			copy = store.AppendValues(dest, (uint)value, tag.Name);
 		}
 		
 		valid = Model.IterChildren(out iter, src);
@@ -351,6 +351,7 @@
 			if (compare.CompareTo(tag) > 0) {
 				store.InsertBefore(out iter, iter);
 				store.SetValue(iter, 0, tag.Id);
+				store.SetValue(iter, 1, tag.Name);
 				return iter;
 			}
 			valid = store.IterNext(ref iter);
@@ -359,7 +360,9 @@
 			store.Append(out iter);
 		else
 			iter = store.Append(parent);
+
 		store.SetValue(iter, 0, tag.Id);
+		store.SetValue(iter, 1, tag.Name);
 		return iter;
 	}	
 			
@@ -396,7 +399,7 @@
 	// Constructor.
 
 	public TagSelectionWidget (TagStore tag_store)
-		: base (new TreeStore (typeof (uint)))
+		: base (new TreeStore (typeof (uint), typeof(string)))
 	{
 		HeadersVisible = false;
 		Selection.Mode = SelectionMode.Multiple;
@@ -404,10 +407,15 @@
 		CellRendererToggle toggle_renderer = new CellRendererToggle ();
 		toggle_renderer.Toggled += new ToggledHandler (OnCellToggled);
 
-		AppendColumn ("check", toggle_renderer, new TreeCellDataFunc (CheckBoxDataFunc));
+		TreeViewColumn column;
+		column = AppendColumn ("check", toggle_renderer, new TreeCellDataFunc (CheckBoxDataFunc));
+		column.SortColumnId = 0;
+
 		AppendColumn ("icon", new CellRendererPixbuf (), new TreeCellDataFunc (IconDataFunc));
-		AppendColumn ("name", new CellRendererText (), new TreeCellDataFunc (NameDataFunc));
 
+		column = AppendColumn ("name", new CellRendererText (), new TreeCellDataFunc (NameDataFunc));
+		column.SortColumnId = 1;
+		
 		this.tag_store = tag_store;
 		selection = new Hashtable ();
 
@@ -416,6 +424,10 @@
 		tag_store.TagDeleted += new TagDeletedHandler(HandleTagDeleted);
 		tag_store.TagCreated += new TagCreatedHandler(HandleTagCreated);
 		tag_store.TagChanged += new TagChangedHandler(HandleTagChanged);
+		
+		// TODO make the search find tags that are not currently expanded
+		EnableSearch = true;
+		SearchColumn = 1;
 	}
 
 
Index: ../ChangeLog
===================================================================
RCS file: /cvs/gnome/f-spot/ChangeLog,v
retrieving revision 1.1047
diff -u -r1.1047 ChangeLog
--- ../ChangeLog	20 Oct 2005 02:42:16 -0000	1.1047
+++ ../ChangeLog	20 Oct 2005 05:39:52 -0000
@@ -1,3 +1,8 @@
+2005-10-20  Gabriel Burt  <gabriel.burt@gmail.com>
+	
+	* src/TagSelectionWidget.cs: modified Model to allow for interactive
+	searching by tag name. Fixes #316051.
+
 2005-10-19  Larry Ewing  <lewing@novell.com>
 
 	* src/Cms.cs: add a new byte ctor that allows an offset.
