diff --git a/qtgui/mainwindow.py b/qtgui/mainwindow.py index 687aa0e..667f86d 100644 --- a/qtgui/mainwindow.py +++ b/qtgui/mainwindow.py @@ -134,8 +134,7 @@ class MainWindow(QtWidgets.QMainWindow): #Starting the engine sends initial GUI data. Every window and widget must be ready to receive callbacks here api.eventLoop.start() - api.startEngine() - logger.info("Show MainWindow") + api.startEngine() self.restoreWindowSettings() #includes show/hide #Handle the application data cache. If not present instruct the engine to build one. @@ -152,10 +151,12 @@ class MainWindow(QtWidgets.QMainWindow): logger.info("First run. Instructing engine to build program database") QtCore.QTimer.singleShot(0, self.updateProgramDatabase) #includes self._updateGUIWithCachedPrograms() + logger.info("Deciding if we run as tray-icon or window") if not self.isVisible(): text = QtCore.QCoreApplication.translate("mainWindow", "Argodejo ready") self.systemTray.showMessage("Argodejo", text, QtWidgets.QSystemTrayIcon.Information, 2000) #title, message, icon, timeout. #has messageClicked() signal. + logger.info("Ready for user input. Exec_ Qt.") qtApp.exec_() #No code after exec_ except atexit @@ -221,6 +222,7 @@ class MainWindow(QtWidgets.QMainWindow): settings.remove("programDatabase") WaitDialog(self, title, text, informativeText, api.buildSystemPrograms) + logger.info("Asking api to getSystemPrograms while waiting") settings.setValue("programDatabase", api.getSystemPrograms()) self._updateGUIWithCachedPrograms() diff --git a/qtgui/waitdialog.py b/qtgui/waitdialog.py index 6800ba3..ef72ded 100644 --- a/qtgui/waitdialog.py +++ b/qtgui/waitdialog.py @@ -49,7 +49,8 @@ class WaitDialog(QtWidgets.QMessageBox): #informativeText = QtCore.QCoreApplication.translate("AskBeforeQuit", "Do you want to save?") #title = QtCore.QCoreApplication.translate("AskBeforeQuit", "About to quit") - super().__init__() + super().__init__() + logger.info(f"Starting blocking dialog {title}") self.mainWindow = mainWindow self.setWindowFlag(QtCore.Qt.Popup, True) self.setIcon(self.Information)