Preferences/ConfigurationPages/SecurityPage.py

changeset 3025
67064c71df21
parent 3010
befeff46ec0f
child 3038
7fe9a53280bd
child 3058
0a02c433f52d
equal deleted inserted replaced
3024:17c01303a239 3025:67064c71df21
52 52
53 def save(self): 53 def save(self):
54 """ 54 """
55 Public slot to save the Help Viewers configuration. 55 Public slot to save the Help Viewers configuration.
56 """ 56 """
57 Preferences.setUser("SavePasswords", 57 Preferences.setUser(
58 "SavePasswords",
58 self.savePasswordsCheckBox.isChecked()) 59 self.savePasswordsCheckBox.isChecked())
59 Preferences.setUser("UseMasterPassword", 60 Preferences.setUser(
61 "UseMasterPassword",
60 self.masterPasswordCheckBox.isChecked()) 62 self.masterPasswordCheckBox.isChecked())
61 if self.dnsPrefetchCheckBox.isEnabled(): 63 if self.dnsPrefetchCheckBox.isEnabled():
62 Preferences.setHelp("DnsPrefetchEnabled", 64 Preferences.setHelp(
65 "DnsPrefetchEnabled",
63 self.dnsPrefetchCheckBox.isChecked()) 66 self.dnsPrefetchCheckBox.isChecked())
64 67
65 if self.__oldUseMasterPassword != \ 68 if self.__oldUseMasterPassword != \
66 self.masterPasswordCheckBox.isChecked(): 69 self.masterPasswordCheckBox.isChecked():
67 self.__configDlg.masterPasswordChanged.emit("", self.__newPassword) 70 self.__configDlg.masterPasswordChanged.emit("", self.__newPassword)
75 """ 78 """
76 if checked: 79 if checked:
77 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog 80 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog
78 dlg = MasterPasswordEntryDialog("", self) 81 dlg = MasterPasswordEntryDialog("", self)
79 if dlg.exec_() == QDialog.Accepted: 82 if dlg.exec_() == QDialog.Accepted:
80 Preferences.setUser("MasterPassword", 83 Preferences.setUser(
84 "MasterPassword",
81 dlg.getMasterPassword()) 85 dlg.getMasterPassword())
82 self.masterPasswordButton.setEnabled(True) 86 self.masterPasswordButton.setEnabled(True)
83 self.__newPassword = dlg.getMasterPassword() 87 self.__newPassword = dlg.getMasterPassword()
84 else: 88 else:
85 self.masterPasswordCheckBox.setChecked(False) 89 self.masterPasswordCheckBox.setChecked(False)
94 """ 98 """
95 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog 99 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog
96 dlg = MasterPasswordEntryDialog( 100 dlg = MasterPasswordEntryDialog(
97 Preferences.getUser("MasterPassword"), self) 101 Preferences.getUser("MasterPassword"), self)
98 if dlg.exec_() == QDialog.Accepted: 102 if dlg.exec_() == QDialog.Accepted:
99 Preferences.setUser("MasterPassword", 103 Preferences.setUser(
104 "MasterPassword",
100 dlg.getMasterPassword()) 105 dlg.getMasterPassword())
101 106
102 if self.__oldUseMasterPassword != \ 107 if self.__oldUseMasterPassword != \
103 self.masterPasswordCheckBox.isChecked(): 108 self.masterPasswordCheckBox.isChecked():
104 # the user is about to change the use of a master password 109 # the user is about to change the use of a master password

eric ide

mercurial