mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
Return menu result, to close all menus
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1857 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -62,7 +62,6 @@ CThemes::CThemes()
|
|||||||
int CThemes::exec(CMenuTarget* parent, const std::string & actionKey)
|
int CThemes::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||||
{
|
{
|
||||||
int res = menu_return::RETURN_REPAINT;
|
int res = menu_return::RETURN_REPAINT;
|
||||||
|
|
||||||
|
|
||||||
if( !actionKey.empty() )
|
if( !actionKey.empty() )
|
||||||
{
|
{
|
||||||
@@ -94,8 +93,7 @@ int CThemes::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
if ( !hasThemeChanged )
|
if ( !hasThemeChanged )
|
||||||
rememberOldTheme( true );
|
rememberOldTheme( true );
|
||||||
|
|
||||||
Show();
|
return Show();
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CThemes::readThemes(CMenuWidget &themes)
|
void CThemes::readThemes(CMenuWidget &themes)
|
||||||
@@ -142,7 +140,7 @@ void CThemes::readThemes(CMenuWidget &themes)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CThemes::Show()
|
int CThemes::Show()
|
||||||
{
|
{
|
||||||
std::string file_name = "";
|
std::string file_name = "";
|
||||||
|
|
||||||
@@ -174,7 +172,7 @@ void CThemes::Show()
|
|||||||
printf("[neutrino theme] error accessing %s\n", USERDIR);
|
printf("[neutrino theme] error accessing %s\n", USERDIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
themes.exec(NULL, "");
|
int res = themes.exec(NULL, "");
|
||||||
themes.hide();
|
themes.hide();
|
||||||
|
|
||||||
if (file_name.length() > 1) {
|
if (file_name.length() > 1) {
|
||||||
@@ -187,6 +185,7 @@ void CThemes::Show()
|
|||||||
else
|
else
|
||||||
hasThemeChanged = false;
|
hasThemeChanged = false;
|
||||||
}
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CThemes::rememberOldTheme(bool remember)
|
void CThemes::rememberOldTheme(bool remember)
|
||||||
|
@@ -39,7 +39,7 @@ class CThemes : public CMenuTarget, CChangeObserver
|
|||||||
|
|
||||||
bool hasThemeChanged;
|
bool hasThemeChanged;
|
||||||
|
|
||||||
void Show();
|
int Show();
|
||||||
void readFile(char* themename);
|
void readFile(char* themename);
|
||||||
void saveFile(char* themename);
|
void saveFile(char* themename);
|
||||||
void readThemes(CMenuWidget &);
|
void readThemes(CMenuWidget &);
|
||||||
|
Reference in New Issue
Block a user