aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-13 15:27:32 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2005-12-13 15:27:32 +0000
commit83dc65144ec5b7d412f959afd2abb947580f7121 (patch)
treebbff84f2cb7df7924f6e5f37980e76c547ec1a6d
parentd545fceb99fa32b01ee131cf7867eb5e21702edb (diff)
downloadenigma2-83dc65144ec5b7d412f959afd2abb947580f7121.tar.gz
enigma2-83dc65144ec5b7d412f959afd2abb947580f7121.zip
add option cursorHome to eListbox::entryReset
-rw-r--r--lib/gui/elistbox.cpp13
-rw-r--r--lib/gui/elistbox.h2
-rw-r--r--lib/gui/elistboxcontent.cpp4
3 files changed, 11 insertions, 8 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp
index ccd13ff4..013a3103 100644
--- a/lib/gui/elistbox.cpp
+++ b/lib/gui/elistbox.cpp
@@ -333,14 +333,17 @@ void eListbox::entryChanged(int index)
}
}
-void eListbox::entryReset()
+void eListbox::entryReset(bool cursorHome)
{
m_content_changed=true;
m_prev_scrollbar_page=-1;
- if (m_content)
- m_content->cursorHome();
- m_top = 0;
- m_selected = 0;
+ if ( cursorHome )
+ {
+ if (m_content)
+ m_content->cursorHome();
+ m_top = 0;
+ m_selected = 0;
+ }
moveSelection(justCheck);
invalidate();
}
diff --git a/lib/gui/elistbox.h b/lib/gui/elistbox.h
index 08f80035..0e185b44 100644
--- a/lib/gui/elistbox.h
+++ b/lib/gui/elistbox.h
@@ -97,7 +97,7 @@ public:
/* entryChanged: the entry with the given index was changed and should be redrawn. */
void entryChanged(int index);
/* the complete list changed. you should not attemp to keep the current index. */
- void entryReset();
+ void entryReset(bool cursorHome=true);
protected:
int event(int event, void *data=0, void *data2=0);
diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp
index dea72a6c..95d92e09 100644
--- a/lib/gui/elistboxcontent.cpp
+++ b/lib/gui/elistboxcontent.cpp
@@ -246,7 +246,7 @@ void eListboxStringContent::setList(std::list<std::string> &list)
m_list = list;
m_size = list.size();
cursorHome();
- m_listbox->entryReset();
+ m_listbox->entryReset(false);
}
//////////////////////////////////////
@@ -368,7 +368,7 @@ void eListboxPythonStringContent::setList(PyObject *list)
}
if (m_listbox)
- m_listbox->entryReset();
+ m_listbox->entryReset(false);
}
PyObject *eListboxPythonStringContent::getCurrentSelection()