Helpviewer/Sync/SyncEncryptionPage.py

changeset 1682
0eefcc28fa74
parent 1680
28e57079dab5
child 1701
9eee32bac32e
--- a/Helpviewer/Sync/SyncEncryptionPage.py	Sun Feb 26 19:43:27 2012 +0100
+++ b/Helpviewer/Sync/SyncEncryptionPage.py	Mon Feb 27 19:33:51 2012 +0100
@@ -30,11 +30,17 @@
         super().__init__(parent)
         self.setupUi(self)
         
+        self.keySizeComboBox.addItem(self.trUtf8("128 Bits"), 16)
+        self.keySizeComboBox.addItem(self.trUtf8("192 Bits"), 24)
+        self.keySizeComboBox.addItem(self.trUtf8("256 Bits"), 32)
+        
         self.registerField("ReencryptData", self.reencryptCheckBox)
         
         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")))
     
     def nextId(self):
         """
@@ -44,6 +50,8 @@
         """
         Preferences.setHelp("SyncEncryptData", self.encryptionGroupBox.isChecked())
         Preferences.setHelp("SyncEncryptionKey", self.encryptionKeyEdit.text())
+        Preferences.setHelp("SyncEncryptionKeyLength", self.keySizeComboBox.itemData(
+            self.keySizeComboBox.currentIndex()))
         
         return SyncGlobals.PageType
     

eric ide

mercurial