- Implemented description.desc
This commit is contained in:
Paul Beckingham 2011-05-03 00:58:06 -04:00
parent d0cbf43478
commit f37a250894
2 changed files with 15 additions and 4 deletions

View file

@ -65,9 +65,20 @@ void ColumnDescription::measure (Task& task, int& minimum, int& maximum)
{
}
// The text
// Just the text
else if (_style == "desc")
{
maximum = description.length ();
minimum = 0;
Nibbler nibbler (description);
std::string word;
while (nibbler.getUntilWS (word))
{
nibbler.skipWS ();
if (word.length () > minimum)
minimum = word.length ();
}
}
// The text <date> <anno> ...

View file

@ -94,8 +94,8 @@ int main (int argc, char** argv)
// view.add (Column::factory ("tags.indicator"));
view.add (Column::factory ("tags.count"));
// view.add (Column::factory ("description"));
// view.add (Column::factory ("description.desc"));
view.add (Column::factory ("description.truncated"));
view.add (Column::factory ("description.desc"));
// view.add (Column::factory ("description.truncated"));
// view.add (Column::factory ("depends"));
// view.add (Column::factory ("depends.count"));
view.add (Column::factory ("depends.indicator"));
@ -110,7 +110,7 @@ int main (int argc, char** argv)
// view.add (Column::factory ("due.iso"));
view.add (Column::factory ("start.active"));
view.add (Column::factory ("urgency"));
view.width (100);
view.width (context.getWidth ());
view.leftMargin (4);
/*
view.extraPadding (1);