mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-28 06:33:16 +08:00
Show result message after installing / upgrading plugin with the browser
CURA-3856
This commit is contained in:
parent
867dd04681
commit
37162683e5
@ -100,13 +100,14 @@ class PluginBrowser(QObject, Extension):
|
||||
self._download_plugin_reply.downloadProgress.disconnect(self._onDownloadPluginProgress)
|
||||
self._temp_plugin_file = tempfile.NamedTemporaryFile(suffix = ".curaplugin")
|
||||
self._temp_plugin_file.write(self._download_plugin_reply.readAll())
|
||||
|
||||
result = PluginRegistry.getInstance().installPlugin("file://" + self._temp_plugin_file.name)
|
||||
if result["status"] == "ok":
|
||||
self._newly_installed_plugin_ids.append(result["id"])
|
||||
self.pluginsMetadataChanged.emit()
|
||||
else:
|
||||
# TODO; Handle cases where, for some reason, we could not install the plugin
|
||||
pass
|
||||
|
||||
self._newly_installed_plugin_ids.append(result["id"])
|
||||
self.pluginsMetadataChanged.emit()
|
||||
|
||||
Application.getInstance().messageBox(i18n_catalog.i18nc("@window:title", "Plugin browser"), result["message"])
|
||||
|
||||
self._temp_plugin_file.close() # Plugin was installed, delete temp file
|
||||
|
||||
@pyqtProperty(int, notify = onDownloadProgressChanged)
|
||||
|
Loading…
x
Reference in New Issue
Block a user