def cancelClick(self):
self.close(False)
+class SilentBouquetSelector:
+ def __init__(self, bouquets, enableWrapAround=False, current=0):
+ self.bouquets = [b[1] for b in bouquets]
+ self.pos = current
+ self.count = len(bouquets)
+ self.enableWrapAround = enableWrapAround
+
+ def up(self):
+ if self.pos > 0 or self.enableWrapAround:
+ self.pos = (self.pos - 1) % self.count
+
+ def down(self):
+ if self.pos < (self.count - 1) or self.enableWrapAround:
+ self.pos = (self.pos + 1) % self.count
+
+ def getCurrent(self):
+ return self.bouquets[self.pos]
+
# csel.bouquet_mark_edit values
OFF = 0
EDIT_BOUQUET = 1
self.servicelist.moveToChar(charstr[0])
def keyAsciiCode(self):
- unichar = unichr(getPrevAsciiCode())
+ #unichar = unichr(getPrevAsciiCode())
+ from Components.config import getCharValue
+ unichar = getCharValue(getPrevAsciiCode())
+ if unichar is None:
+ return
+ if len(str(unichar)) > 1:
+ return
charstr = unichar.encode("utf-8")
if len(charstr) == 1:
self.servicelist.moveToChar(charstr[0])