From 1f39eaa7486bc6a7bb34438f5e1410a784e21a4c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 11 Apr 2018 23:58:15 +0200 Subject: [PATCH] themes: add setting entry for theme name Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/06bd3519d82353f75e6a0fdd341ebf9eed128382 Author: Thilo Graf Date: 2018-04-11 (Wed, 11 Apr 2018) --- src/gui/themes.cpp | 1 + src/neutrino.cpp | 2 ++ src/system/settings.h | 1 + 3 files changed, 4 insertions(+) diff --git a/src/gui/themes.cpp b/src/gui/themes.cpp index 61ee07896..a58a5afe8 100644 --- a/src/gui/themes.cpp +++ b/src/gui/themes.cpp @@ -84,6 +84,7 @@ int CThemes::exec(CMenuTarget* parent, const std::string & actionKey) } else readFile(((std::string)THEMESDIR + "/" + themeFile + FILE_PREFIX).c_str()); + g_settings.theme_name = themeFile; } return res; } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index f6574ad21..2803d8a91 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -364,6 +364,7 @@ int CNeutrinoApp::loadSetup(const char * fname) //theme/color options CThemes::getTheme(configfile); + g_settings.theme_name = configfile.getString("theme_name",""); //NI g_settings.inetradio_autostart = configfile.getInt32("inetradio_autostart" , 0); @@ -1233,6 +1234,7 @@ void CNeutrinoApp::saveSetup(const char * fname) } //theme/color options + configfile.getString( "theme_name",g_settings.theme_name ); CThemes::setTheme(configfile); //NI diff --git a/src/system/settings.h b/src/system/settings.h index bbceeb71a..44ad89560 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -461,6 +461,7 @@ struct SNeutrinoSettings //theme/color options SNeutrinoTheme theme; + std::string theme_name; bool osd_colorsettings_advanced_mode; //network