4 namespace Search
.Tiles
{
6 public class CalendarActivator
: TileActivator
{
8 public CalendarActivator () : base ()
10 AddSupportedFlavor (new HitFlavor (null, "Calendar", null));
13 public override Tile
BuildTile (Beagle
.Hit hit
, Beagle
.Query query
)
15 return new Calendar (hit
, query
);
19 public class Calendar
: TileTemplate
{
21 public Calendar (Beagle
.Hit hit
, Beagle
.Query query
) : base (hit
, query
)
23 string summary
= hit
.GetFirstProperty ("fixme:summary");
24 string time
= Utils
.NiceShortDate (hit
.GetFirstProperty ("fixme:starttime"));
25 Title
= (time
== "") ? summary
: time
+ ": " + summary
;
26 Description
= hit
.GetFirstProperty ("fixme:description");
29 protected override void LoadIcon (Gtk
.Image image
, int size
)
31 image
.Pixbuf
= WidgetFu
.LoadThemeIcon ("stock_calendar", size
);
34 protected override DetailsPane
GetDetails ()
36 DetailsPane details
= new DetailsPane ();
38 details
.AddLabelPair (Catalog
.GetString ("Title:"),
41 details
.AddLabelPair (Catalog
.GetString ("Description:"),
44 details
.AddSnippet (2, 1);