eric6/Preferences/ConfigurationPages/MasterPasswordEntryDialog.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
equal deleted inserted replaced
8221:0572a215bd2f 8222:5994b80b8760
59 self.newPasswordEdit.text() != self.newPasswordAgainEdit.text() 59 self.newPasswordEdit.text() != self.newPasswordAgainEdit.text()
60 ): 60 ):
61 enable = False 61 enable = False
62 error = error or self.tr("Repeated password is wrong.") 62 error = error or self.tr("Repeated password is wrong.")
63 63
64 if self.currentPasswordEdit.isEnabled(): 64 if (
65 if self.newPasswordEdit.text() == self.currentPasswordEdit.text(): 65 self.currentPasswordEdit.isEnabled() and
66 enable = False 66 self.newPasswordEdit.text() == self.currentPasswordEdit.text()
67 error = error or self.tr( 67 ):
68 "Old and new password must not be the same.") 68 enable = False
69 error = error or self.tr(
70 "Old and new password must not be the same.")
69 71
70 self.buttonBox.button( 72 self.buttonBox.button(
71 QDialogButtonBox.StandardButton.Ok).setEnabled(enable) 73 QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
72 self.errorLabel.setText(error) 74 self.errorLabel.setText(error)
73 75

eric ide

mercurial