From e8205c4095f14fb05b1a4ff3192baf96734d6df2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 8 Jan 2011 14:31:47 +0000 Subject: [PATCH] neutrino parental_setup: remember last selected item git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1000 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4b00228c11eb6921e5b1c23350234313a74f4640 Author: Thilo Graf Date: 2011-01-08 (Sat, 08 Jan 2011) Origin message was: ------------------ *neutrino parental_setup: remember last selected item git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1000 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/parentallock_setup.cpp | 3 +++ src/gui/parentallock_setup.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/parentallock_setup.cpp b/src/gui/parentallock_setup.cpp index e01b4fd46..1794ba653 100644 --- a/src/gui/parentallock_setup.cpp +++ b/src/gui/parentallock_setup.cpp @@ -55,6 +55,7 @@ CParentalSetup::CParentalSetup() hheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); mheight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getHeight(); height = hheight+13*mheight+ 10; + selected = -1; x = getScreenStartX (width); y = getScreenStartY (height); } @@ -113,6 +114,7 @@ void CParentalSetup::showParentalSetup() { //menue init CMenuWidget* plock = new CMenuWidget(LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_LOCK, width); + plock->setSelected(selected); //subhead plock->addItem( new CMenuSeparator(CMenuSeparator::ALIGN_LEFT | CMenuSeparator::SUB_HEAD | CMenuSeparator::STRING, LOCALE_PARENTALLOCK_PARENTALLOCK)); @@ -129,5 +131,6 @@ void CParentalSetup::showParentalSetup() plock->exec(NULL, ""); plock->hide(); + selected = plock->getSelected(); delete plock; } diff --git a/src/gui/parentallock_setup.h b/src/gui/parentallock_setup.h index 60e71d738..021c1cd26 100644 --- a/src/gui/parentallock_setup.h +++ b/src/gui/parentallock_setup.h @@ -42,7 +42,7 @@ class CParentalSetup : public CMenuTarget private: CFrameBuffer *frameBuffer; - int x, y, width, height, hheight, mheight; + int x, y, width, height, hheight, mheight, selected; void hide(); void showParentalSetup();