src/eric7/UI/UserInterface.py

branch
eric7-maintenance
changeset 10004
983477114d3c
parent 9948
a6ec52ed5c99
parent 9971
773ad1f1ed22
child 10079
0222a480e93d
diff -r c2ae0dd2021a -r 983477114d3c src/eric7/UI/UserInterface.py
--- a/src/eric7/UI/UserInterface.py	Thu Apr 06 09:32:12 2023 +0200
+++ b/src/eric7/UI/UserInterface.py	Tue May 02 10:20:02 2023 +0200
@@ -182,7 +182,7 @@
     @signal reloadAPIs() emitted to reload the api information
     @signal showMenu(str, QMenu) emitted when a menu is about to be shown. The
         name of the menu and a reference to the menu are given.
-    @signal masterPasswordChanged(str, str) emitted after the master
+    @signal mainPasswordChanged(str, str) emitted after the main
         password has been changed with the old and the new password
     @signal onlineStateChanged(online) emitted to indicate a change of the
         network state
@@ -193,7 +193,7 @@
     preferencesChanged = pyqtSignal()
     reloadAPIs = pyqtSignal()
     showMenu = pyqtSignal(str, QMenu)
-    masterPasswordChanged = pyqtSignal(str, str)
+    mainPasswordChanged = pyqtSignal(str, str)
     onlineStateChanged = pyqtSignal(bool)
 
     maxFilePathLen = 100
@@ -1445,7 +1445,10 @@
 
         self.leftSidebar.setCurrentIndex(0)
         if self.rightSidebar:
-            self.rightSidebar.setCurrentIndex(0)
+            if self.__helpViewerWidget is not None:
+                self.rightSidebar.setCurrentWidget(self.__helpViewerWidget)
+            else:
+                self.rightSidebar.setCurrentIndex(0)
         self.bottomSidebar.setCurrentIndex(0)
 
         # create the central widget
@@ -5798,7 +5801,9 @@
         @param switchFocus flag indicating to transfer the input focus
         @type bool
         """
-        if self.codeDocumentationViewer is not None:
+        if self.codeDocumentationViewer is not None and (
+            switchFocus or self.codeDocumentationViewer.isEnabled()
+        ):
             if self.__layoutType == "Toolboxes":
                 self.rToolboxDock.show()
                 self.rToolbox.setCurrentWidget(self.codeDocumentationViewer)
@@ -7115,8 +7120,8 @@
             self.__configurationDialog.preferencesChanged.connect(
                 self.__preferencesChanged
             )
-            self.__configurationDialog.masterPasswordChanged.connect(
-                self.__masterPasswordChanged
+            self.__configurationDialog.mainPasswordChanged.connect(
+                self.__mainPasswordChanged
             )
             self.__configurationDialog.show()
             if pageName is not None:
@@ -7260,16 +7265,18 @@
 
         self.preferencesChanged.emit()
 
-    def __masterPasswordChanged(self, oldPassword, newPassword):
-        """
-        Private slot to handle the change of the master password.
-
-        @param oldPassword current master password (string)
-        @param newPassword new master password (string)
+    def __mainPasswordChanged(self, oldPassword, newPassword):
+        """
+        Private slot to handle the change of the main password.
+
+        @param oldPassword current main password
+        @type str
+        @param newPassword new main password
+        @type str
         """
         from eric7 import Globals
 
-        self.masterPasswordChanged.emit(oldPassword, newPassword)
+        self.mainPasswordChanged.emit(oldPassword, newPassword)
         Preferences.convertPasswords(oldPassword, newPassword)
         variant = Globals.getWebBrowserSupport()
         if variant == "QtWebEngine":
@@ -7278,8 +7285,8 @@
             )
 
             pwManager = PasswordManager()
-            pwManager.masterPasswordChanged(oldPassword, newPassword)
-        Utilities.crypto.changeRememberedMaster(newPassword)
+            pwManager.mainPasswordChanged(oldPassword, newPassword)
+        Utilities.crypto.changeRememberedMain(newPassword)
 
     def __reloadAPIs(self):
         """

eric ide

mercurial