? ch
? f-spot-view.desktop.in
? f-spot.pc
? tag_filter.patch
? dbus-sharp/Makefile
? dbus-sharp/Makefile.in
? dbus-sharp/NDesk.DBus.dll
? dbus-sharp/NDesk.DBus.dll.mdb
? dbus-sharp-glib/Makefile
? dbus-sharp-glib/Makefile.in
? dbus-sharp-glib/NDesk.DBus.GLib.dll
? dbus-sharp-glib/NDesk.DBus.GLib.dll.mdb
? po/stamp-it
? src/MenuButton.cs
? src/TagSelectionFilter.cs
? src/f-spot.gladep
? src/qw.patch
? tools/NONE
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/f-spot/ChangeLog,v
retrieving revision 1.1623
diff -u -r1.1623 ChangeLog
--- ChangeLog	11 Oct 2006 21:16:49 -0000	1.1623
+++ ChangeLog	12 Oct 2006 00:19:02 -0000
@@ -1,3 +1,15 @@
+2006-10-10  Gabriel Burt  <gabriel.burt@gmail.com>
+
+	* src/Makefile.am:
+	* src/TagSelectionFilter.cs: Add new file.
+
+	* src/MainWindow.cs:
+	* src/Preferences.cs:
+	* src/TagSelectionWidget.cs:
+	* src/f-spot.glade: Add a filter entry above the tag treeview.  It allows
+	you to choose the "toplevel" tag whose children are shown in the treeview,
+	making managing many many tags easier.  It is hidden by default.
+
 2006-10-11  Larry Ewing  <lewing@novell.com>
 
 	* src/Makefile.am (CSC): add BROKEN_RSVG flag to the build.
Index: src/MainWindow.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/MainWindow.cs,v
retrieving revision 1.311
diff -u -r1.311 MainWindow.cs
--- src/MainWindow.cs	6 Oct 2006 01:23:08 -0000	1.311
+++ src/MainWindow.cs	12 Oct 2006 00:19:05 -0000
@@ -75,6 +75,7 @@
 	[Glade.Widget] CheckMenuItem display_timeline;
 	[Glade.Widget] CheckMenuItem display_dates_menu_item;
 	[Glade.Widget] CheckMenuItem display_tags_menu_item;
+	[Glade.Widget] CheckMenuItem display_tag_filter_menu_item;
 
 	[Glade.Widget] MenuItem zoom_in;
 	[Glade.Widget] MenuItem zoom_out;
@@ -108,6 +109,7 @@
 	[Glade.Widget] Gtk.Image near_image;
 	[Glade.Widget] Gtk.Image far_image;
 
+	[Glade.Widget] Gtk.HBox tagview_filter_box;
 	[Glade.Widget] Gtk.HBox tagbar;
 	[Glade.Widget] Gtk.Entry tag_entry;
 
@@ -129,6 +131,8 @@
 	FSpot.GroupSelector group_selector;
 	FSpot.QueryWidget query_widget;
 	MainSelection selection;
+
+	TagSelectionFilter tagview_filter;
 	
 	FSpot.Delay slide_delay;
 
@@ -263,6 +267,10 @@
 		tag_selection_widget.ButtonPressEvent += HandleTagSelectionButtonPressEvent;
 		tag_selection_widget.PopupMenu += HandleTagSelectionPopupMenu;
 		tag_selection_widget.RowActivated += HandleTagSelectionRowActivated;
+
+        tagview_filter = new TagSelectionFilter(tag_selection_widget);
+        tagview_filter_box.PackStart (tagview_filter.CancelButton, false, false, 2);
+        tagview_filter_box.PackStart (tagview_filter.Entry, true, true, 2);
 		
 		info_box = new InfoBox ();
 		info_box.VersionIdChanged += HandleInfoBoxVersionIdChange;
@@ -385,6 +393,7 @@
 
 		LoadPreference (Preferences.SHOW_TOOLBAR);
 		LoadPreference (Preferences.SHOW_SIDEBAR);
+		LoadPreference (Preferences.SHOW_TAG_FILTER);
 		LoadPreference (Preferences.SHOW_TIMELINE);
 		
 		Preferences.SettingChanged += OnPreferencesChanged;
