mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 04:29:01 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
c57fa72e3b
@ -260,6 +260,32 @@ UM.MainWindow
|
|||||||
{
|
{
|
||||||
if (drop.urls.length > 0)
|
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);
|
openDialog.handleOpenFileUrls(drop.urls);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -687,6 +713,14 @@ UM.MainWindow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MessageDialog
|
||||||
|
{
|
||||||
|
id: pluginInstallDialog
|
||||||
|
title: catalog.i18nc("@window:title", "Install Plugin");
|
||||||
|
standardButtons: StandardButton.Ok
|
||||||
|
modality: Qt.ApplicationModal
|
||||||
|
}
|
||||||
|
|
||||||
MessageDialog {
|
MessageDialog {
|
||||||
id: infoMultipleFilesWithGcodeDialog
|
id: infoMultipleFilesWithGcodeDialog
|
||||||
title: catalog.i18nc("@title:window", "Open File(s)")
|
title: catalog.i18nc("@title:window", "Open File(s)")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user