Skip to content

Commit

Permalink
fix: Ignore dialog with X button
Browse files Browse the repository at this point in the history
  • Loading branch information
seakrueger committed Sep 4, 2024
1 parent 1ad1313 commit 0f782f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tagstudio/src/qt/modals/ffmpeg_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ def __init__(self):
self.setIcon(QMessageBox.Warning)

self.setText("Warning: Could not find FFmpeg installation")
self.setStandardButtons(QMessageBox.Help | QMessageBox.Ignore)
self.setStandardButtons(
QMessageBox.Help | QMessageBox.Ignore | QMessageBox.Cancel
)
self.setDefaultButton(QMessageBox.Ignore)
# Enables the cancel button but hides it to allow for click X to close dialog
self.button(QMessageBox.Cancel).hide()

# Blocks other application interactions until resolved
self.setWindowModality(Qt.ApplicationModal)
Expand Down Expand Up @@ -57,6 +61,6 @@ def show_warning(self):
# Shows the dialog
selection = self.exec()

# Selection will either be QMessageBox.Help or QMessageBox.Ignore
# Selection will either be QMessageBox.Help or (QMessageBox.Ignore | QMessageBox.Cancel) which can be ignored
if selection == QMessageBox.Help:
QDesktopServices.openUrl(QUrl(self.help_url))

0 comments on commit 0f782f6

Please sign in to comment.