From 23abd1c6c29c1c731480330228a15d7a47fdf51e Mon Sep 17 00:00:00 2001 From: seife Date: Mon, 8 Feb 2010 20:47:43 +0000 Subject: [PATCH] neutrino: initialize CKeyValue() in constructor, not only on paint() git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@310 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/widget/keychooser.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/keychooser.cpp b/src/gui/widget/keychooser.cpp index b1ef8f11b..807a5c69a 100644 --- a/src/gui/widget/keychooser.cpp +++ b/src/gui/widget/keychooser.cpp @@ -49,9 +49,10 @@ class CKeyValue : public CMenuSeparator public: int keyvalue; - CKeyValue() : CMenuSeparator(CMenuSeparator::STRING, LOCALE_KEYCHOOSERMENU_CURRENTKEY) - { - }; + CKeyValue(int k) : CMenuSeparator(CMenuSeparator::STRING, LOCALE_KEYCHOOSERMENU_CURRENTKEY) + { + keyvalue = k; + }; virtual const char * getString(void) { @@ -71,7 +72,7 @@ CKeyChooser::CKeyChooser(int * const Key, const neutrino_locale_t title, const s keyChooser = new CKeyChooserItem(LOCALE_KEYCHOOSER_HEAD, key); keyDeleter = new CKeyChooserItemNoKey(key); - addItem(new CKeyValue()); + addItem(new CKeyValue(*key)); addItem(GenericMenuSeparatorLine); addItem(GenericMenuBack); addItem(GenericMenuSeparatorLine);