@@ -1620,6 +1629,7 @@
 		Preferences.Set (Preferences.SHOW_SIDEBAR,		info_vpaned.Visible);
 		Preferences.Set (Preferences.SHOW_TIMELINE,		group_selector.Visible);
 		Preferences.Set (Preferences.SHOW_TAGS,			icon_view.DisplayTags);
+		Preferences.Set (Preferences.SHOW_TAG_FILTER,	tagview_filter_box.Visible);
 		Preferences.Set (Preferences.SHOW_DATES,		icon_view.DisplayDates);
 
 		Preferences.Set (Preferences.GROUP_ADAPTOR,		(group_selector.Adaptor is DirectoryAdaptor) ? 1 : 0);
@@ -1906,6 +1916,14 @@
 	{
 		icon_view.DisplayTags = !icon_view.DisplayTags;
 	}
+
+	void HandleDisplayTagFilter (object sender, EventArgs args)
+	{
+		if (tagview_filter_box.Visible)
+			tagview_filter_box.Hide ();
+		else
+			tagview_filter_box.Show ();
+	}
 	
 	void HandleDisplayDates (object sender, EventArgs args)
 	{
@@ -2455,6 +2473,11 @@
 			if (display_tags_menu_item.Active != (bool) val)
 				display_tags_menu_item.Active = (bool) val;
 			break;
+
+		case Preferences.SHOW_TAG_FILTER:
+			if (display_tag_filter_menu_item.Active != (bool) val)
+				display_tag_filter_menu_item.Active = (bool) val;
+			break;
 		
 		case Preferences.SHOW_DATES:
 			if (display_dates_menu_item.Active != (bool) val)
@@ -2795,6 +2818,13 @@
 		}
 
 		mime_application.Launch (uri_list);
+	}
+
+	public void HandleFilterTags (object sender, EventArgs args)
+	{
+        display_tag_filter_menu_item.Active = true;
+        tagview_filter_box.Show ();
+        tagview_filter.Entry.GrabFocus ();
 	}
 
 	public void GetWidgetPosition(Widget widget, out int x, out int y)
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/f-spot/src/Makefile.am,v
retrieving revision 1.75
diff -u -r1.75 Makefile.am
--- src/Makefile.am	11 Oct 2006 21:16:50 -0000	1.75
+++ src/Makefile.am	12 Oct 2006 00:19:05 -0000
@@ -127,6 +127,7 @@
 	$(srcdir)/CameraSelectionDialog.cs	\
 	$(srcdir)/CameraFileSelectionDialog.cs	\
 	$(srcdir)/TagSelectionDialog.cs		\
+	$(srcdir)/TagSelectionFilter.cs		\
 	$(srcdir)/Widgets/CairoUtils.cs		\
 	$(srcdir)/Widgets/CompositeUtils.cs	\
 	$(srcdir)/Widgets/GdkUtils.cs		\
Index: src/Preferences.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/Preferences.cs,v
retrieving revision 1.17
diff -u -r1.17 Preferences.cs
--- src/Preferences.cs	13 Sep 2006 19:36:27 -0000	1.17
+++ src/Preferences.cs	12 Oct 2006 00:19:05 -0000
@@ -45,6 +45,7 @@
 		public const string SHOW_SIDEBAR = "/apps/f-spot/ui/show_sidebar";
 		public const string SHOW_TIMELINE = "/apps/f-spot/ui/show_timeline";
 		public const string SHOW_TAGS = "/apps/f-spot/ui/show_tags";
+		public const string SHOW_TAG_FILTER = "/apps/f-spot/ui/show_tag_filter";
 		public const string SHOW_DATES = "/apps/f-spot/ui/show_dates";
 		public const string EXPANDED_TAGS = "/apps/f-spot/ui/expanded_tags";
 		
@@ -120,6 +121,7 @@
 			
 			case METADATA_EMBED_IN_IMAGE:
 			case MAIN_WINDOW_MAXIMIZED:
+			case SHOW_TAG_FILTER:
 				return false;
 
 			case GROUP_ADAPTOR:
