From d45a2e5cfe945519e3c8e3f72b92d5c13b4364f5 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 7 Jun 2020 12:45:22 +0200 Subject: Remove update status dialog confirmation --- todo/gui/tasks/dialog.py | 11 ----------- 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) -- cgit v1.2.3