Show total number of results for google driver too. Helps to know if my query resulte...
[beagle.git] / search / Tiles / TextDocument.cs
blob56b4f26c4fd5d1d27927de6b6374ea7fe77a6a4f
1 using System;
2 using Mono.Unix;
4 namespace Search.Tiles {
6 public class TextDocumentActivator : TileActivator {
8 public TextDocumentActivator () : base ()
10 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.sun.xml.writer"));
11 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.sun.xml.writer.template"));
12 AddSupportedFlavor (new HitFlavor (null, "File", "application/msword"));
13 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.ms-word"));
14 AddSupportedFlavor (new HitFlavor (null, "File", "application/x-msword"));
15 AddSupportedFlavor (new HitFlavor (null, "File", "application/pdf"));
16 AddSupportedFlavor (new HitFlavor (null, "File", "application/x-abiword"));
17 AddSupportedFlavor (new HitFlavor (null, "File", "application/rtf"));
18 AddSupportedFlavor (new HitFlavor (null, "File", "application/x-chm"));
19 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.oasis.opendocument.text"));
20 AddSupportedFlavor (new HitFlavor (null, "File", "application/vnd.oasis.opendocument.text.template"));
23 public override Tile BuildTile (Beagle.Hit hit, Beagle.Query query)
25 return new TextDocument (hit, query);
29 public class TextDocument : TileFile {
31 public TextDocument (Beagle.Hit hit, Beagle.Query query) : base (hit, query)
33 Group = TileGroup.Documents;
35 if (Hit ["fixme:page-count"] != null) {
36 int count = Int32.Parse (Hit ["fixme:page-count"]);
37 Description = String.Format (Catalog.GetPluralString ("{0} page", "{0} pages", count), count);