aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Amland <thomas.amland@gmail.com>2016-08-28 14:05:22 +0200
committerThomas Amland <thomas.amland@gmail.com>2016-09-13 19:50:40 +0200
commitca282f2b01b6bc59b1f0a0fbf9d9732f85bd6cf4 (patch)
treeeae2b2115fbf4860887ce6be7f4e5c0ca10fcaeb
parent89e4521704c944a5924dbeafcd43991c0b0b4486 (diff)
invert m_skinReverting bool so it can be used for other things
-rw-r--r--xbmc/Application.cpp14
-rw-r--r--xbmc/Application.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index a0edd03973..637f62d30f 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -280,7 +280,7 @@ CApplication::CApplication(void)
m_nextPlaylistItem = -1;
m_bPlaybackStarting = false;
m_ePlayState = PLAY_STATE_NONE;
- m_skinReverting = false;
+ m_confirmSkinChange = true;
#ifdef HAS_GLX
XInitThreads();
@@ -1410,7 +1410,7 @@ void CApplication::OnSettingChanged(const CSetting *setting)
{
// now we can finally reload skins
std::string builtin("ReloadSkin");
- if (settingId == CSettings::SETTING_LOOKANDFEEL_SKIN && !m_skinReverting)
+ if (settingId == CSettings::SETTING_LOOKANDFEEL_SKIN && m_confirmSkinChange)
builtin += "(confirm)";
CApplicationMessenger::GetInstance().PostMsg(TMSG_EXECUTE_BUILT_IN, -1, -1, nullptr, builtin);
}
@@ -1563,14 +1563,14 @@ void CApplication::ReloadSkin(bool confirm/*=false*/)
std::string newSkin = CSettings::GetInstance().GetString(CSettings::SETTING_LOOKANDFEEL_SKIN);
if (LoadSkin(newSkin))
{
- /* The Reset() or SetString() below will cause recursion, so the m_skinReverting boolean is set so as to not prompt the
+ /* The Reset() or SetString() below will cause recursion, so the m_confirmSkinChange boolean is set so as to not prompt the
user as to whether they want to keep the current skin. */
- if (confirm && !m_skinReverting)
+ if (confirm && m_confirmSkinChange)
{
if (HELPERS::ShowYesNoDialogText(CVariant{13123}, CVariant{13111}, CVariant{""}, CVariant{""}, 10000) !=
DialogResponse::YES)
{
- m_skinReverting = true;
+ m_confirmSkinChange = false;
CSettings::GetInstance().SetString(CSettings::SETTING_LOOKANDFEEL_SKIN, oldSkin);
}
}
@@ -1581,12 +1581,12 @@ void CApplication::ReloadSkin(bool confirm/*=false*/)
std::string defaultSkin = ((CSettingString*)CSettings::GetInstance().GetSetting(CSettings::SETTING_LOOKANDFEEL_SKIN))->GetDefault();
if (newSkin != defaultSkin)
{
- m_skinReverting = true;
+ m_confirmSkinChange = false;
CSettings::GetInstance().GetSetting(CSettings::SETTING_LOOKANDFEEL_SKIN)->Reset();
CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Error, g_localizeStrings.Get(24102), g_localizeStrings.Get(24103));
}
}
- m_skinReverting = false;
+ m_confirmSkinChange = true;
}
bool CApplication::Load(const TiXmlNode *settings)
diff --git a/xbmc/Application.h b/xbmc/Application.h
index 07bdd80710..c76a6df596 100644
--- a/xbmc/Application.h
+++ b/xbmc/Application.h
@@ -424,7 +424,7 @@ protected:
*/
bool NotifyActionListeners(const CAction &action) const;
- bool m_skinReverting;
+ bool m_confirmSkinChange;
std::string m_skinReloadSettingIgnore;
bool m_saveSkinOnUnloading;