Configuration

- New 'recurrence' configuration setting can disable recurring task generation.
This commit is contained in:
Paul Beckingham 2015-01-25 15:41:31 -05:00
parent 8323407242
commit 4bdee56fa7
6 changed files with 15 additions and 0 deletions

View file

@ -82,6 +82,7 @@ std::string Config::_defaults =
"# # Comma-separated list. May contain any subset of:\n"
"#verbose=blank,header,footnote,label,new-id,new-uuid,affected,edit,special,project,sync,filter\n"
"confirmation=yes # Confirmation on delete, big changes\n"
"recurrence=yes # Enable recurrence\n"
"recurrence.confirmation=prompt # Confirmation for propagating changes among recurring tasks (yes/no/prompt)\n"
"allow.empty.filter=yes # An empty filter gets a warning and requires confirmation\n"
"indent.annotation=2 # Indent spaces for annotations\n"

View file

@ -172,6 +172,7 @@ int CmdShow::execute (std::string& output)
" monthsperline"
" nag"
" print.empty.columns"
" recurrence"
" recurrence.confirmation"
" recurrence.indicator"
" recurrence.limit"

View file

@ -54,6 +54,11 @@ extern Context context;
// child tasks need to be generated to fill gaps.
void handleRecurrence ()
{
// Recurrence can be disabled.
// Note: This is currently a workaround for TD-44, TW-1520.
if (! context.config.getBoolean ("recurrence"))
return;
std::vector <Task> tasks = context.tdb2.pending.get_tasks ();
Date now;