Index: src/TagSelectionWidget.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/TagSelectionWidget.cs,v
retrieving revision 1.38
diff -u -r1.38 TagSelectionWidget.cs
--- src/TagSelectionWidget.cs	6 Oct 2006 01:23:08 -0000	1.38
+++ src/TagSelectionWidget.cs	12 Oct 2006 00:19:05 -0000
@@ -48,6 +48,29 @@
 	// Hash of the IDs of the selected tags.
 	private Hashtable selection;
 
+    private Category root;
+    public Category RootCategory {
+        get { return root; }
+
+        set {
+            if (root != value) {
+                if (root == tag_store.RootCategory) {
+                    SaveExpandDefaults ();
+                }
+
+                root = value;
+                Update();
+
+                if (root == tag_store.RootCategory) {
+                    CollapseAll ();
+                    ExpandDefaults ();
+                } else {
+                    ExpandAll ();
+                }
+            }
+        }
+    }
+
 	public Tag TagAtPosition (int x, int y) 
 	{
 		TreePath path;
@@ -101,11 +124,11 @@
 
 	public bool IsSelected (Tag tag)
 	{
-		if (tag == tag_store.RootCategory)
+		if (tag == RootCategory)
 			return false;
 		else if (selection.ContainsKey (tag.Id))
 			return true;
-		else if (tag.Category != tag_store.RootCategory && IsSelected (tag.Category))
+		else if (tag.Category != RootCategory && IsSelected (tag.Category))
 			return true;
 		else
 			return false;
@@ -127,7 +150,7 @@
 	public Tag [] TagSelection {
 		get {
 			ArrayList selection = new ArrayList ();
-			GetSelectionForCategory (selection, tag_store.RootCategory);
+			GetSelectionForCategory (selection, RootCategory);
 
 			// For some reason an empty Tag [] causes crasher problems
 			if (selection.Count == 0)
@@ -137,7 +160,7 @@
 		}
 
 		set {
-			UnselectTagsForCategory (tag_store.RootCategory);
+			UnselectTagsForCategory (RootCategory);
 
 			foreach (Tag t in value)
 				Select (t);
@@ -216,11 +239,16 @@
 		// Gtk.TreeIter (since it's a struct, and not a class).
 		// 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, t.Name);
-			if (t is Category)
-				LoadCategory (t as Category, iter);
-		}
+        if (RootCategory != tag_store.RootCategory) {
+			TreeIter iter = (Model as TreeStore).AppendValues (RootCategory.Id, RootCategory.Name);
+            LoadCategory (RootCategory, iter);
+        } else {
+            foreach (Tag t in RootCategory.Children) {
+                TreeIter iter = (Model as TreeStore).AppendValues (t.Id, t.Name);
+                if (t is Category)
+                    LoadCategory (t as Category, iter);
+            }
+        }
 	}
 
 
@@ -491,12 +519,12 @@
 		}
 	}
 
-	void ExpandDefaults ()
+	public void ExpandDefaults ()
 	{
-		object val = FSpot.Preferences.Get (FSpot.Preferences.EXPANDED_TAGS);
+		int [] val = FSpot.Preferences.Get (FSpot.Preferences.EXPANDED_TAGS) as int[];
 
 		if (val == null)
-			ExpandAll ();
+			CollapseAll ();
 		else {
 			TreeIter [] iters = ModelIters ();
 			if (iters == null || iters.Length == 0)
@@ -570,9 +598,12 @@
 			}
 		}
 
-		if (expanded_tags.Count > 0)
-			FSpot.Preferences.Set (	FSpot.Preferences.EXPANDED_TAGS,
+		if (expanded_tags.Count > 0) {
+			FSpot.Preferences.Set (FSpot.Preferences.EXPANDED_TAGS,
 						(int []) expanded_tags.ToArray (typeof (int)));
+        } else {
+			FSpot.Preferences.Set (FSpot.Preferences.EXPANDED_TAGS, "");
+        }
 	}
 
 	public void EditSelectedTagName ()
@@ -672,6 +703,7 @@
 		AppendColumn (complete_column);
 
 		this.tag_store = tag_store;
+        root = tag_store.RootCategory;
 		selection = new Hashtable ();
 
 		Update ();
