Verbosity

- Implemented new verbosity token 'new-id' which controls whether
  newly generated task IDs are reported.
This commit is contained in:
Paul Beckingham 2011-07-10 10:08:23 -04:00
parent 3456a24749
commit ad55fa2d79
5 changed files with 12 additions and 13 deletions

View file

@ -72,9 +72,8 @@ int CmdAdd::execute (std::string& output)
context.tdb.add (task);
// TODO This should be a call in to feedback.cpp.
#ifdef FEATURE_NEW_ID
output = format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
#endif
if (context.verbose ("new-id"))
output = format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
context.footnote (onProjectChange (task));

View file

@ -110,7 +110,8 @@ int CmdDuplicate::execute (std::string& output)
<< "'.\n";
// TODO This should be a call in to feedback.cpp.
out << format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
if (context.verbose ("new-id"))
out << format (STRING_CMD_ADD_FEEDBACK, context.tdb.nextId ()) + "\n";
context.footnote (onProjectChange (dup));
}