diff --git a/ChangeLog b/ChangeLog index add15c0e5..397653a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,8 @@ and John Florian). + New "recurring" report to list all recurring tasks. + 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: att mods diff --git a/src/Att.cpp b/src/Att.cpp index 65b2efb59..eb2e5bf10 100644 --- a/src/Att.cpp +++ b/src/Att.cpp @@ -560,7 +560,7 @@ bool Att::match (const Att& other) const { Date literal ((time_t)::atoi (mValue.c_str ())); Date variable ((time_t)::atoi (other.mValue.c_str ())); - if (! (variable < literal)) + if (other.mValue == "" || ! (variable < literal)) return false; } else if (which == "number") diff --git a/src/Config.cpp b/src/Config.cpp index 0f67e8c6f..6d16a725f 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -119,43 +119,43 @@ void Config::createDefault (const std::string& home) FILE* out; if ((out = fopen (rcFile.c_str (), "w"))) { - fprintf (out, "data.location=%s\n", dataDir.c_str ()); // TODO i18n - fprintf (out, "confirmation=yes\n"); // TODO i18n - fprintf (out, "echo.command=yes\n"); // TODO i18n - fprintf (out, "next=2\n"); // TODO i18n - fprintf (out, "dateformat=m/d/Y\n"); // TODO i18n - fprintf (out, "#monthsperline=2\n"); // TODO i18n - fprintf (out, "#defaultwidth=80\n"); // TODO i18n - fprintf (out, "curses=on\n"); // TODO i18n - fprintf (out, "color=on\n"); // TODO i18n - fprintf (out, "due=7\n"); // TODO i18n - fprintf (out, "nag=You have higher priority tasks.\n"); // TODO i18n - fprintf (out, "locking=on\n"); // TODO i18n - fprintf (out, "#editor=vi\n"); // TODO i18n - fprintf (out, "weekstart=Sunday\n"); // TODO i18n - fprintf (out, "displayweeknumber=yes\n"); // TODO i18n + fprintf (out, "data.location=%s\n", dataDir.c_str ()); + fprintf (out, "confirmation=yes\n"); + fprintf (out, "echo.command=yes\n"); + fprintf (out, "next=2\n"); + fprintf (out, "dateformat=m/d/Y\n"); + fprintf (out, "#monthsperline=2\n"); + fprintf (out, "#defaultwidth=80\n"); + fprintf (out, "curses=on\n"); + fprintf (out, "color=on\n"); + fprintf (out, "due=7\n"); + fprintf (out, "nag=You have higher priority tasks.\n"); + fprintf (out, "locking=on\n"); + fprintf (out, "#editor=vi\n"); + fprintf (out, "weekstart=Sunday\n"); + fprintf (out, "displayweeknumber=yes\n"); - fprintf (out, "color.overdue=bold_red\n"); // TODO i18n - fprintf (out, "color.due=bold_yellow\n"); // TODO i18n - fprintf (out, "color.pri.H=bold\n"); // TODO i18n - fprintf (out, "#color.pri.M=on_yellow\n"); // TODO i18n - fprintf (out, "#color.pri.L=on_green\n"); // TODO i18n - fprintf (out, "#color.pri.none=white on_blue\n"); // TODO i18n - fprintf (out, "color.active=bold_cyan\n"); // TODO i18n - fprintf (out, "color.tagged=yellow\n"); // TODO i18n - fprintf (out, "#color.tag.bug=yellow\n"); // TODO i18n - fprintf (out, "#color.project.garden=on_green\n"); // TODO i18n - fprintf (out, "#color.keyword.car=on_blue\n"); // TODO i18n - fprintf (out, "#color.recurring=on_red\n"); // TODO i18n - fprintf (out, "#color.header=bold_green\n"); // TODO i18n - fprintf (out, "#color.footnote=bold_green\n"); // TODO i18n - fprintf (out, "#color.message=bold_red\n"); // TODO i18n - fprintf (out, "#shadow.file=%s/shadow.txt\n", dataDir.c_str ()); // TODO i18n - fprintf (out, "#shadow.command=list\n"); // TODO i18n - fprintf (out, "#shadow.notify=on\n"); // TODO i18n - fprintf (out, "#default.project=foo\n"); // TODO i18n - fprintf (out, "#default.priority=M\n"); // TODO i18n - fprintf (out, "default.command=list\n"); // TODO i18n + fprintf (out, "color.overdue=bold_red\n"); + fprintf (out, "color.due=bold_yellow\n"); + fprintf (out, "color.pri.H=bold\n"); + fprintf (out, "#color.pri.M=on_yellow\n"); + fprintf (out, "#color.pri.L=on_green\n"); + fprintf (out, "#color.pri.none=white on_blue\n"); + fprintf (out, "color.active=bold_cyan\n"); + fprintf (out, "color.tagged=yellow\n"); + fprintf (out, "#color.tag.bug=yellow\n"); + fprintf (out, "#color.project.garden=on_green\n"); + fprintf (out, "#color.keyword.car=on_blue\n"); + fprintf (out, "#color.recurring=on_red\n"); + fprintf (out, "#color.header=bold_green\n"); + fprintf (out, "#color.footnote=bold_green\n"); + fprintf (out, "#color.message=bold_red\n"); + fprintf (out, "#shadow.file=%s/shadow.txt\n", dataDir.c_str ()); + fprintf (out, "#shadow.command=list\n"); + fprintf (out, "#shadow.notify=on\n"); + fprintf (out, "#default.project=foo\n"); + fprintf (out, "#default.priority=M\n"); + fprintf (out, "default.command=list\n"); // Custom reports. fprintf (out, "# Fields: id,uuid,project,priority,entry,start,due,recur,age,active,tags,description\n"); // TODO i18n diff --git a/src/Permission.cpp b/src/Permission.cpp index b8d5dcf8c..d729821a9 100644 --- a/src/Permission.cpp +++ b/src/Permission.cpp @@ -26,14 +26,20 @@ //////////////////////////////////////////////////////////////////////////////// #include "Permission.h" +#include "Context.h" #include "util.h" #include "i18n.h" +extern Context context; + //////////////////////////////////////////////////////////////////////////////// Permission::Permission () : needConfirmation (false) , allConfirmed (false) { + // Turning confirmations off is the same as entering "all". + if (context.config.get ("confirmation", true) == false) + allConfirmed = true; } ////////////////////////////////////////////////////////////////////////////////