Preferences/ConfigurationDialog.py

changeset 1127
b1802ebe0066
parent 1112
8a7d1b9d18db
child 1131
7781e396c903
--- a/Preferences/ConfigurationDialog.py	Thu Jun 16 16:29:27 2011 +0200
+++ b/Preferences/ConfigurationDialog.py	Sun Jun 19 15:19:46 2011 +0200
@@ -60,8 +60,11 @@
     Class implementing a dialog for the configuration of eric5.
     
     @signal preferencesChanged() emitted after settings have been changed
+    @signal masterPasswordChanged(str, str) emitted after the master
+        password has been changed with the old and the new password
     """
     preferencesChanged = pyqtSignal()
+    masterPasswordChanged = pyqtSignal(str, str)
     
     DefaultMode = 0
     HelpBrowserMode = 1
@@ -143,6 +146,9 @@
                 "qtPage": \
                     [self.trUtf8("Qt"), "preferences-qtlogo.png",
                     "QtPage", None, None],
+                "securityPage": \
+                    [self.trUtf8("Security"), "preferences-security.png",
+                    "SecurityPage", None, None],
                 "shellPage": \
                     [self.trUtf8("Shell"), "preferences-shell.png",
                     "ShellPage", None, None],
@@ -297,6 +303,9 @@
                 "printerPage": \
                     [self.trUtf8("Printer"), "preferences-printer.png",
                     "PrinterPage", None, None],
+                "securityPage": \
+                    [self.trUtf8("Security"), "preferences-security.png",
+                    "SecurityPage", None, None],
                 
                 "0helpPage": \
                     [self.trUtf8("Help"), "preferences-help.png",
@@ -643,8 +652,11 @@
     Class for the dialog variant.
     
     @signal preferencesChanged() emitted after settings have been changed
+    @signal masterPasswordChanged(str, str) emitted after the master
+        password has been changed with the old and the new password
     """
     preferencesChanged = pyqtSignal()
+    masterPasswordChanged = pyqtSignal(str, str)
     
     DefaultMode = ConfigurationWidget.DefaultMode
     HelpBrowserMode = ConfigurationWidget.HelpBrowserMode
@@ -680,6 +692,7 @@
         self.cw.buttonBox.accepted[()].connect(self.accept)
         self.cw.buttonBox.rejected[()].connect(self.reject)
         self.cw.preferencesChanged.connect(self.__preferencesChanged)
+        self.cw.masterPasswordChanged.connect(self.__masterPasswordChanged)
         
     def __preferencesChanged(self):
         """
@@ -687,6 +700,15 @@
         """
         self.preferencesChanged.emit()
         
+    def __masterPasswordChanged(self, oldPassword, newPassword):
+        """
+        Private slot to handle the change of the master password.
+        
+        @param oldPassword current master password (string)
+        @param newPassword new master password (string)
+        """
+        self.masterPasswordChanged.emit(oldPassword, newPassword)
+        
     def showConfigurationPageByName(self, pageName):
         """
         Public slot to show a named configuration page.

eric ide

mercurial