static int CompareCategoriesSortFunc(Gtk.TreeModel model,
Gtk.TreeIter a,
Gtk.TreeIter b)
{
ICategory categoryA = model.GetValue (a, 0) as ICategory;
ICategory categoryB = model.GetValue (b, 0) as ICategory;
if (categoryA == null || categoryB == null)
return 0;
if (categoryA is Tasque.AllCategory)
return -1;
else if (categoryB is Tasque.AllCategory)
return 1;
return (categoryA.Name.CompareTo (categoryB.Name));
}