Helpviewer/Sync/SyncEncryptionPage.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3002
6ffc581f00f1
child 3060
5883ce99ee12
--- a/Helpviewer/Sync/SyncEncryptionPage.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Helpviewer/Sync/SyncEncryptionPage.py	Fri Oct 18 23:00:41 2013 +0200
@@ -36,8 +36,10 @@
         
         self.registerField("ReencryptData", self.reencryptCheckBox)
         
-        self.encryptionGroupBox.setChecked(Preferences.getHelp("SyncEncryptData"))
-        self.encryptionKeyEdit.setText(Preferences.getHelp("SyncEncryptionKey"))
+        self.encryptionGroupBox.setChecked(
+            Preferences.getHelp("SyncEncryptData"))
+        self.encryptionKeyEdit.setText(
+            Preferences.getHelp("SyncEncryptionKey"))
         self.encryptionKeyAgainEdit.setEnabled(False)
         self.keySizeComboBox.setCurrentIndex(self.keySizeComboBox.findData(
             Preferences.getHelp("SyncEncryptionKeyLength")))
@@ -50,12 +52,15 @@
         
         @return next wizard page ID (integer)
         """
-        Preferences.setHelp("SyncEncryptData", self.encryptionGroupBox.isChecked())
-        Preferences.setHelp("SyncEncryptionKey", self.encryptionKeyEdit.text())
-        Preferences.setHelp("SyncEncryptionKeyLength", self.keySizeComboBox.itemData(
-            self.keySizeComboBox.currentIndex()))
-        Preferences.setHelp("SyncEncryptPasswordsOnly",
-            self.loginsOnlyCheckBox.isChecked())
+        Preferences.setHelp(
+            "SyncEncryptData", self.encryptionGroupBox.isChecked())
+        Preferences.setHelp(
+            "SyncEncryptionKey", self.encryptionKeyEdit.text())
+        Preferences.setHelp(
+            "SyncEncryptionKeyLength", self.keySizeComboBox.itemData(
+                self.keySizeComboBox.currentIndex()))
+        Preferences.setHelp(
+            "SyncEncryptPasswordsOnly", self.loginsOnlyCheckBox.isChecked())
         
         from . import SyncGlobals
         return SyncGlobals.PageType
@@ -91,12 +96,15 @@
                 self.reencryptCheckBox.isChecked())
             
             if self.encryptionKeyEdit.text() == "":
-                error = error or self.trUtf8("Encryption key must not be empty.")
+                error = error or self.trUtf8(
+                    "Encryption key must not be empty.")
             
             if self.encryptionKeyEdit.text() != "" and \
-               self.reencryptCheckBox.isChecked() and \
-               self.encryptionKeyEdit.text() != self.encryptionKeyAgainEdit.text():
-                error = error or self.trUtf8("Repeated encryption key is wrong.")
+                    self.reencryptCheckBox.isChecked() and \
+                    (self.encryptionKeyEdit.text() != 
+                     self.encryptionKeyAgainEdit.text()):
+                error = error or self.trUtf8(
+                    "Repeated encryption key is wrong.")
         
         self.errorLabel.setText(error)
         self.completeChanged.emit()

eric ide

mercurial