From c9a9710d0b8c31cddf99978cd5eab84c3968f2e7 Mon Sep 17 00:00:00 2001 From: seife Date: Sat, 26 Mar 2011 13:36:32 +0000 Subject: [PATCH] timerlist: restore display mode correctly on exit git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1340 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/timerlist.cpp | 4 ++++ src/gui/timerlist.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index bd1ee98f9..cf0be3b47 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -258,6 +258,8 @@ CTimerList::CTimerList() //buttonHeight = 7 + std::max(icol_h+2, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); buttonHeight = std::max(icol_h+4, g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()); + /* most probable default */ + saved_dispmode = (int)CVFD::MODE_TVRADIO; } CTimerList::~CTimerList() @@ -375,6 +377,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) } int ret = show(); + CVFD::getInstance()->setMode((CVFD::MODES)saved_dispmode); return ret; /* @@ -862,6 +865,7 @@ void CTimerList::paint() unsigned int page_nr = (listmaxshow == 0) ? 0 : (selected / listmaxshow); liststart = page_nr * listmaxshow; + saved_dispmode = (int)CVFD::getInstance()->getMode(); CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, g_Locale->getText(LOCALE_TIMERLIST_NAME)); paintHead(); diff --git a/src/gui/timerlist.h b/src/gui/timerlist.h index 037e043c0..3645a7483 100644 --- a/src/gui/timerlist.h +++ b/src/gui/timerlist.h @@ -80,6 +80,8 @@ class CTimerList : public CMenuTarget void hide(); int modifyTimer(); int newTimer(); + /* todo: properly import the enum CVFD::MODES */ + int saved_dispmode; public: CTimerList();