Exemple #1
0
        static void DescriptionDataFunc(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter)
        {
            var  textRenderer = (CellRendererText)cell;
            Task task         = model.GetValue(iter, DataColumns.Task) as Task;
            var  text         = model.GetValue(iter, DataColumns.Description) as string;

            if (task == null)
            {
                if (model.IterParent(out iter, iter))
                {
                    task = model.GetValue(iter, DataColumns.Task) as Task;
                    if (task == null)
                    {
                        textRenderer.Text = "";
                        return;
                    }
                }
                else
                {
                    textRenderer.Text = "";
                    return;
                }
            }
            SetText(textRenderer, model, iter, task, text);
        }