74 @param checked flag indicating the state of the check box (boolean) |
74 @param checked flag indicating the state of the check box (boolean) |
75 """ |
75 """ |
76 if checked: |
76 if checked: |
77 dlg = MasterPasswordEntryDialog("", self) |
77 dlg = MasterPasswordEntryDialog("", self) |
78 if dlg.exec_() == QDialog.Accepted: |
78 if dlg.exec_() == QDialog.Accepted: |
79 Preferences.setUser("MasterPassword", |
79 Preferences.setUser("MasterPassword", |
80 dlg.getMasterPassword()) |
80 dlg.getMasterPassword()) |
81 self.masterPasswordButton.setEnabled(True) |
81 self.masterPasswordButton.setEnabled(True) |
82 self.__newPassword = dlg.getMasterPassword() |
82 self.__newPassword = dlg.getMasterPassword() |
83 else: |
83 else: |
84 self.masterPasswordCheckBox.setChecked(False) |
84 self.masterPasswordCheckBox.setChecked(False) |
91 """ |
91 """ |
92 Private slot to change the master password. |
92 Private slot to change the master password. |
93 """ |
93 """ |
94 dlg = MasterPasswordEntryDialog(Preferences.getUser("MasterPassword"), self) |
94 dlg = MasterPasswordEntryDialog(Preferences.getUser("MasterPassword"), self) |
95 if dlg.exec_() == QDialog.Accepted: |
95 if dlg.exec_() == QDialog.Accepted: |
96 Preferences.setUser("MasterPassword", |
96 Preferences.setUser("MasterPassword", |
97 dlg.getMasterPassword()) |
97 dlg.getMasterPassword()) |
98 |
98 |
99 if self.__oldUseMasterPassword != self.masterPasswordCheckBox.isChecked(): |
99 if self.__oldUseMasterPassword != self.masterPasswordCheckBox.isChecked(): |
100 # the user is about to change the use of a master password |
100 # the user is about to change the use of a master password |
101 # just save the changed password |
101 # just save the changed password |
102 self.__newPassword = dlg.getMasterPassword() |
102 self.__newPassword = dlg.getMasterPassword() |
103 else: |
103 else: |
104 self.__configDlg.masterPasswordChanged.emit( |
104 self.__configDlg.masterPasswordChanged.emit( |
105 dlg.getCurrentPassword(), dlg.getMasterPassword()) |
105 dlg.getCurrentPassword(), dlg.getMasterPassword()) |
106 |
106 |
|
107 |
107 def create(dlg): |
108 def create(dlg): |
108 """ |
109 """ |
109 Module function to create the configuration page. |
110 Module function to create the configuration page. |
110 |
111 |
111 @param dlg reference to the configuration dialog |
112 @param dlg reference to the configuration dialog |