diff options
-rw-r--r-- | todo/gui/tags/panel/dialog.py | 2 | ||||
-rw-r--r-- | todo/gui/tags/panel/table/menu.py | 2 | ||||
-rw-r--r-- | todo/gui/tags/panel/table/widget.py | 4 | ||||
-rw-r--r-- | todo/gui/tasks/table/widget.py | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/todo/gui/tags/panel/dialog.py b/todo/gui/tags/panel/dialog.py index f1a669c..6a0e5c4 100644 --- a/todo/gui/tags/panel/dialog.py +++ b/todo/gui/tags/panel/dialog.py @@ -23,7 +23,7 @@ def update(parent_widget, update_tag_signal, row, tag): return widget(parent_widget, "Modify a tag", "modify", tag, on_update) -def show_delete(table, rows): +def confirm_delete(table, rows): confirm = QtWidgets.QMessageBox.question( table, "Tag deletion", diff --git a/todo/gui/tags/panel/table/menu.py b/todo/gui/tags/panel/table/menu.py index e286051..0446841 100644 --- a/todo/gui/tags/panel/table/menu.py +++ b/todo/gui/tags/panel/table/menu.py @@ -32,4 +32,4 @@ def open(table, update_tag_signal, position): tag = table.model().get_at(row) todo.gui.tags.panel.dialog.update(table, update_tag_signal, row, tag).exec_() elif action == delete_action: - todo.gui.tags.panel.dialog.show_delete(table, rows) + todo.gui.tags.panel.dialog.confirm_delete(table, rows) diff --git a/todo/gui/tags/panel/table/widget.py b/todo/gui/tags/panel/table/widget.py index b36759d..1d10c73 100644 --- a/todo/gui/tags/panel/table/widget.py +++ b/todo/gui/tags/panel/table/widget.py @@ -62,8 +62,8 @@ class Widget(QtWidgets.QTableView): elif event.key() == Qt.Key_Delete: rows = self.get_selected_rows() tags = self.model().row_ids(rows) - if not db.task_tags.one_is_used(todo.database.cursor(), tags): - todo.gui.tags.panel.dialog.show_delete(self, rows) + if not todo.db.task_tags.one_is_used(todo.database.cursor(), tags): + todo.gui.tags.panel.dialog.confirm_delete(self, rows) def get_selected_rows(self): return list(set([index.row() for index in self.selectedIndexes()])) diff --git a/todo/gui/tasks/table/widget.py b/todo/gui/tasks/table/widget.py index 9e810af..b379abc 100644 --- a/todo/gui/tasks/table/widget.py +++ b/todo/gui/tasks/table/widget.py @@ -189,7 +189,7 @@ class Widget(QtWidgets.QTableWidget): todo.gui.tasks.dialog.update(self, self._update_task_signal, row, task, tags).exec_() elif event.key() == Qt.Key_Delete: rows = self.get_selected_rows() - todo.gui.tasks.dialog.show_delete(self, rows, lambda: self.delete_rows(rows)) + todo.gui.tasks.dialog.confirm_delete(self, rows, lambda: self.delete_rows(rows)) def delete_rows(self, rows: List[int]): task_ids = [task.id for i, task in enumerate(self._tasks) if i in rows] |