Permalink
Browse files

fixed: do not query the addon state when asking the guiinfomanager fo…

…r addon title and/or icon

This commit removes tons of useless queries made from the mainloop when using addon shortcuts on
the home screen. As the infomanager is asked for the icon or title only, it's not needed to check
whether the addon is enabled or disabled all the time.
  • Loading branch information...
1 parent 30e9f45 commit 5c104987deae67c9196a881b4e9723931e8352b7 @mkortstiege mkortstiege committed with Jun 17, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 xbmc/GUIInfoManager.cpp
@@ -2824,11 +2824,15 @@ CStdString CGUIInfoManager::GetMultiInfoLabel(const GUIInfo &info, int contextWi
else if (info.m_info == SYSTEM_ADDON_TITLE ||
info.m_info == SYSTEM_ADDON_ICON)
{
+ // This logic does not check/care whether an addon has been disabled/marked as broken,
+ // it simply retrieves it's name or icon that means if an addon is placed on the home screen it
+ // will stay there even if it's disabled/marked as broken. This might need to be changed/fixed
+ // in the future.
AddonPtr addon;
if (info.GetData2() == 0)
- CAddonMgr::Get().GetAddon(const_cast<CGUIInfoManager*>(this)->GetLabel(info.GetData1(), contextWindow),addon);
+ CAddonMgr::Get().GetAddon(const_cast<CGUIInfoManager*>(this)->GetLabel(info.GetData1(), contextWindow),addon,ADDON_UNKNOWN,false);
else
- CAddonMgr::Get().GetAddon(m_stringParameters[info.GetData1()],addon);
+ CAddonMgr::Get().GetAddon(m_stringParameters[info.GetData1()],addon,ADDON_UNKNOWN,false);
if (addon && info.m_info == SYSTEM_ADDON_TITLE)
return addon->Name();
if (addon && info.m_info == SYSTEM_ADDON_ICON)

0 comments on commit 5c10498

Please sign in to comment.