54 |
54 |
55 def save(self): |
55 def save(self): |
56 """ |
56 """ |
57 Public slot to save the Help Viewers configuration. |
57 Public slot to save the Help Viewers configuration. |
58 """ |
58 """ |
59 Preferences.setUser("SavePasswords", |
59 Preferences.setUser( |
|
60 "SavePasswords", |
60 self.savePasswordsCheckBox.isChecked()) |
61 self.savePasswordsCheckBox.isChecked()) |
61 Preferences.setUser("UseMasterPassword", |
62 Preferences.setUser( |
|
63 "UseMasterPassword", |
62 self.masterPasswordCheckBox.isChecked()) |
64 self.masterPasswordCheckBox.isChecked()) |
63 if self.dnsPrefetchCheckBox.isEnabled(): |
65 if self.dnsPrefetchCheckBox.isEnabled(): |
64 Preferences.setHelp("DnsPrefetchEnabled", |
66 Preferences.setHelp( |
|
67 "DnsPrefetchEnabled", |
65 self.dnsPrefetchCheckBox.isChecked()) |
68 self.dnsPrefetchCheckBox.isChecked()) |
66 |
69 |
67 if self.__oldUseMasterPassword != \ |
70 if self.__oldUseMasterPassword != \ |
68 self.masterPasswordCheckBox.isChecked(): |
71 self.masterPasswordCheckBox.isChecked(): |
69 self.__configDlg.masterPasswordChanged.emit("", self.__newPassword) |
72 self.__configDlg.masterPasswordChanged.emit("", self.__newPassword) |
77 """ |
80 """ |
78 if checked: |
81 if checked: |
79 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog |
82 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog |
80 dlg = MasterPasswordEntryDialog("", self) |
83 dlg = MasterPasswordEntryDialog("", self) |
81 if dlg.exec_() == QDialog.Accepted: |
84 if dlg.exec_() == QDialog.Accepted: |
82 Preferences.setUser("MasterPassword", |
85 Preferences.setUser( |
|
86 "MasterPassword", |
83 dlg.getMasterPassword()) |
87 dlg.getMasterPassword()) |
84 self.masterPasswordButton.setEnabled(True) |
88 self.masterPasswordButton.setEnabled(True) |
85 self.__newPassword = dlg.getMasterPassword() |
89 self.__newPassword = dlg.getMasterPassword() |
86 else: |
90 else: |
87 self.masterPasswordCheckBox.setChecked(False) |
91 self.masterPasswordCheckBox.setChecked(False) |
96 """ |
100 """ |
97 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog |
101 from .MasterPasswordEntryDialog import MasterPasswordEntryDialog |
98 dlg = MasterPasswordEntryDialog( |
102 dlg = MasterPasswordEntryDialog( |
99 Preferences.getUser("MasterPassword"), self) |
103 Preferences.getUser("MasterPassword"), self) |
100 if dlg.exec_() == QDialog.Accepted: |
104 if dlg.exec_() == QDialog.Accepted: |
101 Preferences.setUser("MasterPassword", |
105 Preferences.setUser( |
|
106 "MasterPassword", |
102 dlg.getMasterPassword()) |
107 dlg.getMasterPassword()) |
103 |
108 |
104 if self.__oldUseMasterPassword != \ |
109 if self.__oldUseMasterPassword != \ |
105 self.masterPasswordCheckBox.isChecked(): |
110 self.masterPasswordCheckBox.isChecked(): |
106 # the user is about to change the use of a master password |
111 # the user is about to change the use of a master password |