Priority: Converted 'priority' attribute to a UDA
- 'priority.long' and 'priority.short' formats now map to 'priority', and
generate a warning.
- Man page updated.
- Converted priority urgency coefficients to UDA equivalents.
- Converted priority color rules to UDA color rules.
- Removed 'default.priority' support.
- Removed special sort handling for 'priority' field in Variant, added special
UDA sort handling.
- Removed ColPriority.{h,cpp} source files.
- Removed asorted newly-unused variables.
- The 'show' command now highlights unused priority settings.
- Removed unused localized priority-relateѕ strings.
- Added legacy mapping for columns and sort columns for 'priority.long' and
'priority.short' columns in report definitions.
- Removed priority color rules implementation.
- Removed obsolete tests for #860, #990, custom.priority_long.t.
- Updated various tests that set priority default, colors.
This commit is contained in:
21
src/sort.cpp
21
src/sort.cpp
@@ -79,8 +79,6 @@ static bool sort_compare (int left, int right)
|
||||
int right_number;
|
||||
float left_real;
|
||||
float right_real;
|
||||
char left_char;
|
||||
char right_char;
|
||||
|
||||
std::vector <std::string>::iterator k;
|
||||
for (k = global_keys.begin (); k != global_keys.end (); ++k)
|
||||
@@ -133,25 +131,6 @@ static bool sort_compare (int left, int right)
|
||||
: (left_string > right_string);
|
||||
}
|
||||
|
||||
// Priority.
|
||||
else if (field == "priority")
|
||||
{
|
||||
left_char = ((*global_data)[left].get (field))[0];
|
||||
right_char = ((*global_data)[right].get (field))[0];
|
||||
|
||||
if (left_char == right_char)
|
||||
continue;
|
||||
|
||||
if (ascending)
|
||||
return (left_char == '\0' && right_char != '\0') ||
|
||||
(left_char == 'L' && (right_char == 'M' || right_char == 'H')) ||
|
||||
(left_char == 'M' && right_char == 'H');
|
||||
|
||||
return (left_char != '\0' && right_char == '\0') ||
|
||||
(left_char == 'M' && right_char == 'L') ||
|
||||
(left_char == 'H' && (right_char == 'M' || right_char == 'L'));
|
||||
}
|
||||
|
||||
// Due Date.
|
||||
else if (field == "due")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user