Replace UM.MessageDialog with newly added Cura.MessageDialog

This dialog is different from the `UM.MessageDialog` in that it

CURA-8688
This commit is contained in:
casper 2022-02-23 14:09:38 +01:00
parent e75993e7f3
commit e03176a1fa
10 changed files with 37 additions and 17 deletions

View file

@ -585,7 +585,7 @@ UM.MainWindow
}
}
UM.MessageDialog
Cura.MessageDialog
{
id: exitConfirmationDialog
title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName)
@ -743,14 +743,14 @@ UM.MainWindow
}
}
UM.MessageDialog
Cura.MessageDialog
{
id: packageInstallDialog
title: catalog.i18nc("@window:title", "Install Package")
standardButtons: StandardButton.Ok
}
UM.MessageDialog
Cura.MessageDialog
{
id: infoMultipleFilesWithGcodeDialog
title: catalog.i18nc("@title:window", "Open File(s)")

View file

@ -0,0 +1,20 @@
// Copyright (c) 2022 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import UM 1.5 as UM
import Cura 1.5 as Cura
// Wrapper around the UM.MessageBox with the primary/secondarybuttons
// set to Cura.PrimaryButton and Cura.SecondaryButton respectively
UM.MessageDialog
{
primaryButton: Cura.PrimaryButton
{
text: model.text
}
secondaryButton: Cura.TertiaryButton
{
text: model.text
}
}

View file

@ -55,7 +55,7 @@ Item
onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
}
UM.MessageDialog
Cura.MessageDialog
{
id: newProjectDialog

View file

@ -322,7 +322,7 @@ Item
onClicked: confirmationDialog.visible = true
}
UM.MessageDialog
Cura.MessageDialog
{
id: confirmationDialog

View file

@ -310,7 +310,7 @@ Item
}
// Dialogs
UM.MessageDialog
Cura.MessageDialog
{
id: confirmRemoveMaterialDialog
title: catalog.i18nc("@title:window", "Confirm Remove")
@ -337,7 +337,7 @@ Item
{
const result = Cura.ContainerManager.importMaterialContainer(fileUrl);
const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base);
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
messageDialog.standardButtons = Dialog.Ok;
messageDialog.title = catalog.i18nc("@title:window", "Import Material");
switch (result.status)
@ -365,7 +365,7 @@ Item
{
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl);
const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base);
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
messageDialog.title = catalog.i18nc("@title:window", "Export Material");
messageDialog.standardButtons = Dialog.Ok;
switch (result.status)

View file

@ -119,7 +119,7 @@ Item
width: base.width
property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height
UM.MessageDialog
Cura.MessageDialog
{
id: confirmDiameterChangeDialog

View file

@ -137,7 +137,7 @@ UM.ManagementPage
base.toActivateNewQuality = false;
}
}
UM.MessageDialog
Cura.MessageDialog
{
id: messageDialog
standardButtons: Dialog.Ok
@ -245,7 +245,7 @@ UM.ManagementPage
}
// Confirmation dialog for removing a profile
UM.MessageDialog
Cura.MessageDialog
{
id: confirmRemoveQualityDialog