checking and unchecking subtask done
authorDaniel <mr.picklepinosaur@gmail.com>
Fri, 2 Apr 2021 14:16:57 +0000 (10:16 -0400)
committerDaniel <mr.picklepinosaur@gmail.com>
Fri, 2 Apr 2021 14:16:57 +0000 (10:16 -0400)
taskasaur.c

index d091e55..3d787e6 100644 (file)
@@ -202,6 +202,10 @@ popup_handleinput(BoardMenu* boardmenu, int ch)
             break;
 
         case BINDING_TOGGLE_DONE:
+            {
+                SubTask* curitem_data = (SubTask*)get_menuitem_userdata(get_menu_item(popupmenu_menu, get_selected_item(popupmenu_menu))); 
+                curitem_data->done = (curitem_data->done == SubTaskState_todo) ? SubTaskState_done : SubTaskState_todo;
+            }
 
             break;