Index: src/f-spot.glade
===================================================================
RCS file: /cvs/gnome/f-spot/src/f-spot.glade,v
retrieving revision 1.177
diff -u -r1.177 f-spot.glade
--- src/f-spot.glade	10 Oct 2006 18:57:34 -0000	1.177
+++ src/f-spot.glade	12 Oct 2006 00:19:19 -0000
@@ -8920,6 +8920,16 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkCheckMenuItem" id="display_tag_filter_menu_item">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Display Tag _Filter</property>
+		      <property name="use_underline">True</property>
+		      <property name="active">True</property>
+		      <signal name="activate" handler="HandleDisplayTagFilter" last_modification_time="Sun, 10 Oct 2004 21:30:58 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
 		    <widget class="GtkCheckMenuItem" id="display_dates_menu_item">
 		      <property name="visible">True</property>
 		      <property name="label" translatable="yes">Display _Dates</property>
@@ -9018,7 +9028,6 @@
 	      <child>
 		<widget class="GtkMenu" id="find_menu">
 
-		  
 		  <child>
 		    <widget class="GtkImageMenuItem" id="find_by_tag">
 		      <property name="visible">True</property>
@@ -9026,6 +9035,7 @@
 		      <property name="use_underline">True</property>
 		      <signal name="activate" handler="HandleFindByTag" last_modification_time="Tue, 10 Aug 2004 07:08:24 GMT"/>
 		      <accelerator key="f" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+
 		      <child internal-child="image">
 			<widget class="GtkImage" id="image35">
 			  <property name="visible">True</property>
@@ -9046,6 +9056,7 @@
 		      <property name="label" translatable="yes"></property>
 		      <property name="use_underline">True</property>
 		      <signal name="activate" handler="HandleIncludeTag" last_modification_time="Tue, 10 Aug 2004 07:08:24 GMT"/>
+
 		      <child internal-child="image">
 			<widget class="GtkImage" id="image35">
 			  <property name="visible">True</property>
@@ -9073,13 +9084,13 @@
 		  <child>
 		    <widget class="GtkMenuItem" id="clear_tag_query">
 		      <property name="visible">True</property>
+		      <property name="sensitive">False</property>
 		      <property name="label" translatable="yes">_Clear Tag Search</property>
 		      <property name="use_underline">True</property>
-		      <property name="sensitive">False</property>
 		      <signal name="activate" handler="HandleClearTagSearch" last_modification_time="Tue, 10 Aug 2004 07:08:24 GMT"/>
 		    </widget>
 		  </child>
-		  
+
 		  <child>
 		    <widget class="GtkSeparatorMenuItem" id="separator225">
 		      <property name="visible">True</property>
@@ -9098,9 +9109,9 @@
 		  <child>
 		    <widget class="GtkMenuItem" id="clear_date_range">
 		      <property name="visible">True</property>
+		      <property name="sensitive">False</property>
 		      <property name="label" translatable="yes">Clea_r Date Range</property>
 		      <property name="use_underline">True</property>
-		      <property name="sensitive">False</property>
 		      <signal name="activate" handler="HandleClearDateRange" last_modification_time="Tue, 10 Aug 2004 07:08:24 GMT"/>
 		    </widget>
 		  </child>
@@ -9120,7 +9131,6 @@
 		      <signal name="activate" handler="HandleFindUntagged"/>
 		    </widget>
 		  </child>
-
 		</widget>
 	      </child>
 	    </widget>
@@ -9145,6 +9155,16 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkMenuItem" id="filter_tags_item">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">_Filter Tags</property>
+		      <property name="use_underline">True</property>
+		      <signal name="activate" handler="HandleFilterTags" last_modification_time="Tue, 09 Dec 2003 20:42:48 GMT"/>
+		      <accelerator key="l" modifiers="GDK_CONTROL_MASK" signal="activate"/>
+		    </widget>
+		  </child>
+
+		  <child>
 		    <widget class="GtkSeparatorMenuItem" id="separator8">
 		      <property name="visible">True</property>
 		    </widget>
@@ -9266,7 +9286,20 @@
 		      <property name="spacing">0</property>
 
 		      <child>
-			<placeholder/>
+			<widget class="GtkHBox" id="tagview_filter_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">4</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">8</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
 		      </child>
 
 		      <child>
