- Fixed bug #1210 so that widths are taken from localized strings
  instead of hardcoded.
This commit is contained in:
Scott Kostyshak 2013-03-26 19:17:42 -04:00 committed by Paul Beckingham
parent e88b52b67d
commit 6c0561cb4d
2 changed files with 13 additions and 11 deletions

View file

@ -99,6 +99,8 @@ Bugs
for the user's home directory (thanks to Jakub Wilk).
+ Fixed bug #1209, spelling mistake in reference page (thanks to Friedrich
Heusler).
+ Fixed bug #1210 so that widths are taken from localized strings instead of
hardcoded.
+ Improved hyphenation by splitting on commas (even if no whitespace after).
Leads to better output of, for example, 'task show', where comma-separated
lists are common.

View file

@ -31,6 +31,7 @@
#include <ColStatus.h>
#include <text.h>
#include <i18n.h>
#include <utf8.h>
extern Context context;
@ -80,17 +81,16 @@ void ColumnStatus::measure (Task& task, unsigned int& minimum, unsigned int& max
if (_style == "default" ||
_style == "long")
{
if (status == Task::pending ||
status == Task::deleted ||
status == Task::waiting)
{
minimum = maximum = 7;
}
else if (status == Task::completed ||
status == Task::recurring)
{
minimum = maximum = 9;
}
if (status == Task::pending)
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_PE);
else if (status == Task::deleted)
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_DE);
else if (status == Task::waiting)
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_WA);
else if (status == Task::completed)
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_CO);
else if (status == Task::recurring)
minimum = maximum = utf8_width (STRING_COLUMN_LABEL_STAT_RE);
}
else if (_style == "short")
minimum = maximum = 1;