TDB2: Migrated from ViewText to Table

This commit is contained in:
Paul Beckingham 2016-12-17 20:10:21 -05:00
parent 17fc9e5a91
commit 6c90de1974
2 changed files with 8 additions and 8 deletions

View file

@ -37,6 +37,7 @@
#include <Color.h> #include <Color.h>
#include <ISO8601.h> #include <ISO8601.h>
#include <i18n.h> #include <i18n.h>
#include <Table.h>
#include <shared.h> #include <shared.h>
#include <format.h> #include <format.h>
#include <main.h> #include <main.h>
@ -1043,12 +1044,12 @@ void TDB2::show_diff (
// Attributes are all there is, so figure the different attribute names // Attributes are all there is, so figure the different attribute names
// between before and after. // between before and after.
ViewText view; Table view;
view.width (context.getWidth ()); view.width (context.getWidth ());
view.intraPadding (2); view.intraPadding (2);
view.add (Column::factory ("string", "")); view.add ("");
view.add (Column::factory ("string", STRING_TDB2_UNDO_PRIOR)); view.add (STRING_TDB2_UNDO_PRIOR);
view.add (Column::factory ("string", STRING_TDB2_UNDO_CURRENT)); view.add (STRING_TDB2_UNDO_CURRENT);
Color label (context.config.get ("color.label")); Color label (context.config.get ("color.label"));
view.colorHeader (label); view.colorHeader (label);
@ -1141,11 +1142,11 @@ void TDB2::show_diff (
Task after (current); Task after (current);
// Generate table header. // Generate table header.
ViewText view; Table view;
view.width (context.getWidth ()); view.width (context.getWidth ());
view.intraPadding (2); view.intraPadding (2);
view.add (Column::factory ("string", "")); view.add ("");
view.add (Column::factory ("string", "")); view.add ("");
int row = view.addRow (); int row = view.addRow ();
view.set (row, 0, STRING_TDB2_DIFF_PREV, color_red); view.set (row, 0, STRING_TDB2_DIFF_PREV, color_red);

View file

@ -33,7 +33,6 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <stdio.h> #include <stdio.h>
#include <ViewText.h>
#include <FS.h> #include <FS.h>
#include <Task.h> #include <Task.h>