Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #3287 from Montellese/skin_change

fix crash/freeze when changing skin after installing a new skin addon
  • Loading branch information...
commit 6510dfaf589c643d7c38e325a5253384497950b0 2 parents c23ec59 + 27aecf9
@MartijnKaijser MartijnKaijser authored
Showing with 5 additions and 7 deletions.
  1. +4 −5 xbmc/Application.cpp
  2. +1 −2  xbmc/addons/AddonInstaller.cpp
View
9 xbmc/Application.cpp
@@ -1567,7 +1567,7 @@ void CApplication::OnSettingChanged(const CSetting *setting)
if (settingId == "lookandfeel.skin" ||
settingId == "lookandfeel.font" ||
settingId == "lookandfeel.skincolors")
- ReloadSkin();
+ CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin");
else if (settingId == "lookandfeel.skintheme")
{
// also set the default color theme
@@ -1582,7 +1582,7 @@ void CApplication::OnSettingChanged(const CSetting *setting)
if (!StringUtils::EqualsNoCase(colorTheme, CSettings::Get().GetString("lookandfeel.skincolors")))
CSettings::Get().SetString("lookandfeel.skincolors", colorTheme);
else
- ReloadSkin();
+ CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin");
}
else if (settingId == "lookandfeel.skinzoom")
g_windowManager.SendMessage(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_WINDOW_RESIZE);
@@ -1768,7 +1768,7 @@ void CApplication::LoadSkin(const SkinPtr& skin)
if (!skin)
{
CLog::Log(LOGERROR, "failed to load requested skin, fallback to \"%s\" skin", defaultSkin.c_str());
- CSettings::Get().SetString("lookandfeel.skin", defaultSkin);
+ CSettings::Get().GetSetting("lookandfeel.skin")->Reset();
return ;
}
@@ -1780,8 +1780,7 @@ void CApplication::LoadSkin(const SkinPtr& skin)
if (strcmpi(skin->ID().c_str(), defaultSkin.c_str()) != 0)
{
CLog::Log(LOGERROR, "home.xml doesn't exist in skin: %s, fallback to \"%s\" skin", skin->ID().c_str(), defaultSkin.c_str());
- CSettings::Get().SetString("lookandfeel.skin", defaultSkin);
- LoadSkin(defaultSkin);
+ CSettings::Get().GetSetting("lookandfeel.skin")->Reset();
CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Error, g_localizeStrings.Get(24102), g_localizeStrings.Get(24103));
return ;
}
View
3  xbmc/addons/AddonInstaller.cpp
@@ -698,14 +698,13 @@ void CAddonInstallJob::OnPostInstall(bool reloadAddon)
if (reloadAddon || (!m_update && CGUIDialogYesNo::ShowAndGetInput(m_addon->Name(),
g_localizeStrings.Get(24099),"","")))
{
- CSettings::Get().SetString("lookandfeel.skin",m_addon->ID().c_str());
CGUIDialogKaiToast *toast = (CGUIDialogKaiToast *)g_windowManager.GetWindow(WINDOW_DIALOG_KAI_TOAST);
if (toast)
{
toast->ResetTimer();
toast->Close(true);
}
- CApplicationMessenger::Get().ExecBuiltIn("ReloadSkin");
+ CSettings::Get().SetString("lookandfeel.skin",m_addon->ID().c_str());
}
}

0 comments on commit 6510dfa

Please sign in to comment.
Something went wrong with that request. Please try again.