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:
parent
85d12931ce
commit
4b7344c1ea
@ -111,12 +111,12 @@ void AddonsLoading::beforeAddingWidgets()
|
|||||||
|
|
||||||
if (m_addon.isInstalled())
|
if (m_addon.isInstalled())
|
||||||
{
|
{
|
||||||
/* only keep the button as "update" if allowed to access the net
|
/* Turn "Install" button into "Update" if allowed to access the internet
|
||||||
* and not in error state
|
* and not in an errored state
|
||||||
*/
|
*/
|
||||||
if (m_addon.needsUpdate() && !addons_manager->wasError()
|
if (m_addon.needsUpdate() && !addons_manager->wasError()
|
||||||
&& UserConfigParams::m_internet_status==RequestManager::IPERM_ALLOWED)
|
&& UserConfigParams::m_internet_status==RequestManager::IPERM_ALLOWED)
|
||||||
getWidget<IconButtonWidget> ("install")->setLabel( _("Update") );
|
getWidget<IconButtonWidget> ("install")->setText( _("Update") );
|
||||||
else
|
else
|
||||||
r->removeChildNamed("install");
|
r->removeChildNamed("install");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user