From aeb0a168b5368e25ae3a72c39d55f6adf109b616 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 9 Sep 2024 16:34:43 +0000 Subject: [PATCH] qt gui: use QGuiApplication.setApplicationName I noticed that when running from source on macOS, the OS menubar has an "About Python" menu item, instead of an "About Electrum" menu item. I tried to fix that by this, but actually it is not working :P Nevertheless, this looks useful at least on Linux and Windows. E.g. when instantiating a new dialog without an explicit title, the qt application name is used as default. The application name, without this change AFAICS was already "Electrum" when running any of the binaries. However when running from source, it was in some cases "python" or "run_electrum" or even "electrum-4" (depending on OS and how the main script is started). Now it is consistent -- except on macOS it still is not, as there it really wants to look for a .plist... --- electrum/gui/qt/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index 83f6de011..119091f38 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -124,6 +124,7 @@ class ElectrumGui(BaseElectrumGui, Logger): QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_ShareOpenGLContexts) if hasattr(QGuiApplication, 'setDesktopFileName'): QGuiApplication.setDesktopFileName('electrum.desktop') + QGuiApplication.setApplicationName("Electrum") self.gui_thread = threading.current_thread() self.windows = [] # type: List[ElectrumWindow] self.efilter = OpenFileEventFilter(self.windows)