mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug Fix - Att::match
- Fixed bug in Att::match that causes blank dates to be interpreted as 12/31/1969, and therefore pass "xxx.before:" tests. - Added the "cal" symlink trick to ChangeLog. - Removed incorrect i18n tags from Config.cpp. - Allowed .taskrc:confirmation=no to bypass Permission checking.
This commit is contained in:
parent
7e0a1759f9
commit
facb4dcb41
4 changed files with 45 additions and 37 deletions
|
@ -37,6 +37,8 @@
|
||||||
and John Florian).
|
and John Florian).
|
||||||
+ New "recurring" report to list all recurring tasks.
|
+ New "recurring" report to list all recurring tasks.
|
||||||
+ New, more flexible, more consistent, grep-able file format.
|
+ New, more flexible, more consistent, grep-able file format.
|
||||||
|
+ If task is renamed to "cal", or there is a symlink to task called "cal",
|
||||||
|
then task can act as a replacement for the Unix "cal" command.
|
||||||
|
|
||||||
Add:
|
Add:
|
||||||
att mods
|
att mods
|
||||||
|
|
|
@ -560,7 +560,7 @@ bool Att::match (const Att& other) const
|
||||||
{
|
{
|
||||||
Date literal ((time_t)::atoi (mValue.c_str ()));
|
Date literal ((time_t)::atoi (mValue.c_str ()));
|
||||||
Date variable ((time_t)::atoi (other.mValue.c_str ()));
|
Date variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||||
if (! (variable < literal))
|
if (other.mValue == "" || ! (variable < literal))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (which == "number")
|
else if (which == "number")
|
||||||
|
|
|
@ -119,43 +119,43 @@ void Config::createDefault (const std::string& home)
|
||||||
FILE* out;
|
FILE* out;
|
||||||
if ((out = fopen (rcFile.c_str (), "w")))
|
if ((out = fopen (rcFile.c_str (), "w")))
|
||||||
{
|
{
|
||||||
fprintf (out, "data.location=%s\n", dataDir.c_str ()); // TODO i18n
|
fprintf (out, "data.location=%s\n", dataDir.c_str ());
|
||||||
fprintf (out, "confirmation=yes\n"); // TODO i18n
|
fprintf (out, "confirmation=yes\n");
|
||||||
fprintf (out, "echo.command=yes\n"); // TODO i18n
|
fprintf (out, "echo.command=yes\n");
|
||||||
fprintf (out, "next=2\n"); // TODO i18n
|
fprintf (out, "next=2\n");
|
||||||
fprintf (out, "dateformat=m/d/Y\n"); // TODO i18n
|
fprintf (out, "dateformat=m/d/Y\n");
|
||||||
fprintf (out, "#monthsperline=2\n"); // TODO i18n
|
fprintf (out, "#monthsperline=2\n");
|
||||||
fprintf (out, "#defaultwidth=80\n"); // TODO i18n
|
fprintf (out, "#defaultwidth=80\n");
|
||||||
fprintf (out, "curses=on\n"); // TODO i18n
|
fprintf (out, "curses=on\n");
|
||||||
fprintf (out, "color=on\n"); // TODO i18n
|
fprintf (out, "color=on\n");
|
||||||
fprintf (out, "due=7\n"); // TODO i18n
|
fprintf (out, "due=7\n");
|
||||||
fprintf (out, "nag=You have higher priority tasks.\n"); // TODO i18n
|
fprintf (out, "nag=You have higher priority tasks.\n");
|
||||||
fprintf (out, "locking=on\n"); // TODO i18n
|
fprintf (out, "locking=on\n");
|
||||||
fprintf (out, "#editor=vi\n"); // TODO i18n
|
fprintf (out, "#editor=vi\n");
|
||||||
fprintf (out, "weekstart=Sunday\n"); // TODO i18n
|
fprintf (out, "weekstart=Sunday\n");
|
||||||
fprintf (out, "displayweeknumber=yes\n"); // TODO i18n
|
fprintf (out, "displayweeknumber=yes\n");
|
||||||
|
|
||||||
fprintf (out, "color.overdue=bold_red\n"); // TODO i18n
|
fprintf (out, "color.overdue=bold_red\n");
|
||||||
fprintf (out, "color.due=bold_yellow\n"); // TODO i18n
|
fprintf (out, "color.due=bold_yellow\n");
|
||||||
fprintf (out, "color.pri.H=bold\n"); // TODO i18n
|
fprintf (out, "color.pri.H=bold\n");
|
||||||
fprintf (out, "#color.pri.M=on_yellow\n"); // TODO i18n
|
fprintf (out, "#color.pri.M=on_yellow\n");
|
||||||
fprintf (out, "#color.pri.L=on_green\n"); // TODO i18n
|
fprintf (out, "#color.pri.L=on_green\n");
|
||||||
fprintf (out, "#color.pri.none=white on_blue\n"); // TODO i18n
|
fprintf (out, "#color.pri.none=white on_blue\n");
|
||||||
fprintf (out, "color.active=bold_cyan\n"); // TODO i18n
|
fprintf (out, "color.active=bold_cyan\n");
|
||||||
fprintf (out, "color.tagged=yellow\n"); // TODO i18n
|
fprintf (out, "color.tagged=yellow\n");
|
||||||
fprintf (out, "#color.tag.bug=yellow\n"); // TODO i18n
|
fprintf (out, "#color.tag.bug=yellow\n");
|
||||||
fprintf (out, "#color.project.garden=on_green\n"); // TODO i18n
|
fprintf (out, "#color.project.garden=on_green\n");
|
||||||
fprintf (out, "#color.keyword.car=on_blue\n"); // TODO i18n
|
fprintf (out, "#color.keyword.car=on_blue\n");
|
||||||
fprintf (out, "#color.recurring=on_red\n"); // TODO i18n
|
fprintf (out, "#color.recurring=on_red\n");
|
||||||
fprintf (out, "#color.header=bold_green\n"); // TODO i18n
|
fprintf (out, "#color.header=bold_green\n");
|
||||||
fprintf (out, "#color.footnote=bold_green\n"); // TODO i18n
|
fprintf (out, "#color.footnote=bold_green\n");
|
||||||
fprintf (out, "#color.message=bold_red\n"); // TODO i18n
|
fprintf (out, "#color.message=bold_red\n");
|
||||||
fprintf (out, "#shadow.file=%s/shadow.txt\n", dataDir.c_str ()); // TODO i18n
|
fprintf (out, "#shadow.file=%s/shadow.txt\n", dataDir.c_str ());
|
||||||
fprintf (out, "#shadow.command=list\n"); // TODO i18n
|
fprintf (out, "#shadow.command=list\n");
|
||||||
fprintf (out, "#shadow.notify=on\n"); // TODO i18n
|
fprintf (out, "#shadow.notify=on\n");
|
||||||
fprintf (out, "#default.project=foo\n"); // TODO i18n
|
fprintf (out, "#default.project=foo\n");
|
||||||
fprintf (out, "#default.priority=M\n"); // TODO i18n
|
fprintf (out, "#default.priority=M\n");
|
||||||
fprintf (out, "default.command=list\n"); // TODO i18n
|
fprintf (out, "default.command=list\n");
|
||||||
|
|
||||||
// Custom reports.
|
// Custom reports.
|
||||||
fprintf (out, "# Fields: id,uuid,project,priority,entry,start,due,recur,age,active,tags,description\n"); // TODO i18n
|
fprintf (out, "# Fields: id,uuid,project,priority,entry,start,due,recur,age,active,tags,description\n"); // TODO i18n
|
||||||
|
|
|
@ -26,14 +26,20 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "Permission.h"
|
#include "Permission.h"
|
||||||
|
#include "Context.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
|
||||||
|
extern Context context;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
Permission::Permission ()
|
Permission::Permission ()
|
||||||
: needConfirmation (false)
|
: needConfirmation (false)
|
||||||
, allConfirmed (false)
|
, allConfirmed (false)
|
||||||
{
|
{
|
||||||
|
// Turning confirmations off is the same as entering "all".
|
||||||
|
if (context.config.get ("confirmation", true) == false)
|
||||||
|
allConfirmed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue