diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 2bee95696..468bf48bf 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -568,7 +568,14 @@ void TDB2::synch () { context.timer_synch.start (); - // TODO Need stub here. + // TODO Get local synch_key. + // TODO Get backlog. + // TODO Compose synch ticket. + // TODO Issue synch ticket. + // TODO Receive synch response. + // TODO Extract remotes. + // TODO Apply remotes. + // TODO Store synch_key. context.timer_synch.stop (); } diff --git a/src/commands/CmdDelete.cpp b/src/commands/CmdDelete.cpp index a24e8417b..f332b9923 100644 --- a/src/commands/CmdDelete.cpp +++ b/src/commands/CmdDelete.cpp @@ -71,13 +71,20 @@ int CmdDelete::execute (std::string& output) { Task before (*task); - if (task->getStatus () == Task::pending || + if (task->getStatus () == Task::pending || + task->getStatus () == Task::completed || task->getStatus () == Task::waiting) { // Delete the specified task. - std::string question = format (STRING_CMD_DELETE_CONFIRM, - task->id, - task->get ("description")); + std::string question; + if (task->id) + question = format (STRING_CMD_DELETE_CONFIRM, + task->id, + task->get ("description")); + else + question = format (STRING_CMD_DELETE_CONFIRM, + task->get ("uuid"), + task->get ("description")); modify_task_annotate (*task, modifications); task->setStatus (Task::deleted); @@ -133,7 +140,7 @@ int CmdDelete::execute (std::string& output) } else { - std::cout << format (STRING_CMD_DELETE_NOTPEND, + std::cout << format (STRING_CMD_DELETE_NOT_DEL, task->id, task->get ("description")) << "\n"; diff --git a/src/en-US.h b/src/en-US.h index 27cf44a81..70fc55e51 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -297,7 +297,7 @@ #define STRING_CMD_DELETE_TASK_R "Deleting recurring task {1} '{2}'." #define STRING_CMD_DELETE_CONFIRM_R "This is a recurring task. Do you want to delete all pending recurrences of this same task?" #define STRING_CMD_DELETE_NO "Task not deleted." -#define STRING_CMD_DELETE_NOTPEND "Task {1} '{2}' is neither pending nor waiting." +#define STRING_CMD_DELETE_NOT_DEL "Task {1} '{2}' is not deletable." #define STRING_CMD_DELETE_1 "Deleted {1} task." #define STRING_CMD_DELETE_N "Deleted {1} tasks."