mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 22:05:59 +08:00
Change easy dialogs to UM.MessageDialog
A few fields have changed. There's also a harder one, a generic one that is re-usable. I want to do that one in a separate commit since it'll need to be checked all over the code for its usage. Contributes to issue CURA-8687.
This commit is contained in:
parent
b18582e1fb
commit
9a3cab1ec2
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2021 Ultimaker B.V.
|
// Copyright (c) 2022 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
@ -253,7 +253,6 @@ UM.MainWindow
|
|||||||
// Try to install plugin & close.
|
// Try to install plugin & close.
|
||||||
CuraApplication.installPackageViaDragAndDrop(filename);
|
CuraApplication.installPackageViaDragAndDrop(filename);
|
||||||
packageInstallDialog.text = catalog.i18nc("@label", "This package will be installed after restarting.");
|
packageInstallDialog.text = catalog.i18nc("@label", "This package will be installed after restarting.");
|
||||||
packageInstallDialog.icon = StandardIcon.Information;
|
|
||||||
packageInstallDialog.open();
|
packageInstallDialog.open();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -586,18 +585,15 @@ UM.MainWindow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog
|
UM.MessageDialog
|
||||||
{
|
{
|
||||||
id: exitConfirmationDialog
|
id: exitConfirmationDialog
|
||||||
title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName)
|
title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName)
|
||||||
text: catalog.i18nc("@label %1 is the application name", "Are you sure you want to exit %1?").arg(CuraApplication.applicationDisplayName)
|
text: catalog.i18nc("@label %1 is the application name", "Are you sure you want to exit %1?").arg(CuraApplication.applicationDisplayName)
|
||||||
icon: StandardIcon.Question
|
standardButtons: Dialog.Yes | Dialog.No
|
||||||
modality: Qt.ApplicationModal
|
onAccepted: CuraApplication.callConfirmExitDialogCallback(true)
|
||||||
standardButtons: StandardButton.Yes | StandardButton.No
|
|
||||||
onYes: CuraApplication.callConfirmExitDialogCallback(true)
|
|
||||||
onNo: CuraApplication.callConfirmExitDialogCallback(false)
|
|
||||||
onRejected: CuraApplication.callConfirmExitDialogCallback(false)
|
onRejected: CuraApplication.callConfirmExitDialogCallback(false)
|
||||||
onVisibilityChanged:
|
onClosed:
|
||||||
{
|
{
|
||||||
if (!visible)
|
if (!visible)
|
||||||
{
|
{
|
||||||
@ -747,20 +743,18 @@ UM.MainWindow
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog
|
UM.MessageDialog
|
||||||
{
|
{
|
||||||
id: packageInstallDialog
|
id: packageInstallDialog
|
||||||
title: catalog.i18nc("@window:title", "Install Package");
|
title: catalog.i18nc("@window:title", "Install Package");
|
||||||
standardButtons: StandardButton.Ok
|
standardButtons: StandardButton.Ok
|
||||||
modality: Qt.ApplicationModal
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog
|
UM.MessageDialog
|
||||||
{
|
{
|
||||||
id: infoMultipleFilesWithGcodeDialog
|
id: infoMultipleFilesWithGcodeDialog
|
||||||
title: catalog.i18nc("@title:window", "Open File(s)")
|
title: catalog.i18nc("@title:window", "Open File(s)")
|
||||||
icon: StandardIcon.Information
|
standardButtons: Dialog.Ok
|
||||||
standardButtons: StandardButton.Ok
|
|
||||||
text: catalog.i18nc("@text:window", "We have found one or more G-Code files within the files you have selected. You can only open one G-Code file at a time. If you want to open a G-Code file, please just select only one.")
|
text: catalog.i18nc("@text:window", "We have found one or more G-Code files within the files you have selected. You can only open one G-Code file at a time. If you want to open a G-Code file, please just select only one.")
|
||||||
|
|
||||||
property var selectedMultipleFiles
|
property var selectedMultipleFiles
|
||||||
|
Loading…
x
Reference in New Issue
Block a user