Skip to content

Commit

Permalink
[addons] fix control condition: always allow addons to be enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tamland committed Mar 29, 2016
1 parent 64dac62 commit e797f45
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions xbmc/addons/GUIDialogAddonInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,16 @@ void CGUIDialogAddonInfo::UpdateControls()
CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_INSTALL, canInstall || canUninstall);
SET_CONTROL_LABEL(CONTROL_BTN_INSTALL, isInstalled ? 24037 : 24038);

CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_ENABLE, canDisable);
SET_CONTROL_LABEL(CONTROL_BTN_ENABLE, m_addonEnabled ? 24021 : 24022);
if (m_addonEnabled)
{
SET_CONTROL_LABEL(CONTROL_BTN_ENABLE, 24021);
CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_ENABLE, canDisable);
}
else
{
SET_CONTROL_LABEL(CONTROL_BTN_ENABLE, 24022);
CONTROL_ENABLE(CONTROL_BTN_ENABLE);
}

CONTROL_ENABLE_ON_CONDITION(CONTROL_BTN_UPDATE, isInstalled);

Expand Down

0 comments on commit e797f45

Please sign in to comment.