projects
/
vuplus_dvbapp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add count() to List source
[vuplus_dvbapp]
/
lib
/
python
/
Components
/
Sources
/
List.py
diff --git
a/lib/python/Components/Sources/List.py
b/lib/python/Components/Sources/List.py
index
6d083f0
..
71be080
100644
(file)
--- a/
lib/python/Components/Sources/List.py
+++ b/
lib/python/Components/Sources/List.py
@@
-1,5
+1,4
@@
from Source import Source
from Source import Source
-from Tools.Event import Event
from Components.Element import cached
class List(Source, object):
from Components.Element import cached
class List(Source, object):
@@
-27,11
+26,14
@@
to generate HTML."""
def entry_changed(self, index):
if not self.disable_callbacks:
self.downstream_elements.entry_changed(self, index)
def entry_changed(self, index):
if not self.disable_callbacks:
self.downstream_elements.entry_changed(self, index)
+
+ def count(self):
+ return len(self.__list)
def selectionChanged(self, index):
if self.disable_callbacks:
return
def selectionChanged(self, index):
if self.disable_callbacks:
return
-
+
for x in self.onSelectionChanged:
x()
for x in self.onSelectionChanged:
x()
@@
-50,7
+52,7
@@
to generate HTML."""
if self.master is not None:
return self.master.index
else:
if self.master is not None:
return self.master.index
else:
- return
-1
+ return
None
setCurrentIndex = setIndex
setCurrentIndex = setIndex