diff options
author | Joris | 2020-06-06 09:07:42 +0200 |
---|---|---|
committer | Joris | 2020-06-06 09:07:42 +0200 |
commit | b244640288648f27ce1fc7be3f175703e0a3412b (patch) | |
tree | db0221e72626461837c5c30080454c1fb954a8a0 /src/gui/tasks/dialog.py | |
parent | 3844f76d18e376777ca4d7c124df6d6b4896a361 (diff) |
Add menu options to update tasks status
Diffstat (limited to 'src/gui/tasks/dialog.py')
-rw-r--r-- | src/gui/tasks/dialog.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/tasks/dialog.py b/src/gui/tasks/dialog.py index 3233dd6..2bf3b6b 100644 --- a/src/gui/tasks/dialog.py +++ b/src/gui/tasks/dialog.py @@ -26,7 +26,7 @@ def update(parent_widget, update_task_signal, row: int, task: Task, tags: List[i return widget(parent_widget, "Modify a task", "modify", task, tags, on_update) -def show_delete(parent, rows: List[int], on_delete): +def confirm_delete(parent, rows: List[int], on_confirm): confirm = QtWidgets.QMessageBox.question( parent, "Task deletion", @@ -35,7 +35,18 @@ def show_delete(parent, rows: List[int], on_delete): QtWidgets.QMessageBox.Yes) if confirm == QtWidgets.QMessageBox.Yes: - on_delete() + on_confirm() + +def confirm_move(parent, rows: List[int], move_to: Status, on_confirm): + confirm = QtWidgets.QMessageBox.question( + parent, + "Task move", + "Do you really want to move the selected tasks ?", + QtWidgets.QMessageBox.No | QtWidgets.QMessageBox.Yes, + QtWidgets.QMessageBox.Yes) + + if confirm == QtWidgets.QMessageBox.Yes: + on_confirm() def widget( parent: QtWidgets.QWidget, |