beagle r4429 - in trunk/beagle: Filters search/Tiles



Author: llipka
Date: Mon Jan 28 12:17:40 2008
New Revision: 4429
URL: http://svn.gnome.org/viewvc/beagle?rev=4429&view=rev

Log:
More fixes to the man filter and tile.

Modified:
   trunk/beagle/Filters/FilterMan.cs
   trunk/beagle/search/Tiles/Documentation.cs

Modified: trunk/beagle/Filters/FilterMan.cs
==============================================================================
--- trunk/beagle/Filters/FilterMan.cs	(original)
+++ trunk/beagle/Filters/FilterMan.cs	Mon Jan 28 12:17:40 2008
@@ -208,8 +208,10 @@
 				return;
 			}
 
-			foreach (Match match in matches)
-				AddProperty (Beagle.Property.New ("dc:title", match.Groups ["title"].ToString ()));
+			foreach (Match match in matches) {
+				string title = ProcessMacros (match.Groups ["title"].ToString ());
+				AddProperty (Beagle.Property.New ("dc:title", title));
+			}
 		}
 
 		private string HandleSH (string line)

Modified: trunk/beagle/search/Tiles/Documentation.cs
==============================================================================
--- trunk/beagle/search/Tiles/Documentation.cs	(original)
+++ trunk/beagle/search/Tiles/Documentation.cs	Mon Jan 28 12:17:40 2008
@@ -16,7 +16,6 @@
 		public DocumentationActivator () : base ()
 		{
 			AddSupportedFlavor (new HitFlavor (null, "File", null));
-			AddSupportedFlavor (new HitFlavor (null, "DocbookEntry", null));
 		}
 
 		public override bool Validate (Beagle.Hit hit)
@@ -24,7 +23,7 @@
 			if (! base.Validate (hit))
 				return false;
 			
-			if (hit.Type != "DocbookEntry" && hit ["beagle:FileType"] != "documentation")
+			if (hit ["beagle:FileType"] != "documentation")
 				return false;
 			
 			Weight += 2;
@@ -54,7 +53,7 @@
 			else
 				path = hit.Uri.LocalPath;
 
-			Description = Catalog.GetString ("Documentation");
+			Description = hit.GetFirstProperty ("dc:subject") ?? Catalog.GetString ("Documentation");
 		}
 
 		protected override void LoadIcon (Gtk.Image image, int size)



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