5
namespace Tomboy.Backlinks
7
public class BacklinkMenuItem : Gtk.ImageMenuItem, System.IComparable
12
static Gdk.Pixbuf note_icon;
14
static BacklinkMenuItem ()
16
note_icon = GuiUtils.GetIcon ("tomboy-note", 22);
19
public BacklinkMenuItem (Note note, string title_search) :
23
this.title_search = title_search;
24
this.Image = new Gtk.Image (note_icon);
27
protected override void OnActivated ()
32
// Show the title of the note
33
// where the user just came from.
34
NoteFindBar find = note.Window.Find;
37
find.SearchText = title_search;
39
note.Window.Present ();
47
// IComparable interface
48
public int CompareTo (object obj)
50
BacklinkMenuItem other_item = obj as BacklinkMenuItem;
51
return note.Title.CompareTo (other_item.Note.Title);