Commands - _urgency

- Migrated _urgency to CmdUrgency.
This commit is contained in:
Paul Beckingham 2011-05-28 14:07:21 -04:00
parent 9af1c71daf
commit bd93126f4e
8 changed files with 124 additions and 39 deletions

View file

@ -411,41 +411,6 @@ int handleCompletionConfig (std::string& outs)
return 0;
}
////////////////////////////////////////////////////////////////////////////////
// Temporary command to display urgency for a task.
int handleUrgency (std::string& outs)
{
// Get all the tasks.
std::vector <Task> tasks;
context.tdb.lock (context.config.getBoolean ("locking"));
handleRecurrence ();
context.tdb.loadPending (tasks, context.filter);
context.tdb.commit ();
context.tdb.unlock ();
// Filter sequence.
context.filter.applySequence (tasks, context.sequence);
if (tasks.size () == 0)
{
std::cout << "No tasks specified.\n";
return 1;
}
// Find the task(s).
std::stringstream out;
foreach (task, tasks)
{
out << "task "
<< task->id
<< " urgency "
<< task->urgency ()
<< "\n";
}
outs = out.str ();
return 0;
}
////////////////////////////////////////////////////////////////////////////////
int handleQuery (std::string& outs)
{