From 49bd249819924f0cf1f0881c646fc01fd102f6f9 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 13 Jul 2018 11:09:58 +0200 Subject: [PATCH 1/2] Update text for USB printing exit confirmation CURA-5384 --- plugins/USBPrinting/USBPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index ddb215d882..109888a15d 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -100,7 +100,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): return application.setConfirmExitDialogCallback(self._onConfirmExitDialogResult) - application.showConfirmExitDialog.emit("USB printing is in progress") + application.showConfirmExitDialog.emit(catalog.i18nc("@label", "A USB print is in progress, closing Cura will stop this print. Are you sure?")) def _onConfirmExitDialogResult(self, result: bool) -> None: if result: From 6d34d77b6b2a888d03584b2b68f130af70660815 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 13 Jul 2018 11:10:38 +0200 Subject: [PATCH 2/2] Reset confirm exit dialog text upon close CURA-5384 --- resources/qml/Cura.qml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 2ad0c75cbe..61d2c9f655 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -720,6 +720,14 @@ UM.MainWindow onYes: CuraApplication.callConfirmExitDialogCallback(true) onNo: CuraApplication.callConfirmExitDialogCallback(false) onRejected: CuraApplication.callConfirmExitDialogCallback(false) + onVisibilityChanged: + { + if (!visible) + { + // reset the text to default because other modules may change the message text. + text = catalog.i18nc("@label", "Are you sure you want to exit Cura?"); + } + } } Connections