Let the user uninstall a plugin marked for update

This commit is contained in:
Laurent Monin
2018-09-25 11:12:39 +02:00
parent 4558ebaba4
commit ce48776f1d
2 changed files with 5 additions and 1 deletions

View File

@@ -381,6 +381,10 @@ class PluginManager(QtCore.QObject):
for filepath in filepaths:
log.debug("Removing file %r", filepath)
os.remove(filepath)
update = filepath + '.update'
if os.path.isfile(update):
log.debug("Removing file %r", update)
os.remove(update)
def install_plugin(self, path, action, overwrite_confirm=None, plugin_name=None,
plugin_data=None):

View File

@@ -402,7 +402,7 @@ class PluginsOptionsPage(OptionsPage):
button = QtWidgets.QPushButton(label)
button.setMaximumHeight(button.fontMetrics().boundingRect(label).height() + 7)
self.ui.plugins.setItemWidget(item, COLUMN_ACTION, button)
if item.is_uninstalled or item.marked_for_update:
if item.is_uninstalled:
button.setEnabled(False)
if bt_action == PLUGIN_ACTION_INSTALL: