added remove task button
[ptask.git] / src / tw.c
index 89b2761..43760d4 100644 (file)
--- a/src/tw.c
+++ b/src/tw.c
@@ -359,6 +359,21 @@ void tw_done(const char *uuid)
        free(opts);
 }
 
+void tw_task_remove(const char *uuid)
+{
+       char *opts;
+
+       opts = malloc(1
+                     + strlen(uuid)
+                     + strlen(" delete")
+                     + 1);
+       sprintf(opts, " %s delete", uuid);
+
+       tw_exec(opts);
+
+       free(opts);
+}
+
 static void task_free(struct task *task)
 {
        if (!task)