src/eric7/Preferences/ConfigurationPages/SecurityPage.py

branch
eric7
changeset 9971
773ad1f1ed22
parent 9653
e67609152c5e
child 9972
68ac01294544
--- a/src/eric7/Preferences/ConfigurationPages/SecurityPage.py	Tue Apr 04 17:26:54 2023 +0200
+++ b/src/eric7/Preferences/ConfigurationPages/SecurityPage.py	Wed Apr 05 11:58:22 2023 +0200
@@ -37,11 +37,11 @@
 
         # set initial values
         self.savePasswordsCheckBox.setChecked(Preferences.getUser("SavePasswords"))
-        self.masterPasswordCheckBox.setChecked(Preferences.getUser("UseMasterPassword"))
-        self.masterPasswordButton.setEnabled(Preferences.getUser("UseMasterPassword"))
+        self.mainPasswordCheckBox.setChecked(Preferences.getUser("UseMasterPassword"))
+        self.mainPasswordButton.setEnabled(Preferences.getUser("UseMasterPassword"))
 
         self.__newPassword = ""
-        self.__oldUseMasterPassword = Preferences.getUser("UseMasterPassword")
+        self.__oldUseMainPassword = Preferences.getUser("UseMasterPassword")
 
         self.alwaysRejectCheckBox.setChecked(
             Preferences.getWebBrowser("AlwaysRejectFaultyCertificates")
@@ -73,55 +73,55 @@
         """
         Preferences.setUser("SavePasswords", self.savePasswordsCheckBox.isChecked())
         Preferences.setUser(
-            "UseMasterPassword", self.masterPasswordCheckBox.isChecked()
+            "UseMasterPassword", self.mainPasswordCheckBox.isChecked()
         )
 
-        if self.__oldUseMasterPassword != self.masterPasswordCheckBox.isChecked():
-            self.__configDlg.masterPasswordChanged.emit("", self.__newPassword)
+        if self.__oldUseMainPassword != self.mainPasswordCheckBox.isChecked():
+            self.__configDlg.mainPasswordChanged.emit("", self.__newPassword)
 
         Preferences.setWebBrowser(
             "AlwaysRejectFaultyCertificates", self.alwaysRejectCheckBox.isChecked()
         )
 
     @pyqtSlot(bool)
-    def on_masterPasswordCheckBox_clicked(self, checked):
+    def on_mainPasswordCheckBox_clicked(self, checked):
         """
-        Private slot to handle the use of a master password.
+        Private slot to handle the use of a main password.
 
         @param checked flag indicating the state of the check box (boolean)
         """
-        from .MasterPasswordEntryDialog import MasterPasswordEntryDialog
+        from .MainPasswordEntryDialog import MainPasswordEntryDialog
 
         if checked:
-            dlg = MasterPasswordEntryDialog("", self)
+            dlg = MainPasswordEntryDialog("", self)
             if dlg.exec() == QDialog.DialogCode.Accepted:
-                Preferences.setUser("MasterPassword", dlg.getMasterPassword())
-                self.masterPasswordButton.setEnabled(True)
-                self.__newPassword = dlg.getMasterPassword()
+                Preferences.setUser("MasterPassword", dlg.getMainPassword())
+                self.mainPasswordButton.setEnabled(True)
+                self.__newPassword = dlg.getMainPassword()
             else:
-                self.masterPasswordCheckBox.setChecked(False)
+                self.mainPasswordCheckBox.setChecked(False)
         else:
-            self.masterPasswordButton.setEnabled(False)
+            self.mainPasswordButton.setEnabled(False)
             self.__newPassword = ""
 
     @pyqtSlot()
-    def on_masterPasswordButton_clicked(self):
+    def on_mainPasswordButton_clicked(self):
         """
-        Private slot to change the master password.
+        Private slot to change the main password.
         """
-        from .MasterPasswordEntryDialog import MasterPasswordEntryDialog
+        from .MainPasswordEntryDialog import MainPasswordEntryDialog
 
-        dlg = MasterPasswordEntryDialog(Preferences.getUser("MasterPassword"), self)
+        dlg = MainPasswordEntryDialog(Preferences.getUser("MasterPassword"), self)
         if dlg.exec() == QDialog.DialogCode.Accepted:
-            Preferences.setUser("MasterPassword", dlg.getMasterPassword())
+            Preferences.setUser("MasterPassword", dlg.getMainPassword())
 
-            if self.__oldUseMasterPassword != self.masterPasswordCheckBox.isChecked():
-                # the user is about to change the use of a master password
+            if self.__oldUseMainPassword != self.mainPasswordCheckBox.isChecked():
+                # the user is about to change the use of a main password
                 # just save the changed password
-                self.__newPassword = dlg.getMasterPassword()
+                self.__newPassword = dlg.getMainPassword()
             else:
-                self.__configDlg.masterPasswordChanged.emit(
-                    dlg.getCurrentPassword(), dlg.getMasterPassword()
+                self.__configDlg.mainPasswordChanged.emit(
+                    dlg.getCurrentPassword(), dlg.getMainPassword()
                 )
 
 

eric ide

mercurial