Current theme can be uninstalled (so we can upgrade it)

Only the default theme cannot be uninstalled.
This commit is contained in:
David Capello 2017-06-23 15:19:00 -03:00
parent 08c70cc6ab
commit 72c1f9b765
1 changed files with 4 additions and 3 deletions

View File

@ -241,14 +241,15 @@ void Extension::addDitheringMatrix(const std::string& id,
bool Extension::canBeDisabled() const
{
return (m_isEnabled &&
!isCurrentTheme() &&
!isDefaultTheme()); // Default theme cannot be disabled or uninstalled
//!isCurrentTheme() &&
!isDefaultTheme()); // Default theme cannot be disabled or uninstalled
}
bool Extension::canBeUninstalled() const
{
return (!m_isBuiltinExtension &&
!isCurrentTheme() &&
// We can uninstall the current theme (e.g. to upgrade it)
//!isCurrentTheme() &&
!isDefaultTheme());
}