aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Lcd.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-02-15 17:28:23 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2008-02-15 17:28:23 +0000
commitd764fc2a712770bff292b19cc6f815ad8cc55950 (patch)
treed91966ebcc811fe4457cd282b91b3aa2ed8d87e6 /lib/python/Components/Lcd.py
parentda1955116b7e8b8c203e27c7e5994537219a0632 (diff)
downloadenigma2-d764fc2a712770bff292b19cc6f815ad8cc55950.tar.gz
enigma2-d764fc2a712770bff292b19cc6f815ad8cc55950.zip
dont show display setup in menu, when no display is available
Diffstat (limited to 'lib/python/Components/Lcd.py')
-rw-r--r--lib/python/Components/Lcd.py46
1 files changed, 24 insertions, 22 deletions
diff --git a/lib/python/Components/Lcd.py b/lib/python/Components/Lcd.py
index eb3e3df1..e722250d 100644
--- a/lib/python/Components/Lcd.py
+++ b/lib/python/Components/Lcd.py
@@ -1,6 +1,6 @@
from config import config, ConfigSubsection, ConfigSlider, ConfigYesNo, ConfigNothing
-
from enigma import eDBoxLCD
+from Components.SystemInfo import SystemInfo
class LCD:
def __init__(self):
@@ -29,32 +29,34 @@ class LCD:
return eDBoxLCD.getInstance().isOled()
def InitLcd():
+ detected = eDBoxLCD.getInstance().detected()
+ SystemInfo["Display"] = detected
+ if detected:
+ def setLCDbright(configElement):
+ ilcd.setBright(configElement.value);
- def setLCDbright(configElement):
- ilcd.setBright(configElement.value);
-
- def setLCDcontrast(configElement):
- ilcd.setContrast(configElement.value);
+ def setLCDcontrast(configElement):
+ ilcd.setContrast(configElement.value);
- def setLCDinverted(configElement):
- ilcd.setInverted(configElement.value);
+ def setLCDinverted(configElement):
+ ilcd.setInverted(configElement.value);
- ilcd = LCD()
+ ilcd = LCD()
- config.lcd = ConfigSubsection();
+ config.lcd = ConfigSubsection();
- config.lcd.bright = ConfigSlider(default=10, limits=(0, 10))
- config.lcd.bright.addNotifier(setLCDbright);
- config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
+ config.lcd.bright = ConfigSlider(default=10, limits=(0, 10))
+ config.lcd.bright.addNotifier(setLCDbright);
+ config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright)
- if not ilcd.isOled():
- config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
- config.lcd.contrast.addNotifier(setLCDcontrast);
- else:
- config.lcd.contrast = ConfigNothing()
+ if not ilcd.isOled():
+ config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20))
+ config.lcd.contrast.addNotifier(setLCDcontrast);
+ else:
+ config.lcd.contrast = ConfigNothing()
- config.lcd.standby = ConfigSlider(default=0, limits=(0, 10))
- config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
+ config.lcd.standby = ConfigSlider(default=0, limits=(0, 10))
+ config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby)
- config.lcd.invert = ConfigYesNo(default=False)
- config.lcd.invert.addNotifier(setLCDinverted);
+ config.lcd.invert = ConfigYesNo(default=False)
+ config.lcd.invert.addNotifier(setLCDinverted);