Skip to content

Commit

Permalink
fix: use QMessageBox.StandardButton.No
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiesel committed Feb 7, 2024
1 parent 88e01ba commit c7e15c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions addon/card_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def CardLayout_init_hook(self, mw: AnkiQt, note: Note, *args, **kwargs):
"You are able to edit the template for the note type by editing the corresponding HTML and CSS files inside the add-on directory.\n\n"
"Do you want to open that directory now?\n\n"
"Note: If you edit the templates be aware that updates to the add-on will overwrite those files.",
QMessageBox.StandardButton.Yes | QMessageBox.No,
QMessageBox.No,
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
QMessageBox.StandardButton.No,
)
if r == QMessageBox.StandardButton.Yes:
aqt.utils.openFolder(util.addon_path("web"))
Expand Down
16 changes: 8 additions & 8 deletions addon/settings_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def on_reset_marked_known(self):
"Migaku Kanji",
f"Do you really want to reset kanji marked known for {self.card_type.label}?<br><br>"
"<b>They will not be recoverable.</b>",
QMessageBox.StandardButton.Yes | QMessageBox.No,
QMessageBox.No,
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
QMessageBox.StandardButton.No,
)
if r != QMessageBox.StandardButton.Yes:
return
Expand Down Expand Up @@ -456,8 +456,8 @@ def on_reset_db(self):
"Do you really want to reset the Migaku Kanji Database?<br><br>"
"<b>All kanji manually marked known, custom stories and keywords will be lost!</b><br><br>"
"Kanji cards and their progress will remain.",
QMessageBox.StandardButton.Yes | QMessageBox.No,
QMessageBox.No,
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
QMessageBox.StandardButton.No,
)
if r != QMessageBox.StandardButton.Yes:
return
Expand All @@ -472,8 +472,8 @@ def on_reset_custom_keywords(self):
"Migaku Kanji",
"Do you really want to reset all custom keywords?<br><br>"
"<b>They will not be recoverable.</b>",
QMessageBox.StandardButton.Yes | QMessageBox.No,
QMessageBox.No,
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
QMessageBox.StandardButton.No,
)
if r != QMessageBox.StandardButton.Yes:
return
Expand All @@ -486,8 +486,8 @@ def on_reset_custom_stories(self):
"Migaku Kanji",
"Do you really want to reset all custom stories?<br><br>"
"<b>They will not be recoverable.</b>",
QMessageBox.StandardButton.Yes | QMessageBox.No,
QMessageBox.No,
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
QMessageBox.StandardButton.No,
)
if r != QMessageBox.StandardButton.Yes:
return
Expand Down

0 comments on commit c7e15c2

Please sign in to comment.