diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-09-03 21:26:19 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-09-03 21:26:19 +0000 |
| commit | 1a6dec0e15983b83e4de2859624ae36d8d619271 (patch) | |
| tree | 075220385f4adda5b8eea1abd2a2d1148a20dff5 /lib/python/Components/config.py | |
| parent | bbcd2c8be1bd2ce4681a80c82bbb00ac04137505 (diff) | |
| download | enigma2-1a6dec0e15983b83e4de2859624ae36d8d619271.tar.gz enigma2-1a6dec0e15983b83e4de2859624ae36d8d619271.zip | |
- beautified network cursor, added 'selected' argument to __call__
Diffstat (limited to 'lib/python/Components/config.py')
| -rw-r--r-- | lib/python/Components/config.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 2fd0ff15..494d1d88 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -74,8 +74,8 @@ class configSelection: self.parent.change() - def __call__(self): #needed by configlist - self.checkValues() + def __call__(self, selected): #needed by configlist + self.checkValues() return ("text", self.parent.vals[self.parent.value]) class configSequence: @@ -114,24 +114,25 @@ class configSequence: #FIXME: dont call when press left/right self.parent.change() - def __call__(self): #needed by configlist + def __call__(self, selected): #needed by configlist value = "" mPos = self.markedPos print mPos for i in self.parent.value: - if value != "": #fixme no heading separator possible + if len(value): #fixme no heading separator possible value += self.parent.vals[0] if mPos >= len(value) - 1: mPos += 1 diff = self.parent.vals[1] - len(str(i)) if diff > 0: + # if this helps?! value += " " * diff value += str(i) -# or the above code if you have to spare ink -# value = ((len(self.parent.value) * ("%0" + str(self.parent.vals[1]) + "d" + self.parent.vals[0]))[0:-1]) % tuple(self.parent.value) - value = value[0:mPos] + "_" + value[mPos + 1:] - return ("text", value) + + # only mark cursor when we are selected + # (this code is heavily ink optimized!) + return ("mtext"[1-selected:], value, [mPos]) class configValue: def __init__(self, obj): @@ -175,8 +176,8 @@ class ConfigSlider: self.checkValues() self.parent.change() - def __call__(self): #needed by configlist - self.checkValues() + def __call__(self, selected): #needed by configlist + self.checkValues() return ("slider", self.parent.value * 10) class ConfigSubsection: |
