From c7965337bae2d46f862107288e1817439a995a36 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 10 Sep 2019 13:34:03 -0700 Subject: [PATCH 1/2] Make a copy of the thread names so that if one disappears while we're waiting, we don't cause an error --- openlp/core/ui/mainwindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 8f3a8aa0f..84625e51f 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -552,7 +552,10 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert wait_dialog.setAutoClose(False) wait_dialog.setCancelButton(None) wait_dialog.show() - for thread_name in self.application.worker_threads.keys(): + thread_names = self.application.worker_threads.keys() + for thread_name in thread_names: + if thread_name not in self.application.worker_threads.keys(): + continue self.log_debug('Waiting for thread %s' % thread_name) self.application.processEvents() thread = self.application.worker_threads[thread_name]['thread'] From 2a8bf17c9062451c55a687405dffbe15731e162b Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 10 Sep 2019 14:37:12 -0700 Subject: [PATCH 2/2] Fix window titles so that the main window just says 'OpenLP' --- openlp/core/display/window.py | 2 ++ openlp/core/ui/mainwindow.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/openlp/core/display/window.py b/openlp/core/display/window.py index 393b6ccce..0c8c4f3b5 100644 --- a/openlp/core/display/window.py +++ b/openlp/core/display/window.py @@ -29,6 +29,7 @@ import copy from PyQt5 import QtCore, QtWebChannel, QtWidgets +from openlp.core.common.i18n import translate from openlp.core.common.path import path_to_str from openlp.core.common.settings import Settings from openlp.core.common.registry import Registry @@ -113,6 +114,7 @@ class DisplayWindow(QtWidgets.QWidget): from openlp.core.display.webengine import WebEngineView self._is_initialised = False self._fbo = None + self.setWindowTitle(translate('OpenLP.DisplayWindow', 'Display Window')) self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.Tool | QtCore.Qt.WindowStaysOnTopHint) self.setAttribute(QtCore.Qt.WA_TranslucentBackground) self.setAutoFillBackground(True) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 84625e51f..1aa33af5f 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -548,6 +548,9 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, LogMixin, RegistryPropert # Sometimes the threads haven't finished, let's wait for them wait_dialog = QtWidgets.QProgressDialog(translate('OpenLP.MainWindow', 'Waiting for some things to finish...'), '', 0, 0, self) + wait_dialog.setWindowTitle(translate('OpenLP.MainWindow', 'Please Wait')) + for window_flag in [QtCore.Qt.WindowContextHelpButtonHint]: + wait_dialog.setWindowFlag(window_flag, False) wait_dialog.setWindowModality(QtCore.Qt.WindowModal) wait_dialog.setAutoClose(False) wait_dialog.setCancelButton(None)