Update messages to use the message_types

CURA-8418
This commit is contained in:
Jaime van Kessel 2021-07-27 11:54:43 +02:00
parent f11079adcf
commit 900db57f0f
No known key found for this signature in database
GPG key ID: 3710727397403C91
23 changed files with 81 additions and 39 deletions

View file

@ -1798,8 +1798,9 @@ class CuraApplication(QtApplication):
if extension in self._non_sliceable_extensions:
message = Message(
self._i18n_catalog.i18nc("@info:status",
"Only one G-code file can be loaded at a time. Skipped importing {0}",
filename), title = self._i18n_catalog.i18nc("@info:title", "Warning"))
"Only one G-code file can be loaded at a time. Skipped importing {0}", filename),
title = self._i18n_catalog.i18nc("@info:title", "Warning"),
message_type = Message.MessageType.WARNING)
message.show()
return
# If file being loaded is non-slicable file, then prevent loading of any other files
@ -1808,8 +1809,9 @@ class CuraApplication(QtApplication):
if extension in self._non_sliceable_extensions:
message = Message(
self._i18n_catalog.i18nc("@info:status",
"Can't open any other file if G-code is loading. Skipped importing {0}",
filename), title = self._i18n_catalog.i18nc("@info:title", "Error"))
"Can't open any other file if G-code is loading. Skipped importing {0}", filename),
title = self._i18n_catalog.i18nc("@info:title", "Error"),
message_type = Message.MessageType.ERROR)
message.show()
return