--- a/src/eric7/UI/UserInterface.py Mon Jul 22 17:10:23 2024 +0200 +++ b/src/eric7/UI/UserInterface.py Mon Jul 22 17:37:28 2024 +0200 @@ -13,6 +13,7 @@ import functools import getpass import glob +import importlib import json import logging import os @@ -3112,6 +3113,30 @@ self.webBrowserAct.triggered.connect(self.__startWebBrowser) self.actions.append(self.webBrowserAct) + if importlib.util.find_spec("fido2"): + self.securityKeyMgmtAct = EricAction( + self.tr("FIDO2 Security Key Management"), + EricPixmapCache.getIcon("securityKey"), + self.tr("FIDO2 Security Key Management..."), + 0, + 0, + self, + "fido2_security_key_mgmt", + ) + self.securityKeyMgmtAct.setStatusTip( + self.tr("Start the FIDO2 Security Key Management tool") + ) + self.securityKeyMgmtAct.setWhatsThis( + self.tr( + """<b>FIDO2 Security Key Management</b>""" + """<p>Start a tool to manage FIDO2 securit y keys.</p>""" + ) + ) + self.securityKeyMgmtAct.triggered.connect(self.__startFido2SecurityKeyMgmt) + self.actions.append(self.securityKeyMgmtAct) + else: + self.securityKeyMgmtAct = None + self.iconEditorAct = EricAction( self.tr("Icon Editor"), EricPixmapCache.getIcon("iconEditor"), @@ -4198,9 +4223,10 @@ if self.snapshotAct is not None: toolstb.addAction(self.snapshotAct) toolstb.addAction(self.pdfViewerAct) - if self.webBrowserAct: - toolstb.addSeparator() - toolstb.addAction(self.webBrowserAct) + toolstb.addSeparator() + toolstb.addAction(self.webBrowserAct) + if self.securityKeyMgmtAct is not None: + toolstb.addAction(self.securityKeyMgmtAct) self.toolbarManager.addToolBar(toolstb, toolstb.windowTitle()) # setup the settings toolbar @@ -5180,8 +5206,9 @@ if self.snapshotAct is not None: btMenu.addAction(self.snapshotAct) btMenu.addAction(self.pdfViewerAct) - if self.webBrowserAct: - btMenu.addAction(self.webBrowserAct) + btMenu.addAction(self.webBrowserAct) + if self.securityKeyMgmtAct is not None: + btMenu.addAction(self.securityKeyMgmtAct) ptMenu = QMenu(self.tr("&Plugin Tools"), self) ptMenu.aboutToShow.connect(self.__showPluginToolsMenu) @@ -6270,6 +6297,16 @@ """ self.launchHelpViewer("") + @pyqtSlot() + def __startFido2SecurityKeyMgmt(self): + """ + Private slot to start the FIDO2 Security Key Management. + """ + fido2Mgmt = os.path.join(os.path.dirname(__file__), "..", "eric7_fido2.py") + QProcess.startDetached( + PythonUtilities.getPythonExecutable(), [fido2Mgmt] + ) + def __customViewer(self, home=None): """ Private slot to start a custom viewer.