[PATCH] enable the Document Indexer backend.



This patch enables the document indexer backend. I dont know how well it
functions, because I dont have the local_files indexer going. Maybe
someone with that working can test this?

Nat: I noticed the startup in the upper right corner patch didnt get
applied, any reason?

--Todd
Index: backends/DocumentIndexBackend.cs
===================================================================
RCS file: /cvs/gnome/dashboard/backends/DocumentIndexBackend.cs,v
retrieving revision 1.23
diff -u -r1.23 DocumentIndexBackend.cs
--- backends/DocumentIndexBackend.cs	16 Feb 2004 04:48:25 -0000	1.23
+++ backends/DocumentIndexBackend.cs	8 Mar 2004 21:18:17 -0000
@@ -5,6 +5,8 @@
 using Gnome;
 using Dashboard.Index;
 
+[assembly:Dashboard.BackendFactory ("Dashboard.DocumentIndexBackend")]
+
 namespace Dashboard {
 
 	class DocumentIndexBackend : Backend {
@@ -83,13 +85,13 @@
 				matches.Sort ();
 
 				foreach (IndexMatch match in matches) {
-					Match indexmatch = new Match ("File");
+					Match indexmatch = new Match ("File", clue);
 					string icon = Icon.LookupByURI (match.Source.URI);
 					if (icon == null)
 						icon = "internal:document.png";
-					indexmatch.AddItem (new MatchItem ("Icon", icon, "image", "plain", PathToFilename (match.Source.URI)));
-					indexmatch.AddItem (new MatchItem ("Path", match.Source.URI, "text", "plain", PathToFilename (match.Source.URI)));
-					result.AddMatch (indexmatch, clue);
+					indexmatch["Icon"] = icon;
+					indexmatch["Path"] = match.Source.URI;
+					result.AddMatch (indexmatch);
 				}
 			}
 
Index: backends/Makefile.am
===================================================================
RCS file: /cvs/gnome/dashboard/backends/Makefile.am,v
retrieving revision 1.67
diff -u -r1.67 Makefile.am
--- backends/Makefile.am	6 Mar 2004 12:00:40 -0000	1.67
+++ backends/Makefile.am	8 Mar 2004 21:18:17 -0000
@@ -18,7 +18,8 @@
 	MozillaBookmarksBackend.dll	\
 	RSSBackend.dll			\
 	TextChainerBackend.dll		\
-	EvolutionAddressbookBackend.dll 
+	EvolutionAddressbookBackend.dll \
+	DocumentIndexBackend.dll 
 
 # These backends may work fine, but we have consciously decided not to
 # build them by default
@@ -30,7 +31,6 @@
 broken_backends =			\
 	ConversionBackend.dll		\
 	FoafFileBackend.dll		\
-	DocumentIndexBackend.dll	\
 	HTTPBridgeBackend.dll		\
 	RhythmboxLibraryBackend.dll	\
 	RegexpChainerBackend.dll	\


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