Preferences/ConfigurationPages/TerminalPage.py

branch
5_3_x
changeset 2475
c74e1cff7f3f
parent 2473
c9f484ea061b
child 2477
5d706fb30a10
--- a/Preferences/ConfigurationPages/TerminalPage.py	Sat Mar 09 17:05:49 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2008 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing the Terminal configuration page.
-"""
-
-from PyQt4.QtCore import pyqtSlot
-
-from .ConfigurationPageBase import ConfigurationPageBase
-from .Ui_TerminalPage import Ui_TerminalPage
-
-import Preferences
-import Utilities
-
-
-class TerminalPage(ConfigurationPageBase, Ui_TerminalPage):
-    """
-    Class implementing the Terminal configuration page.
-    """
-    def __init__(self):
-        """
-        Constructor
-        """
-        super().__init__()
-        self.setupUi(self)
-        self.setObjectName("TerminalPage")
-        
-        if Utilities.isWindowsPlatform():
-            self.shellGroup.setEnabled(False)
-        else:
-            self.shellCombo.addItems(["ash", "bash", "csh", "ksh", "sh", "tcsh", "zsh"])
-        
-        # set initial values
-        self.linenowidthSlider.setValue(
-            Preferences.getTerminal("LinenoWidth"))
-        self.linenoCheckBox.setChecked(
-            Preferences.getTerminal("LinenoMargin"))
-        self.syntaxHighlightingCheckBox.setChecked(
-            Preferences.getTerminal("SyntaxHighlightingEnabled"))
-        self.historySpinBox.setValue(
-            Preferences.getTerminal("MaxHistoryEntries"))
-        
-        self.monospacedFont = Preferences.getTerminal("MonospacedFont")
-        self.monospacedFontSample.setFont(self.monospacedFont)
-        self.monospacedCheckBox.setChecked(
-            Preferences.getTerminal("UseMonospacedFont"))
-        self.marginsFont = Preferences.getTerminal("MarginsFont")
-        self.marginsFontSample.setFont(self.marginsFont)
-        
-        self.shellCombo.setEditText(
-            Preferences.getTerminal("Shell"))
-        self.interactiveCheckBox.setChecked(
-            Preferences.getTerminal("ShellInteractive"))
-        
-    def save(self):
-        """
-        Public slot to save the Shell configuration.
-        """
-        Preferences.setTerminal("LinenoWidth",
-            self.linenowidthSlider.value())
-        Preferences.setTerminal("LinenoMargin",
-            self.linenoCheckBox.isChecked())
-        Preferences.setTerminal("SyntaxHighlightingEnabled",
-            self.syntaxHighlightingCheckBox.isChecked())
-        Preferences.setTerminal("MaxHistoryEntries",
-            self.historySpinBox.value())
-        
-        Preferences.setTerminal("MonospacedFont", self.monospacedFont)
-        Preferences.setTerminal("UseMonospacedFont",
-            self.monospacedCheckBox.isChecked())
-        Preferences.setTerminal("MarginsFont", self.marginsFont)
-        
-        Preferences.setTerminal("Shell",
-            self.shellCombo.currentText())
-        Preferences.setTerminal("ShellInteractive",
-            self.interactiveCheckBox.isChecked())
-        
-    @pyqtSlot()
-    def on_monospacedFontButton_clicked(self):
-        """
-        Private method used to select the font to be used as the monospaced font.
-        """
-        self.monospacedFont = \
-            self.selectFont(self.monospacedFontSample, self.monospacedFont)
-        
-    @pyqtSlot()
-    def on_linenumbersFontButton_clicked(self):
-        """
-        Private method used to select the font for the editor margins.
-        """
-        self.marginsFont = self.selectFont(self.marginsFontSample, self.marginsFont)
-        
-    def polishPage(self):
-        """
-        Public slot to perform some polishing actions.
-        """
-        self.monospacedFontSample.setFont(self.monospacedFont)
-        self.marginsFontSample.setFont(self.marginsFont)
-    
-
-def create(dlg):
-    """
-    Module function to create the configuration page.
-    
-    @param dlg reference to the configuration dialog
-    """
-    page = TerminalPage()
-    return page

eric ide

mercurial