diff options
author | Joris | 2020-06-07 12:45:22 +0200 |
---|---|---|
committer | Joris | 2020-06-07 12:45:22 +0200 |
commit | d45a2e5cfe945519e3c8e3f72b92d5c13b4364f5 (patch) | |
tree | f94a9ae3aa3fefddf49f8b974ccfce2fa6278ef6 | |
parent | 7a927042ba94fd5b164683edeed669cf31232559 (diff) |
Remove update status dialog confirmation
-rw-r--r-- | todo/gui/tasks/dialog.py | 11 | ||||
-rw-r--r-- | todo/gui/tasks/table/menu.py | 6 |
2 files changed, 3 insertions, 14 deletions
diff --git a/todo/gui/tasks/dialog.py b/todo/gui/tasks/dialog.py index c2bd164..3d9e3c0 100644 --- a/todo/gui/tasks/dialog.py +++ b/todo/gui/tasks/dialog.py @@ -35,17 +35,6 @@ def confirm_delete(parent, rows: List[int], on_confirm): if confirm == QtWidgets.QMessageBox.Yes: 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, title: str, diff --git a/todo/gui/tasks/table/menu.py b/todo/gui/tasks/table/menu.py index bc039b2..78c85ac 100644 --- a/todo/gui/tasks/table/menu.py +++ b/todo/gui/tasks/table/menu.py @@ -41,8 +41,8 @@ def open(table: QtWidgets.QTableWidget, status: Status, update_task_signal, posi elif action == delete_action: todo.gui.tasks.dialog.confirm_delete(table, rows, lambda: table.delete_rows(rows)) elif action == move_to_ready: - todo.gui.tasks.dialog.confirm_move(table, rows, Status.READY, lambda: table.update_status(rows, Status.READY)) + table.update_status(rows, Status.READY) elif action == move_to_waiting: - todo.gui.tasks.dialog.confirm_move(table, rows, Status.WAITING, lambda: table.update_status(rows, Status.WAITING)) + table.update_status(rows, Status.WAITING) elif action == move_to_maybe: - todo.gui.tasks.dialog.confirm_move(table, rows, Status.MAYBE, lambda: table.update_status(rows, Status.MAYBE)) + table.update_status(rows, Status.MAYBE) |