UI/UX: Fix update button label bug

`setLabel()` does not work in `beforeAddingWidgets()`, use `setText()` instead as was originally used when the code was written.

This fixes a regression introduced in 0ace825d5f (almost exactly 10 years ago!)
This commit is contained in:
QwertyChouskie 2023-04-27 01:40:27 -07:00
parent 85d12931ce
commit 4b7344c1ea

View File

@ -111,12 +111,12 @@ void AddonsLoading::beforeAddingWidgets()
if (m_addon.isInstalled())
{
/* only keep the button as "update" if allowed to access the net
* and not in error state
/* Turn "Install" button into "Update" if allowed to access the internet
* and not in an errored state
*/
if (m_addon.needsUpdate() && !addons_manager->wasError()
&& UserConfigParams::m_internet_status==RequestManager::IPERM_ALLOWED)
getWidget<IconButtonWidget> ("install")->setLabel( _("Update") );
getWidget<IconButtonWidget> ("install")->setText( _("Update") );
else
r->removeChildNamed("install");
}