--- a/Preferences/ConfigurationPages/TemplatesPage.py Sun Apr 13 15:45:57 2014 +0200 +++ b/Preferences/ConfigurationPages/TemplatesPage.py Tue Apr 15 22:41:08 2014 +0200 @@ -9,6 +9,8 @@ from __future__ import unicode_literals +from PyQt4.QtCore import pyqtSlot + from .ConfigurationPageBase import ConfigurationPageBase from .Ui_TemplatesPage import Ui_TemplatesPage @@ -38,6 +40,8 @@ self.templatesMultiDialogButton.setChecked(True) self.templatesToolTipCheckBox.setChecked( Preferences.getTemplates("ShowTooltip")) + self.editorFont = Preferences.getTemplates("EditorFont") + self.editorFontSample.setFont(self.editorFont) def save(self): """ @@ -55,6 +59,15 @@ Preferences.setTemplates( "ShowTooltip", self.templatesToolTipCheckBox.isChecked()) + Preferences.setTemplates("EditorFont", self.editorFont) + + @pyqtSlot() + def on_editorFontButton_clicked(self): + """ + Private method used to select the font to be used by the code editor. + """ + self.editorFont = self.selectFont( + self.editorFontSample, self.editorFont) def create(dlg):