From 64c643920ffdc6b3da6cef13eec61ed3c566e8fd Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 6 Dec 2009 11:54:23 -0500 Subject: [PATCH] Feature - Special tags - Implemented the 'nonag' tag that prevents nag messages for a task. --- ChangeLog | 2 ++ src/recur.cpp | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index c43c91078..537e47d9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ + Added feature #341 that makes explicit references to the task and taskrc man pages, both in the auto-generated .taskrc file and the version command output (thanks to Cory Donnelly). + + Added special 'nonag' tag that suppresses nag messages for a task. + + Added special 'nocolor' tag that suppresses colorization rules for a task. + Fixed bug that showed a calendar for the year 2037 when 'task calendar due' was run, and there are no tasks with due dates. + Fixed bug #316 which caused the timesheet report to display an oddly sorted diff --git a/src/recur.cpp b/src/recur.cpp index 6be0927a1..c4f6438d7 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -399,8 +399,15 @@ int getDueState (const std::string& due) } //////////////////////////////////////////////////////////////////////////////// +// Returns a Boolean indicator as to whether a nag message was generated, so +// that commands can control the number of nag messages displayed (ie one is +// enough). bool nag (Task& task) { + // Special tag overrides nagging. + if (task.hasTag ("nonag")) + return false; + std::string nagMessage = context.config.get ("nag", ""); if (nagMessage != "") {