eric6/Preferences/ConfigurationPages/MasterPasswordEntryDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
32 self.currentPasswordEdit.setEnabled(False) 32 self.currentPasswordEdit.setEnabled(False)
33 if hasattr(self.currentPasswordEdit, "setPlaceholderText"): 33 if hasattr(self.currentPasswordEdit, "setPlaceholderText"):
34 self.currentPasswordEdit.setPlaceholderText( 34 self.currentPasswordEdit.setPlaceholderText(
35 self.tr("(not defined yet)")) 35 self.tr("(not defined yet)"))
36 36
37 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) 37 self.buttonBox.button(
38 QDialogButtonBox.StandardButton.Ok).setEnabled(False)
38 39
39 def __updateUI(self): 40 def __updateUI(self):
40 """ 41 """
41 Private slot to update the variable parts of the UI. 42 Private slot to update the variable parts of the UI.
42 """ 43 """
64 if self.newPasswordEdit.text() == self.currentPasswordEdit.text(): 65 if self.newPasswordEdit.text() == self.currentPasswordEdit.text():
65 enable = False 66 enable = False
66 error = error or self.tr( 67 error = error or self.tr(
67 "Old and new password must not be the same.") 68 "Old and new password must not be the same.")
68 69
69 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) 70 self.buttonBox.button(
71 QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
70 self.errorLabel.setText(error) 72 self.errorLabel.setText(error)
71 73
72 @pyqtSlot(str) 74 @pyqtSlot(str)
73 def on_currentPasswordEdit_textChanged(self, txt): 75 def on_currentPasswordEdit_textChanged(self, txt):
74 """ 76 """

eric ide

mercurial