CmdProjects: Migrated from ViewText to Table

This commit is contained in:
Paul Beckingham 2016-12-17 14:47:12 -05:00
parent c1d4cea638
commit c69dfba6bb

View file

@ -30,7 +30,7 @@
#include <sstream> #include <sstream>
#include <Context.h> #include <Context.h>
#include <Filter.h> #include <Filter.h>
#include <ViewText.h> #include <Table.h>
#include <format.h> #include <format.h>
#include <util.h> #include <util.h>
#include <i18n.h> #include <i18n.h>
@ -105,10 +105,10 @@ int CmdProjects::execute (std::string& output)
if (unique.size ()) if (unique.size ())
{ {
// Render a list of project names from the map. // Render a list of project names from the map.
ViewText view; Table view;
view.width (context.getWidth ()); view.width (context.getWidth ());
view.add (Column::factory ("string", STRING_COLUMN_LABEL_PROJECT)); view.add (STRING_COLUMN_LABEL_PROJECT);
view.add (Column::factory ("string.right", STRING_COLUMN_LABEL_TASKS)); view.add (STRING_COLUMN_LABEL_TASKS, false);
if (context.color ()) if (context.color ())
{ {