aboutsummaryrefslogtreecommitdiff
path: root/lib/gui/elistbox.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-02-27 02:20:31 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-02-27 02:20:31 +0000
commitdba614edd2aad3c17e244914eaef3809d8300cb1 (patch)
tree382782ddff50bf88e421d933b13e35b9e5682cff /lib/gui/elistbox.cpp
parent1cdf6cb021fcaa6548b90ba7b6765cf1e8b8b37b (diff)
downloadenigma2-dba614edd2aad3c17e244914eaef3809d8300cb1.tar.gz
enigma2-dba614edd2aad3c17e244914eaef3809d8300cb1.zip
- hopefully fixed some python/refcount stuff (__deref__ is still evil!)
- first work on skin support, not really far - improved infobar - deletes components when destroying screens - fixed elistbox and component - add ability to change bouqet - real query parser still unfinished
Diffstat (limited to 'lib/gui/elistbox.cpp')
-rw-r--r--lib/gui/elistbox.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp
index 1dae137f..a3fae34c 100644
--- a/lib/gui/elistbox.cpp
+++ b/lib/gui/elistbox.cpp
@@ -22,11 +22,17 @@ eListbox::~eListbox()
void eListbox::setContent(iListboxContent *content)
{
m_content = content;
+ if (content)
+ m_content->setListbox(this);
entryReset();
}
void eListbox::moveSelection(int dir)
{
+ /* refuse to do anything without a valid list. */
+ if (!m_content)
+ return;
+
/* we need the old top/sel to see what we have to redraw */
int oldtop = m_top;
int oldsel = m_selected;
@@ -98,6 +104,8 @@ int eListbox::event(int event, void *data, void *data2)
{
ePtr<eWindowStyle> style;
+ if (!m_content)
+ return eWidget::event(event, data, data2);
assert(m_content);
recalcSize(); // move to event
@@ -183,9 +191,10 @@ void eListbox::entryChanged(int index)
void eListbox::entryReset()
{
- invalidate();
if (m_content)
m_content->cursorHome();
m_top = 0;
m_selected = 0;
+ invalidate();
+ eDebug("inval!");
}