diff --git a/template/Makefile.in b/template/Makefile.in index 356895e..7d70ccc 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -57,7 +57,7 @@ install: install -D -m 644 README.md $(DESTDIR)$(PREFIX)/share/doc/$(PROGRAM)/README.md install -D -m 644 LICENSE $(DESTDIR)$(PREFIX)/share/doc/$(PROGRAM)/LICENSE - install -D -m 644 desktop/desktop.desktop $(DESTDIR)$(PREFIX)/share/applications/$(PROGRAM).desktop + install -D -m 644 desktop/desktop.desktop $(DESTDIR)$(PREFIX)/share/applications/org.laborejo.$(PROGRAM).desktop install -d $(DESTDIR)$(PREFIX)/share/man/man1 gzip -c documentation/$(PROGRAM).1 > $(DESTDIR)$(PREFIX)/share/man/man1/$(PROGRAM).1.gz @@ -84,7 +84,7 @@ uninstall: #Files rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM) - rm -f $(DESTDIR)$(PREFIX)/share/applications/$(PROGRAM).desktop + rm -f $(DESTDIR)$(PREFIX)/share/applications/org.laborejo.$(PROGRAM).desktop rm -f $(DESTDIR)$(PREFIX)/share/man/man1/$(PROGRAM).1.gz #Icons diff --git a/template/qtgui/mainwindow.py b/template/qtgui/mainwindow.py index e42a128..7d24185 100644 --- a/template/qtgui/mainwindow.py +++ b/template/qtgui/mainwindow.py @@ -46,12 +46,6 @@ from engine.config import * #imports METADATA import engine.api as api #This loads the engine and starts a session. from qtgui.designer.mainwindow import Ui_MainWindow #The MainWindow designer file is loaded from the CLIENT side from qtgui.resources import * - -#Construct QAppliction before constantsAndCOnfigs, which has the fontDB -QtGui.QGuiApplication.setDesktopSettingsAware(False) #We need our own font so the user interface stays predictable -QtGui.QGuiApplication.setDesktopFileName(PATHS["desktopfile"]) -#qtApp imported from template.engine.start. Since Qt 5.15 or PyQt 5.15 you really can't have only one QApplication during program lifetime, even if you try to quit and del the first one. - from qtgui.constantsAndConfigs import constantsAndConfigs class EventLoop(object): @@ -136,6 +130,9 @@ class MainWindow(QtWidgets.QMainWindow): super().__init__() self.qtApp = qtApp self.qtApp.setWindowIcon(QtGui.QIcon(":icon.png")) #non-template part of the program + QtGui.QIcon.setThemeName("hicolor") #audio applications can be found here. We have no need for other icons. + logger.info("Init MainWindow") + #Callbacks. Must be registered before startEngine. api.callbacks.message.append(self.callback_message) @@ -160,7 +157,11 @@ class MainWindow(QtWidgets.QMainWindow): self.xFactor = 1 #keep track of the x stretch factor. self.setWindowTitle(self.nsmClient.ourClientNameUnderNSM) + self.qtApp.setApplicationName(self.nsmClient.ourClientNameUnderNSM) self.qtApp.setApplicationDisplayName(self.nsmClient.ourClientNameUnderNSM) + self.qtApp.setOrganizationName("Laborejo Software Suite") + self.qtApp.setOrganizationDomain("laborejo.org") + self.qtApp.setApplicationVersion(METADATA["version"]) self.setAcceptDrops(True) self.debugScriptRunner = DebugScriptRunner(apilocals=locals()) #needs to have trueInit called after the session and nsm was set up. Which happens in startEngine. diff --git a/template/qtgui/menu.py b/template/qtgui/menu.py index f9a6757..8af0eab 100644 --- a/template/qtgui/menu.py +++ b/template/qtgui/menu.py @@ -85,7 +85,7 @@ class Menu(object): self.addSubmenu("menuHelp", QtCore.QCoreApplication.translate("TemplateMainWindow", "Help")) self.addMenuEntry("menuHelp", "actionUser_Manual", QtCore.QCoreApplication.translate("TemplateMainWindow", "User Manual"), connectedFunction=self.mainWindow.userManual.show) self.addSeparator("menuHelp") - self.addMenuEntry("menuHelp", "actionAbout", QtCore.QCoreApplication.translate("TemplateMainWindow", "About"), connectedFunction=self.mainWindow.about.show) + self.addMenuEntry("menuHelp", "actionAbout", QtCore.QCoreApplication.translate("TemplateMainWindow", "About and Tips"), connectedFunction=self.mainWindow.about.show) def _setupEditMenu(self): self.addSubmenu("menuEdit", QtCore.QCoreApplication.translate("TemplateMainWindow", "Edit")) diff --git a/template/qtgui/resources.py b/template/qtgui/resources.py index 534e900..0362086 100644 --- a/template/qtgui/resources.py +++ b/template/qtgui/resources.py @@ -3312,21 +3312,21 @@ qt_resource_data = b"\ \x16\xf0\xeb\x9f\xcf\x05\x69\x9a\x96\x3e\x17\x34\x9b\xcd\xc1\x81\ \x6a\x00\x13\x7e\x03\xa8\x32\xb9\xbd\xc4\x2d\xe2\xba\x00\x00\x00\ \x00\x49\x45\x4e\x44\xae\x42\x60\x82\ -\x00\x00\x0c\x30\ +\x00\x00\x0c\x53\ \x3c\ \xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\xa7\ \x00\x00\x00\x05\x64\x65\x5f\x44\x45\x42\x00\x00\x00\xa8\x00\x04\ -\x87\x9b\x00\x00\x0a\x86\x00\x04\xbb\x04\x00\x00\x08\x78\x00\x04\ -\xd0\x25\x00\x00\x08\xb7\x00\x04\xd6\x8d\x00\x00\x0a\xbd\x00\x04\ -\xec\x30\x00\x00\x08\xec\x00\x04\xf6\x35\x00\x00\x0a\xe8\x00\x05\ -\x8b\xaf\x00\x00\x09\x87\x00\x05\x98\xc5\x00\x00\x09\xc8\x00\x05\ -\xc4\xaf\x00\x00\x0a\x05\x00\x47\x96\xc4\x00\x00\x00\x00\x00\x47\ -\x96\xc4\x00\x00\x08\x44\x01\x7e\x97\x89\x00\x00\x04\x21\x03\x18\ -\xa4\x29\x00\x00\x09\x21\x03\x19\x9b\xde\x00\x00\x06\x95\x05\x1c\ -\x51\x99\x00\x00\x06\x18\x05\x6c\xc7\x3c\x00\x00\x0a\x44\x05\x6c\ -\xc7\x3c\x00\x00\x0b\x1b\x07\x48\xba\x0e\x00\x00\x02\xff\x0c\x3f\ -\xa2\x40\x00\x00\x05\xc5\x0d\x6c\xeb\x9f\x00\x00\x02\xa3\x0f\xc9\ -\x5c\x9e\x00\x00\x00\x2f\x69\x00\x00\x0b\x5d\x03\x00\x00\x00\x08\ +\x87\x9b\x00\x00\x0a\xa9\x00\x04\xbb\x04\x00\x00\x08\x9b\x00\x04\ +\xd0\x25\x00\x00\x08\xda\x00\x04\xd6\x8d\x00\x00\x0a\xe0\x00\x04\ +\xec\x30\x00\x00\x09\x0f\x00\x04\xf6\x35\x00\x00\x0b\x0b\x00\x05\ +\x8b\xaf\x00\x00\x09\xaa\x00\x05\x98\xc5\x00\x00\x09\xeb\x00\x05\ +\xc4\xaf\x00\x00\x0a\x28\x00\x47\x96\xc4\x00\x00\x00\x00\x01\x7e\ +\x97\x89\x00\x00\x04\x21\x03\x18\xa4\x29\x00\x00\x09\x44\x03\x19\ +\x9b\xde\x00\x00\x06\x95\x05\x1c\x51\x99\x00\x00\x06\x18\x05\x6c\ +\xc7\x3c\x00\x00\x0a\x67\x05\x6c\xc7\x3c\x00\x00\x0b\x3e\x07\x48\ +\xba\x0e\x00\x00\x02\xff\x0c\x3f\xa2\x40\x00\x00\x05\xc5\x0d\x09\ +\xd2\x63\x00\x00\x08\x44\x0d\x6c\xeb\x9f\x00\x00\x02\xa3\x0f\xc9\ +\x5c\x9e\x00\x00\x00\x2f\x69\x00\x00\x0b\x80\x03\x00\x00\x00\x08\ \x00\xdc\x00\x62\x00\x65\x00\x72\x08\x00\x00\x00\x00\x06\x00\x00\ \x00\x05\x41\x62\x6f\x75\x74\x07\x00\x00\x00\x0d\x54\x65\x6d\x70\ \x6c\x61\x74\x65\x41\x62\x6f\x75\x74\x01\x03\x00\x00\x01\x9a\x00\ @@ -3459,56 +3459,59 @@ qt_resource_data = b"\ \x65\x72\x20\x69\x6e\x73\x74\x65\x61\x64\x2e\x07\x00\x00\x00\x1e\ \x54\x65\x6d\x70\x6c\x61\x74\x65\x43\x68\x6f\x6f\x73\x65\x53\x65\ \x73\x73\x69\x6f\x6e\x44\x69\x72\x65\x63\x74\x6f\x72\x79\x01\x03\ -\x00\x00\x00\x08\x00\xdc\x00\x62\x00\x65\x00\x72\x08\x00\x00\x00\ -\x00\x06\x00\x00\x00\x05\x41\x62\x6f\x75\x74\x07\x00\x00\x00\x12\ +\x00\x00\x00\x22\x00\x54\x00\x69\x00\x70\x00\x70\x00\x73\x00\x20\ +\x00\x75\x00\x6e\x00\x64\x00\x20\x00\x43\x00\x72\x00\x65\x00\x64\ +\x00\x69\x00\x74\x00\x73\x08\x00\x00\x00\x00\x06\x00\x00\x00\x0e\ +\x41\x62\x6f\x75\x74\x20\x61\x6e\x64\x20\x54\x69\x70\x73\x07\x00\ +\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\ +\x69\x6e\x64\x6f\x77\x01\x03\x00\x00\x00\x14\x00\x42\x00\x65\x00\ +\x61\x00\x72\x00\x62\x00\x65\x00\x69\x00\x74\x00\x65\x00\x6e\x08\ +\x00\x00\x00\x00\x06\x00\x00\x00\x04\x45\x64\x69\x74\x07\x00\x00\ +\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\ +\x6e\x64\x6f\x77\x01\x03\x00\x00\x00\x0a\x00\x44\x00\x61\x00\x74\ +\x00\x65\x00\x69\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x46\x69\ +\x6c\x65\x07\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\ +\x61\x69\x6e\x57\x69\x6e\x64\x6f\x77\x01\x03\x00\x00\x00\x0a\x00\ +\x48\x00\x69\x00\x6c\x00\x66\x00\x65\x08\x00\x00\x00\x00\x06\x00\ +\x00\x00\x04\x48\x65\x6c\x70\x07\x00\x00\x00\x12\x54\x65\x6d\x70\ +\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\x77\x01\x03\ +\x00\x00\x00\x2a\x00\x51\x00\x75\x00\x69\x00\x74\x00\x20\x00\x28\ +\x00\x6f\x00\x68\x00\x6e\x00\x65\x00\x20\x00\x53\x00\x70\x00\x65\ +\x00\x69\x00\x63\x00\x68\x00\x65\x00\x72\x00\x6e\x00\x29\x08\x00\ +\x00\x00\x00\x06\x00\x00\x00\x15\x51\x75\x69\x74\x20\x28\x77\x69\ +\x74\x68\x6f\x75\x74\x20\x73\x61\x76\x69\x6e\x67\x29\x07\x00\x00\ +\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\ +\x6e\x64\x6f\x77\x01\x03\x00\x00\x00\x16\x00\x57\x00\x69\x00\x65\ +\x00\x64\x00\x65\x00\x72\x00\x68\x00\x6f\x00\x6c\x00\x65\x00\x6e\ +\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x52\x65\x64\x6f\x07\x00\ +\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\ +\x69\x6e\x64\x6f\x77\x01\x03\x00\x00\x00\x12\x00\x53\x00\x70\x00\ +\x65\x00\x69\x00\x63\x00\x68\x00\x65\x00\x72\x00\x6e\x08\x00\x00\ +\x00\x00\x06\x00\x00\x00\x04\x53\x61\x76\x65\x07\x00\x00\x00\x12\ \x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\ -\x6f\x77\x01\x03\x00\x00\x00\x14\x00\x42\x00\x65\x00\x61\x00\x72\ -\x00\x62\x00\x65\x00\x69\x00\x74\x00\x65\x00\x6e\x08\x00\x00\x00\ -\x00\x06\x00\x00\x00\x04\x45\x64\x69\x74\x07\x00\x00\x00\x12\x54\ -\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\ -\x77\x01\x03\x00\x00\x00\x0a\x00\x44\x00\x61\x00\x74\x00\x65\x00\ -\x69\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x46\x69\x6c\x65\x07\ -\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\ -\x57\x69\x6e\x64\x6f\x77\x01\x03\x00\x00\x00\x0a\x00\x48\x00\x69\ -\x00\x6c\x00\x66\x00\x65\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\ -\x48\x65\x6c\x70\x07\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\ -\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\x77\x01\x03\x00\x00\x00\ -\x2a\x00\x51\x00\x75\x00\x69\x00\x74\x00\x20\x00\x28\x00\x6f\x00\ -\x68\x00\x6e\x00\x65\x00\x20\x00\x53\x00\x70\x00\x65\x00\x69\x00\ -\x63\x00\x68\x00\x65\x00\x72\x00\x6e\x00\x29\x08\x00\x00\x00\x00\ -\x06\x00\x00\x00\x15\x51\x75\x69\x74\x20\x28\x77\x69\x74\x68\x6f\ -\x75\x74\x20\x73\x61\x76\x69\x6e\x67\x29\x07\x00\x00\x00\x12\x54\ +\x6f\x77\x01\x03\x00\x00\x00\x14\x00\x52\x00\xfc\x00\x63\x00\x6b\ +\x00\x67\x00\xe4\x00\x6e\x00\x67\x00\x69\x00\x67\x08\x00\x00\x00\ +\x00\x06\x00\x00\x00\x04\x55\x6e\x64\x6f\x07\x00\x00\x00\x12\x54\ \x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\ -\x77\x01\x03\x00\x00\x00\x16\x00\x57\x00\x69\x00\x65\x00\x64\x00\ -\x65\x00\x72\x00\x68\x00\x6f\x00\x6c\x00\x65\x00\x6e\x08\x00\x00\ -\x00\x00\x06\x00\x00\x00\x04\x52\x65\x64\x6f\x07\x00\x00\x00\x12\ -\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\ -\x6f\x77\x01\x03\x00\x00\x00\x12\x00\x53\x00\x70\x00\x65\x00\x69\ -\x00\x63\x00\x68\x00\x65\x00\x72\x00\x6e\x08\x00\x00\x00\x00\x06\ -\x00\x00\x00\x04\x53\x61\x76\x65\x07\x00\x00\x00\x12\x54\x65\x6d\ -\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\x77\x01\ -\x03\x00\x00\x00\x14\x00\x52\x00\xfc\x00\x63\x00\x6b\x00\x67\x00\ -\xe4\x00\x6e\x00\x67\x00\x69\x00\x67\x08\x00\x00\x00\x00\x06\x00\ -\x00\x00\x04\x55\x6e\x64\x6f\x07\x00\x00\x00\x12\x54\x65\x6d\x70\ -\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\x77\x01\x03\ -\x00\x00\x00\x10\x00\x48\x00\x61\x00\x6e\x00\x64\x00\x62\x00\x75\ -\x00\x63\x00\x68\x08\x00\x00\x00\x00\x06\x00\x00\x00\x0b\x55\x73\ -\x65\x72\x20\x4d\x61\x6e\x75\x61\x6c\x07\x00\x00\x00\x12\x54\x65\ -\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\x77\ -\x01\x03\x00\x00\x00\x0c\x00\x5a\x00\x75\x00\x72\x00\xfc\x00\x63\ -\x00\x6b\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x42\x61\x63\x6b\ -\x07\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x55\x73\x65\ -\x72\x4d\x61\x6e\x75\x61\x6c\x01\x03\xff\xff\xff\xff\x08\x00\x00\ -\x00\x00\x06\x00\x00\x00\x04\x46\x6f\x72\x6d\x07\x00\x00\x00\x12\ -\x54\x65\x6d\x70\x6c\x61\x74\x65\x55\x73\x65\x72\x4d\x61\x6e\x75\ -\x61\x6c\x01\x03\x00\x00\x00\x08\x00\x48\x00\x6f\x00\x6d\x00\x65\ -\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x48\x6f\x6d\x65\x07\x00\ +\x77\x01\x03\x00\x00\x00\x10\x00\x48\x00\x61\x00\x6e\x00\x64\x00\ +\x62\x00\x75\x00\x63\x00\x68\x08\x00\x00\x00\x00\x06\x00\x00\x00\ +\x0b\x55\x73\x65\x72\x20\x4d\x61\x6e\x75\x61\x6c\x07\x00\x00\x00\ +\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x4d\x61\x69\x6e\x57\x69\x6e\ +\x64\x6f\x77\x01\x03\x00\x00\x00\x0c\x00\x5a\x00\x75\x00\x72\x00\ +\xfc\x00\x63\x00\x6b\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x42\ +\x61\x63\x6b\x07\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\ +\x55\x73\x65\x72\x4d\x61\x6e\x75\x61\x6c\x01\x03\xff\xff\xff\xff\ +\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x46\x6f\x72\x6d\x07\x00\ \x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x55\x73\x65\x72\x4d\ -\x61\x6e\x75\x61\x6c\x01\x03\x00\x00\x00\x10\x00\x48\x00\x61\x00\ -\x6e\x00\x64\x00\x62\x00\x75\x00\x63\x00\x68\x08\x00\x00\x00\x00\ -\x06\x00\x00\x00\x0b\x55\x73\x65\x72\x20\x4d\x61\x6e\x75\x61\x6c\ -\x07\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x55\x73\x65\ -\x72\x4d\x61\x6e\x75\x61\x6c\x01\x88\x00\x00\x00\x02\x01\x01\ +\x61\x6e\x75\x61\x6c\x01\x03\x00\x00\x00\x08\x00\x48\x00\x6f\x00\ +\x6d\x00\x65\x08\x00\x00\x00\x00\x06\x00\x00\x00\x04\x48\x6f\x6d\ +\x65\x07\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\x55\x73\ +\x65\x72\x4d\x61\x6e\x75\x61\x6c\x01\x03\x00\x00\x00\x10\x00\x48\ +\x00\x61\x00\x6e\x00\x64\x00\x62\x00\x75\x00\x63\x00\x68\x08\x00\ +\x00\x00\x00\x06\x00\x00\x00\x0b\x55\x73\x65\x72\x20\x4d\x61\x6e\ +\x75\x61\x6c\x07\x00\x00\x00\x12\x54\x65\x6d\x70\x6c\x61\x74\x65\ +\x55\x73\x65\x72\x4d\x61\x6e\x75\x61\x6c\x01\x88\x00\x00\x00\x02\ +\x01\x01\ " qt_resource_name = b"\ @@ -3516,14 +3519,14 @@ qt_resource_name = b"\ \x0c\x47\x27\xe5\ \x00\x74\ \x00\x65\x00\x6d\x00\x70\x00\x6c\x00\x61\x00\x74\x00\x65\ -\x00\x0b\ -\x09\xc1\xce\x26\ -\x00\x65\ -\x00\x75\x00\x74\x00\x65\x00\x72\x00\x70\x00\x65\x00\x2e\x00\x74\x00\x74\x00\x66\ \x00\x0c\ \x0d\xfc\x11\x13\ \x00\x74\ \x00\x72\x00\x61\x00\x6e\x00\x73\x00\x6c\x00\x61\x00\x74\x00\x69\x00\x6f\x00\x6e\x00\x73\ +\x00\x0b\ +\x09\xc1\xce\x26\ +\x00\x65\ +\x00\x75\x00\x74\x00\x65\x00\x72\x00\x70\x00\x65\x00\x2e\x00\x74\x00\x74\x00\x66\ \x00\x05\ \x00\x6f\xa6\x53\ \x00\x69\ @@ -3542,8 +3545,8 @@ qt_resource_struct_v1 = b"\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ \x00\x00\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x02\ \x00\x00\x00\x50\x00\x02\x00\x00\x00\x01\x00\x00\x00\x06\ -\x00\x00\x00\x16\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ -\x00\x00\x00\x32\x00\x02\x00\x00\x00\x01\x00\x00\x00\x05\ +\x00\x00\x00\x34\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x00\x16\x00\x02\x00\x00\x00\x01\x00\x00\x00\x05\ \x00\x00\x00\x80\x00\x00\x00\x00\x00\x01\x00\x00\xce\x32\ \x00\x00\x00\x60\x00\x00\x00\x00\x00\x01\x00\x00\xc6\xb4\ " @@ -3555,14 +3558,14 @@ qt_resource_struct_v2 = b"\ \x00\x00\x00\x00\x00\x00\x00\x00\ \x00\x00\x00\x50\x00\x02\x00\x00\x00\x01\x00\x00\x00\x06\ \x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x16\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ -\x00\x00\x01\x72\xcd\xe1\x80\x41\ -\x00\x00\x00\x32\x00\x02\x00\x00\x00\x01\x00\x00\x00\x05\ +\x00\x00\x00\x34\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ +\x00\x00\x01\x72\xce\x17\xcb\xdb\ +\x00\x00\x00\x16\x00\x02\x00\x00\x00\x01\x00\x00\x00\x05\ \x00\x00\x00\x00\x00\x00\x00\x00\ \x00\x00\x00\x80\x00\x00\x00\x00\x00\x01\x00\x00\xce\x32\ -\x00\x00\x01\x72\xcd\xe3\x0e\x70\ +\x00\x00\x01\x72\xf1\xfa\xc2\xb1\ \x00\x00\x00\x60\x00\x00\x00\x00\x00\x01\x00\x00\xc6\xb4\ -\x00\x00\x01\x72\xcd\xe1\x80\x3a\ +\x00\x00\x01\x72\xce\x17\xcb\xd8\ " qt_version = [int(v) for v in QtCore.qVersion().split('.')] diff --git a/template/qtgui/resources/translations/de.qm b/template/qtgui/resources/translations/de.qm index 13bf539..7bb3f18 100644 Binary files a/template/qtgui/resources/translations/de.qm and b/template/qtgui/resources/translations/de.qm differ diff --git a/template/qtgui/resources/translations/de.ts b/template/qtgui/resources/translations/de.ts index a48f154..78845c2 100644 --- a/template/qtgui/resources/translations/de.ts +++ b/template/qtgui/resources/translations/de.ts @@ -56,8 +56,8 @@ - About - Über + About and Tips + Tipps und Credits diff --git a/template/start.py b/template/start.py index 809e866..b88cffd 100644 --- a/template/start.py +++ b/template/start.py @@ -27,6 +27,12 @@ We don't want to use all the libraries, including the big Qt one, only to end up Same with the tests if jack or nsm are running. """ +#Give at least some feedback when C libs crash. +#Will still not work for the common case that PyQt crashes and ends Python. +#But every bit helps when hunting bugs. +import faulthandler; faulthandler.enable() + + from engine.config import * #includes METADATA only. No other environmental setup is executed. from template.qtgui.chooseSessionDirectory import ChooseSessionDirectory from template.qtgui.helper import setPaletteAndFont #our error boxes shall look like the rest of the program @@ -67,6 +73,8 @@ Nuitka complies that in, when make is finished we delete it. import sys import os import os.path +from PyQt5.QtWidgets import QApplication +from PyQt5 import QtGui logger.info(f"Python Version {sys.version}") @@ -135,7 +143,9 @@ else: logger.info("PATHS: {}".format(PATHS)) -from PyQt5.QtWidgets import QApplication +#Construct QAppliction before constantsAndCOnfigs, which has the fontDB +QtGui.QGuiApplication.setDesktopSettingsAware(False) #We need our own font so the user interface stays predictable +QtGui.QGuiApplication.setDesktopFileName(PATHS["desktopfile"]) qtApp = QApplication(sys.argv) setPaletteAndFont(qtApp) @@ -154,7 +164,7 @@ def setProcessName(executableName): """From https://stackoverflow.com/questions/31132342/change-process-name-while-executing-a-python-script """ - import ctypes + import ctypes, ctypes.util lib = ctypes.cdll.LoadLibrary(None) prctl = lib.prctl prctl.restype = ctypes.c_int @@ -166,6 +176,27 @@ def setProcessName(executableName): raise OSError("prctl result: %d" % result) set_proctitle(executableName.encode()) + + libpthread_path = ctypes.util.find_library("pthread") + if not libpthread_path: + return + + libpthread = ctypes.CDLL(libpthread_path) + if hasattr(libpthread, "pthread_setname_np"): + _pthread_setname_np = libpthread.pthread_setname_np + + _pthread_self = libpthread.pthread_self + _pthread_self.argtypes = [] + _pthread_self.restype = ctypes.c_void_p + + _pthread_setname_np.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + _pthread_setname_np.restype = ctypes.c_int + + if _pthread_setname_np is None: + return + + _pthread_setname_np(_pthread_self(), executableName.encode()) + def checkNsmOrExit(prettyName): """Check for NSM""" #NSM changes our cwd to whereever we started new-session-manager from. @@ -275,7 +306,11 @@ if args.directory: checkNsmOrExit(METADATA["name"]) checkJackOrExit(args.mute, METADATA["name"]) -setProcessName(METADATA["shortName"]) +try: + #Only cosmetics + setProcessName(METADATA["shortName"]) +except: + pass if args.mute: """This uses the fact that imports are global and only triggered once.