Preferences/ConfigurationPages/EditorStylesPage.py

changeset 4176
4c09d3d75768
parent 4164
daae068f48b5
child 4304
f85965649066
diff -r 4db8023ccf32 -r 4c09d3d75768 Preferences/ConfigurationPages/EditorStylesPage.py
--- a/Preferences/ConfigurationPages/EditorStylesPage.py	Sat Mar 14 14:29:22 2015 +0100
+++ b/Preferences/ConfigurationPages/EditorStylesPage.py	Sat Mar 14 14:36:52 2015 +0100
@@ -24,8 +24,6 @@
     """
     Class implementing the Editor Styles configuration page.
     """
-    # TODO: configure foreground and background of indentation guides
-    # setIndentationGuidesBackgroundColor, setIndentationGuidesForegroundColor
     def __init__(self):
         """
         Constructor
@@ -244,6 +242,15 @@
         self.initColour("MarkerMapBackground",
                         self.markerMapBackgroundButton,
                         Preferences.getEditorColour)
+        
+        self.indentguidesCheckBox.setChecked(
+            Preferences.getEditor("IndentationGuides"))
+        self.initColour("IndentationGuidesBackground",
+                        self.indentationGuidesBackgroundButton,
+                        Preferences.getEditorColour)
+        self.initColour("IndentationGuidesForeground",
+                        self.indentationGuidesForegroundButton,
+                        Preferences.getEditorColour)
     
     def save(self):
         """
@@ -323,6 +330,10 @@
             "OnlineChangeTraceInterval",
             self.changeTraceTimeoutSpinBox.value())
         
+        Preferences.setEditor(
+            "IndentationGuides",
+            self.indentguidesCheckBox.isChecked())
+        
         self.saveColours(Preferences.setEditorColour)
         for key in list(self.editorColours.keys()):
             Preferences.setEditorColour(key, self.editorColours[key])

eric ide

mercurial