From f26db77d13987851b7ea80bc82d029e5d0d9bc57 Mon Sep 17 00:00:00 2001 From: thilo Date: Fri, 6 May 2011 18:15:47 +0000 Subject: [PATCH] *neutrino menu classes: add member function resetWidget() git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1434 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/menue.cpp | 7 +++++++ src/gui/widget/menue.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 24df2797b..db4a984d8 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -370,6 +370,13 @@ void CMenuWidget::addItem(CMenuItem* menuItem, const bool defaultselected) items.push_back(menuItem); } +void CMenuWidget::resetWidget() +{ + items.clear(); + page_start.clear(); + selected=-1; +} + bool CMenuWidget::hasItem() { return !items.empty(); diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 629a3f814..92feee916 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -419,6 +419,7 @@ class CMenuWidget : public CMenuTarget }; virtual void addIntroItems(neutrino_locale_t subhead_text = NONEXISTANT_LOCALE, neutrino_locale_t section_text = NONEXISTANT_LOCALE, int buttontype = BTN_TYPE_BACK ); bool hasItem(); + void resetWidget(); virtual void paint(); virtual void hide(); virtual int exec(CMenuTarget* parent, const std::string & actionKey);