Merge branch 'master' into feature-backup-manager

This commit is contained in:
ChrisTerBeke 2018-05-15 16:50:25 +02:00
commit d27ac3cf31
7 changed files with 47 additions and 35 deletions

View file

@ -14,9 +14,9 @@ Item
property var active: false
property var complete: false
property var readyLabel: "Install"
property var activeLabel: "Installing"
property var completeLabel: "Installed"
property var readyLabel: catalog.i18nc("@action:button", "Install")
property var activeLabel: catalog.i18nc("@action:button", "Cancel")
property var completeLabel: catalog.i18nc("@action:button", "Installed")
property var readyAction: null // Action when button is ready and clicked (likely install)
property var activeAction: null // Action when button is active and clicked (likely cancel)
@ -32,15 +32,15 @@ Item
{
if (complete)
{
return catalog.i18nc("@action:button", "Installed")
return completeLabel
}
else if (active)
{
return catalog.i18nc("@action:button", "Cancel")
return activeLabel
}
else
{
return catalog.i18nc("@action:button", "Install")
return readyLabel
}
}
onClicked:

View file

@ -250,7 +250,8 @@ class Toolbox(QObject, Extension):
if remote_package:
download_url = remote_package["download_url"]
Logger.log("d", "Updating package [%s]..." % plugin_id)
self.uninstall(plugin_id)
if self._package_manager.isUserInstalledPackage(plugin_id):
self.uninstall(plugin_id)
self.startDownload(download_url)
else:
Logger.log("e", "Could not update package [%s] because there is no remote package info available.", plugin_id)