Skip to content

Commit 0f782f6

Browse files
committed
fix: Ignore dialog with X button
1 parent 1ad1313 commit 0f782f6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tagstudio/src/qt/modals/ffmpeg_checker.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ def __init__(self):
2121
self.setIcon(QMessageBox.Warning)
2222

2323
self.setText("Warning: Could not find FFmpeg installation")
24-
self.setStandardButtons(QMessageBox.Help | QMessageBox.Ignore)
24+
self.setStandardButtons(
25+
QMessageBox.Help | QMessageBox.Ignore | QMessageBox.Cancel
26+
)
2527
self.setDefaultButton(QMessageBox.Ignore)
28+
# Enables the cancel button but hides it to allow for click X to close dialog
29+
self.button(QMessageBox.Cancel).hide()
2630

2731
# Blocks other application interactions until resolved
2832
self.setWindowModality(Qt.ApplicationModal)
@@ -57,6 +61,6 @@ def show_warning(self):
5761
# Shows the dialog
5862
selection = self.exec()
5963

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

0 commit comments

Comments
 (0)