WIP: Make CuraPackageManager aggregate PluginRegistry data

CURA-4644
This commit is contained in:
Lipu Fei 2018-04-12 15:19:18 +02:00
parent f510603cb5
commit 0f966115e6
5 changed files with 83 additions and 53 deletions

View file

@ -322,31 +322,6 @@ UM.MainWindow
{
if (drop.urls.length > 0)
{
// As the drop area also supports plugins, first check if it's a plugin that was dropped.
if (drop.urls.length == 1)
{
if (PluginRegistry.isPluginFile(drop.urls[0]))
{
// Try to install plugin & close.
var result = PluginRegistry.installPlugin(drop.urls[0]);
pluginInstallDialog.text = result.message;
if (result.status == "ok")
{
pluginInstallDialog.icon = StandardIcon.Information;
}
else if (result.status == "duplicate")
{
pluginInstallDialog.icon = StandardIcon.Warning;
}
else
{
pluginInstallDialog.icon = StandardIcon.Critical;
}
pluginInstallDialog.open();
return;
}
}
openDialog.handleOpenFileUrls(drop.urls);
}
}
@ -813,14 +788,6 @@ UM.MainWindow
}
}
MessageDialog
{
id: pluginInstallDialog
title: catalog.i18nc("@window:title", "Install Plugin");
standardButtons: StandardButton.Ok
modality: Qt.ApplicationModal
}
MessageDialog {
id: infoMultipleFilesWithGcodeDialog
title: catalog.i18nc("@title:window", "Open File(s)")