Preferences/ConfigurationPages/EditorSearchPage.py

changeset 2230
2b1b9265156c
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
--- a/Preferences/ConfigurationPages/EditorSearchPage.py	Sun Nov 25 20:22:02 2012 +0100
+++ b/Preferences/ConfigurationPages/EditorSearchPage.py	Mon Nov 26 19:07:40 2012 +0100
@@ -7,8 +7,6 @@
 Module implementing the Editor Search configuration page.
 """
 
-from PyQt4.QtCore import pyqtSlot
-
 from .ConfigurationPageBase import ConfigurationPageBase
 from .Ui_EditorSearchPage import Ui_EditorSearchPage
 
@@ -40,9 +38,8 @@
         self.markOccurrencesTimeoutSpinBox.setValue(
             Preferences.getEditor("MarkOccurrencesTimeout"))
         
-        self.editorColours["SearchMarkers"] = \
-            self.initColour("SearchMarkers", self.searchMarkerButton,
-                Preferences.getEditorColour)
+        self.initColour("SearchMarkers", self.searchMarkerButton,
+            Preferences.getEditorColour, hasAlpha=True)
         
     def save(self):
         """
@@ -58,17 +55,7 @@
         Preferences.setEditor("MarkOccurrencesTimeout",
             self.markOccurrencesTimeoutSpinBox.value())
         
-        for key in list(self.editorColours.keys()):
-            Preferences.setEditorColour(key, self.editorColours[key])
-        
-    @pyqtSlot()
-    def on_searchMarkerButton_clicked(self):
-        """
-        Private slot to set the colour of the search markers.
-        """
-        self.editorColours["SearchMarkers"] = \
-            self.selectColour(self.searchMarkerButton,
-                self.editorColours["SearchMarkers"], True)
+        self.saveColours(Preferences.setEditorColour)
 
 
 def create(dlg):

eric ide

mercurial