From f12b50f9d08a7dc9ecd8fa62585dc98cdd8ec922 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Mon, 17 Nov 2025 11:24:06 -0500 Subject: [PATCH] Fix buy list dialog to show properly with modal exec and proper HTML --- journey_fm_app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/journey_fm_app.py b/journey_fm_app.py index ad40829..bb39208 100644 --- a/journey_fm_app.py +++ b/journey_fm_app.py @@ -439,7 +439,6 @@ class MainWindow(QMainWindow): def show_buy_list(self): """Show the Amazon buy list dialog""" - QMessageBox.information(self, "Debug", "Buy list button clicked!") try: with open('amazon_buy_list.txt', 'r') as f: content = f.read() @@ -451,10 +450,12 @@ class MainWindow(QMainWindow): # Make URLs clickable import re html_content = re.sub(r'(https?://[^\s]+)', r'\1', html_content) + # Wrap in proper HTML + html_content = f"{html_content}" dialog = QDialog(self) dialog.setWindowTitle("Amazon Buy List") - dialog.setModal(False) + dialog.setModal(True) # Make it modal so it shows dialog.resize(600, 400) layout = QVBoxLayout() @@ -470,7 +471,7 @@ class MainWindow(QMainWindow): layout.addWidget(buttons) dialog.setLayout(layout) - dialog.show() + dialog.exec() # Use exec() for modal dialog def closeEvent(self, event): """Handle window close - minimize to tray instead of closing"""