Preferences/ConfigurationPages/EditorSpellCheckingPage.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3010
befeff46ec0f
child 3058
0a02c433f52d
diff -r 9986ec0e559a -r 10516539f238 Preferences/ConfigurationPages/EditorSpellCheckingPage.py
--- a/Preferences/ConfigurationPages/EditorSpellCheckingPage.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Preferences/ConfigurationPages/EditorSpellCheckingPage.py	Fri Oct 18 23:00:41 2013 +0200
@@ -21,7 +21,8 @@
 import Utilities
 
 
-class EditorSpellCheckingPage(ConfigurationPageBase, Ui_EditorSpellCheckingPage):
+class EditorSpellCheckingPage(ConfigurationPageBase,
+                              Ui_EditorSpellCheckingPage):
     """
     Class implementing the Editor Spellchecking configuration page.
     """
@@ -60,39 +61,46 @@
         self.initColour("SpellingMarkers", self.spellingMarkerButton,
             Preferences.getEditorColour, hasAlpha=True)
         
-        self.pwlEdit.setText(Preferences.getEditor("SpellCheckingPersonalWordList"))
-        self.pelEdit.setText(Preferences.getEditor("SpellCheckingPersonalExcludeList"))
+        self.pwlEdit.setText(
+            Preferences.getEditor("SpellCheckingPersonalWordList"))
+        self.pelEdit.setText(
+            Preferences.getEditor("SpellCheckingPersonalExcludeList"))
         
         if self.spellingFrame.isEnabled():
             self.enabledCheckBox.setChecked(
                 Preferences.getEditor("AutoSpellCheckingEnabled"))
         else:
             self.enabledCheckBox.setChecked(False)  # not available
-        self.chunkSizeSpinBox.setValue(Preferences.getEditor("AutoSpellCheckChunkSize"))
+        self.chunkSizeSpinBox.setValue(
+            Preferences.getEditor("AutoSpellCheckChunkSize"))
         
     def save(self):
         """
         Public slot to save the Editor Search configuration.
         """
-        Preferences.setEditor("SpellCheckingEnabled",
-            self.checkingEnabledCheckBox.isChecked())
+        Preferences.setEditor(
+            "SpellCheckingEnabled", self.checkingEnabledCheckBox.isChecked())
         
-        Preferences.setEditor("SpellCheckingDefaultLanguage",
+        Preferences.setEditor(
+            "SpellCheckingDefaultLanguage",
             self.defaultLanguageCombo.currentText())
         
-        Preferences.setEditor("SpellCheckStringsOnly",
-            self.stringsOnlyCheckBox.isChecked())
-        Preferences.setEditor("SpellCheckingMinWordSize",
-            self.minimumWordSizeSlider.value())
+        Preferences.setEditor(
+            "SpellCheckStringsOnly", self.stringsOnlyCheckBox.isChecked())
+        Preferences.setEditor(
+            "SpellCheckingMinWordSize", self.minimumWordSizeSlider.value())
         
         self.saveColours(Preferences.setEditorColour)
         
-        Preferences.setEditor("SpellCheckingPersonalWordList", self.pwlEdit.text())
-        Preferences.setEditor("SpellCheckingPersonalExcludeList", self.pelEdit.text())
+        Preferences.setEditor(
+            "SpellCheckingPersonalWordList", self.pwlEdit.text())
+        Preferences.setEditor(
+            "SpellCheckingPersonalExcludeList", self.pelEdit.text())
         
-        Preferences.setEditor("AutoSpellCheckingEnabled",
-            self.enabledCheckBox.isChecked())
-        Preferences.setEditor("AutoSpellCheckChunkSize", self.chunkSizeSpinBox.value())
+        Preferences.setEditor(
+            "AutoSpellCheckingEnabled", self.enabledCheckBox.isChecked())
+        Preferences.setEditor(
+            "AutoSpellCheckChunkSize", self.chunkSizeSpinBox.value())
     
     @pyqtSlot()
     def on_pwlButton_clicked(self):
@@ -128,6 +136,7 @@
     Module function to create the configuration page.
     
     @param dlg reference to the configuration dialog
+    @return reference to the instantiated page (ConfigurationPageBase)
     """
     page = EditorSpellCheckingPage()
     return page

eric ide

mercurial