Feature
- Added new 'indented' format for the 'project' attribute. Note that this is really only useful when a report is sorted by project.
This commit is contained in:
@@ -2,9 +2,14 @@
|
|||||||
------ current release ---------------------------
|
------ current release ---------------------------
|
||||||
|
|
||||||
2.0.1 ()
|
2.0.1 ()
|
||||||
|
|
||||||
|
Features
|
||||||
|
+ Added the new 'indented' format for the 'project' attribute.
|
||||||
|
|
||||||
|
Bugs
|
||||||
|
+ Fixed grammar in feedback string (thanks to Uli Martens).
|
||||||
+ Addressed valgrind complaints (thanks to Bryce Harrington).
|
+ Addressed valgrind complaints (thanks to Bryce Harrington).
|
||||||
+ Removed default configuration value for the obsolete 'annotations' setting.
|
+ Removed default configuration value for the obsolete 'annotations' setting.
|
||||||
+ Fixed grammar in feedback string (thanks to Uli Martens).
|
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <ColProject.h>
|
#include <ColProject.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
|
#include <util.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
|
|
||||||
extern Context context;
|
extern Context context;
|
||||||
@@ -44,9 +45,11 @@ ColumnProject::ColumnProject ()
|
|||||||
|
|
||||||
_styles.push_back ("full");
|
_styles.push_back ("full");
|
||||||
_styles.push_back ("parent");
|
_styles.push_back ("parent");
|
||||||
|
_styles.push_back ("indented");
|
||||||
|
|
||||||
_examples.push_back (STRING_COLUMN_EXAMPLES_PROJ);
|
_examples.push_back (STRING_COLUMN_EXAMPLES_PROJ);
|
||||||
_examples.push_back (STRING_COLUMN_EXAMPLES_PAR);
|
_examples.push_back (STRING_COLUMN_EXAMPLES_PAR);
|
||||||
|
_examples.push_back (STRING_COLUMN_EXAMPLES_IND);
|
||||||
|
|
||||||
_hyphenate = context.config.getBoolean ("hyphenate");
|
_hyphenate = context.config.getBoolean ("hyphenate");
|
||||||
}
|
}
|
||||||
@@ -74,8 +77,13 @@ void ColumnProject::measure (Task& task, int& minimum, int& maximum)
|
|||||||
if (period != std::string::npos)
|
if (period != std::string::npos)
|
||||||
project = project.substr (0, period);
|
project = project.substr (0, period);
|
||||||
}
|
}
|
||||||
else if (_style != "default" &&
|
else if (_style == "indented")
|
||||||
_style != "full")
|
{
|
||||||
|
project = indentProject (project, " ", '.');
|
||||||
|
}
|
||||||
|
else if (_style != "default" &&
|
||||||
|
_style != "full" &&
|
||||||
|
_style != "indented")
|
||||||
throw format (STRING_COLUMN_BAD_FORMAT, _name, _style);
|
throw format (STRING_COLUMN_BAD_FORMAT, _name, _style);
|
||||||
|
|
||||||
minimum = longestWord (project);
|
minimum = longestWord (project);
|
||||||
@@ -96,6 +104,10 @@ void ColumnProject::render (
|
|||||||
if (period != std::string::npos)
|
if (period != std::string::npos)
|
||||||
project = project.substr (0, period);
|
project = project.substr (0, period);
|
||||||
}
|
}
|
||||||
|
else if (_style == "indented")
|
||||||
|
{
|
||||||
|
project = indentProject (project, " ", '.');
|
||||||
|
}
|
||||||
|
|
||||||
std::vector <std::string> raw;
|
std::vector <std::string> raw;
|
||||||
wrapText (raw, project, width, _hyphenate);
|
wrapText (raw, project, width, _hyphenate);
|
||||||
|
|||||||
@@ -187,6 +187,7 @@
|
|||||||
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore"
|
#define STRING_COLUMN_EXAMPLES_TAGS "home @chore"
|
||||||
#define STRING_COLUMN_EXAMPLES_PROJ "home.garden"
|
#define STRING_COLUMN_EXAMPLES_PROJ "home.garden"
|
||||||
#define STRING_COLUMN_EXAMPLES_PAR "home"
|
#define STRING_COLUMN_EXAMPLES_PAR "home"
|
||||||
|
#define STRING_COLUMN_EXAMPLES_IND " home.garden"
|
||||||
#define STRING_COLUMN_EXAMPLES_DESC "Move your clothes down on to the lower peg"
|
#define STRING_COLUMN_EXAMPLES_DESC "Move your clothes down on to the lower peg"
|
||||||
#define STRING_COLUMN_EXAMPLES_ANNO1 "Immediately before your lunch"
|
#define STRING_COLUMN_EXAMPLES_ANNO1 "Immediately before your lunch"
|
||||||
#define STRING_COLUMN_EXAMPLES_ANNO2 "If you are playing in the match this afternoon"
|
#define STRING_COLUMN_EXAMPLES_ANNO2 "If you are playing in the match this afternoon"
|
||||||
|
|||||||
Reference in New Issue
Block a user