mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Show result message after installing / upgrading plugin with the browser
CURA-3856
This commit is contained in:
parent
867dd04681
commit
37162683e5
1 changed files with 7 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue