gui/moviebrowser.cpp: save return status to check if all gui must be closed

This commit is contained in:
[CST] Focus
2012-11-16 15:37:38 +04:00
parent f02a95e04d
commit 36fa514bed
2 changed files with 12 additions and 1 deletions

View File

@@ -912,6 +912,7 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey)
int CMovieBrowser::exec(const char* path)
{
bool res = false;
menu_ret = menu_return::RETURN_REPAINT;
TRACE("[mb] start MovieBrowser\r\n");
int timeout = -1;
@@ -1034,10 +1035,18 @@ int CMovieBrowser::exec(const char* path)
else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites) {
//FIXME do nothing ?
}
else if ( msg == NeutrinoMessages::STANDBY_ON ||
msg == NeutrinoMessages::SHUTDOWN ||
msg == NeutrinoMessages::SLEEPTIMER)
{
menu_ret = menu_return::RETURN_EXIT_ALL;
loop = false;
g_RCInput->postMsg(msg, data);
}
else if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all)
{
TRACE("[mb]->exec: getInstance\r\n");
//res = menu_return::RETURN_EXIT_ALL;
menu_ret = menu_return::RETURN_EXIT_ALL;
loop = false;
}
}

View File

@@ -303,6 +303,7 @@ class CMovieBrowser : public CMenuTarget
std::string getScreenshotName(std::string movie);
//bool restart_mb_timeout;
int menu_ret;
public: // Functions //////////////////////////////////////////////////////////7
CMovieBrowser(const char* path); //P1
@@ -324,6 +325,7 @@ class CMovieBrowser : public CMenuTarget
bool delFile(CFile& file);
bool delFile_vlc(CFile& file);
bool delFile_std(CFile& file);
int getMenuRet() { return menu_ret; }
private: //Functions
///// MovieBrowser init ///////////////