diff options
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/FIFOList.py | 12 | ||||
| -rw-r--r-- | lib/python/Components/Makefile.am | 3 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/python/Components/FIFOList.py b/lib/python/Components/FIFOList.py new file mode 100644 index 00000000..16b51c89 --- /dev/null +++ b/lib/python/Components/FIFOList.py @@ -0,0 +1,12 @@ +from Components.MenuList import MenuList + +class FIFOList(MenuList): + def __init__(self, list = [ ], len = 10): + self.len = len + self.list = list + MenuList.__init__(self, self.list) + + def addItem(self, item): + self.list.append(item) + self.list = self.list[-self.len:] + self.l.setList(self.list) diff --git a/lib/python/Components/Makefile.am b/lib/python/Components/Makefile.am index 9826daab..fcb5f8fd 100644 --- a/lib/python/Components/Makefile.am +++ b/lib/python/Components/Makefile.am @@ -11,4 +11,5 @@ install_PYTHON = \ AVSwitch.py Network.py RFmod.py DiskInfo.py NimManager.py Lcd.py \ EpgList.py ScrollLabel.py Timezones.py Language.py HelpMenuList.py \ BlinkingPixmap.py Pixmap.py ConditionalWidget.py Slider.py LanguageList.py \ - PluginList.py PluginComponent.py RecordingConfig.py About.py UsageConfig.py + PluginList.py PluginComponent.py RecordingConfig.py About.py UsageConfig.py \ + FIFOList.py |
