Make labels in the details pane selectable
[beagle.git] / search / Tiles / TileFlat.cs
blob4ce922f6cc0b7c019750fe6565ded952b220854e
1 using System;
2 using Gtk;
4 namespace Search.Tiles {
6 public abstract class TileFlat : Tile {
8 protected Gtk.Label Subject, From, Date;
10 protected TileFlat (Beagle.Hit hit, Beagle.Query query) : base (hit, query)
12 Subject = WidgetFu.NewLabel ();
13 WidgetFu.EllipsizeLabel (Subject, 40);
14 HBox.PackStart (Subject, true, true, 3);
16 From = WidgetFu.NewLabel ();
17 From.UseMarkup = true;
18 WidgetFu.EllipsizeLabel (From, 20);
19 HBox.PackStart (From, false, false, 3);
21 Date = WidgetFu.NewLabel ();
22 HBox.PackStart (Date, false, false, 3);
24 HBox.ShowAll ();
27 protected override void OnRealized ()
29 base.OnRealized ();
31 if ((Icon.StorageType == ImageType.Empty || Icon.StorageType == ImageType.Pixbuf) &&
32 Icon.Pixbuf == null)
33 LoadIcon (Icon, 16);
36 public Gtk.Label SubjectLabel {
37 get { return Subject; }
40 public Gtk.Label FromLabel {
41 get { return From; }
44 public Gtk.Label DateLabel {
45 get { return Date; }