void MatchesColumnDataFunc (Gtk.TreeViewColumn column,
Gtk.CellRenderer cell,
Gtk.TreeModel model,
Gtk.TreeIter iter)
{
Gtk.CellRendererText crt = cell as Gtk.CellRendererText;
if (crt == null)
return;
string match_str = "";
Note note = (Note) model.GetValue (iter, 3 /* note */);
if (note != null) {
int match_count;
if (current_matches.TryGetValue (note.Uri, out match_count)) {
if (match_count == int.MaxValue) {
match_str = string.Format (
Catalog.GetString ("Title match"));
} else if (match_count > 0) {
match_str = string.Format (
Catalog.GetPluralString ("{0} match",
"{0} matches",
match_count),
match_count);
}
}
}
crt.Text = match_str;
}