From 204019702dc429a9f63b27a724c19d4f03cbfd52 Mon Sep 17 00:00:00 2001 From: alekseisasin Date: Wed, 13 Sep 2017 13:58:08 +0200 Subject: [PATCH] Added Title for messages CURA-4203 --- cura/ArrangeObjectsJob.py | 9 ++++-- cura/BuildVolume.py | 2 +- cura/CuraApplication.py | 4 +-- cura/MultiplyObjectsJob.py | 4 +-- cura/Settings/CuraContainerRegistry.py | 11 ++++++-- cura/Settings/MachineManager.py | 3 +- cura/Settings/MaterialManager.py | 2 +- .../CuraEngineBackend/CuraEngineBackend.py | 11 +++++--- .../ProcessSlicedLayersJob.py | 2 +- plugins/GCodeReader/GCodeReader.py | 9 ++++-- plugins/LayerView/LayerView.py | 3 +- plugins/PluginBrowser/PluginBrowser.py | 3 +- .../RemovableDriveOutputDevice.py | 15 +++++----- plugins/SliceInfoPlugin/SliceInfo.py | 6 +++- .../NetworkPrinterOutputDevice.py | 28 +++++++++++-------- plugins/USBPrinting/USBPrinterOutputDevice.py | 6 ++-- .../USBPrinterOutputDeviceManager.py | 4 +-- 17 files changed, 76 insertions(+), 46 deletions(-) diff --git a/cura/ArrangeObjectsJob.py b/cura/ArrangeObjectsJob.py index 3158fcc887..8a3bb2daa8 100755 --- a/cura/ArrangeObjectsJob.py +++ b/cura/ArrangeObjectsJob.py @@ -27,7 +27,11 @@ class ArrangeObjectsJob(Job): self._min_offset = min_offset def run(self): - status_message = Message(i18n_catalog.i18nc("@info:status", "Finding new location for objects"), lifetime = 0, dismissable=False, progress = 0) + status_message = Message(i18n_catalog.i18nc("@info:status", "Finding new location for objects"), + lifetime = 0, + dismissable=False, + progress = 0, + title = i18n_catalog.i18nc("@info:title", "Finding Location")) status_message.show() arranger = Arrange.create(fixed_nodes = self._fixed_nodes) @@ -82,5 +86,6 @@ class ArrangeObjectsJob(Job): status_message.hide() if not found_solution_for_all: - no_full_solution_message = Message(i18n_catalog.i18nc("@info:status", "Unable to find a location within the build volume for all objects")) + no_full_solution_message = Message(i18n_catalog.i18nc("@info:status", "Unable to find a location within the build volume for all objects"), + title = i18n_catalog.i18nc("@info:title", "Can't Find Location")) no_full_solution_message.show() diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index 62a8b8be4d..1c9a0708fd 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -99,7 +99,7 @@ class BuildVolume(SceneNode): self._build_volume_message = Message(catalog.i18nc("@info:status", "The build volume height has been reduced due to the value of the" " \"Print Sequence\" setting to prevent the gantry from colliding" - " with printed models.")) + " with printed models."), title = catalog.i18nc("@info:title","Build Volume")) # Must be after setting _build_volume_message, apparently that is used in getMachineManager. # activeQualityChanged is always emitted after setActiveVariant, setActiveMaterial and setActiveQuality. diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 021f20fa82..0b01c72574 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1293,7 +1293,7 @@ class CuraApplication(QtApplication): message = Message( self._i18n_catalog.i18nc("@info:status", "Only one G-code file can be loaded at a time. Skipped importing {0}", - filename)) + filename), title = self._i18n_catalog.i18nc("@info:title", "Warning")) message.show() return # If file being loaded is non-slicable file, then prevent loading of any other files @@ -1302,7 +1302,7 @@ class CuraApplication(QtApplication): message = Message( self._i18n_catalog.i18nc("@info:status", "Can't open any other file if G-code is loading. Skipped importing {0}", - filename)) + filename), title = self._i18n_catalog.i18nc("@info:title", "Error")) message.show() return diff --git a/cura/MultiplyObjectsJob.py b/cura/MultiplyObjectsJob.py index a795e0bc10..c986439a5b 100644 --- a/cura/MultiplyObjectsJob.py +++ b/cura/MultiplyObjectsJob.py @@ -32,7 +32,7 @@ class MultiplyObjectsJob(Job): def run(self): status_message = Message(i18n_catalog.i18nc("@info:status", "Multiplying and placing objects"), lifetime=0, - dismissable=False, progress=0) + dismissable=False, progress=0, title = i18n_catalog.i18nc("@info:title", "Placing Object")) status_message.show() scene = Application.getInstance().getController().getScene() @@ -80,5 +80,5 @@ class MultiplyObjectsJob(Job): status_message.hide() if not found_solution_for_all: - no_full_solution_message = Message(i18n_catalog.i18nc("@info:status", "Unable to find a location within the build volume for all objects")) + no_full_solution_message = Message(i18n_catalog.i18nc("@info:status", "Unable to find a location within the build volume for all objects"), title = i18n_catalog.i18nc("@info:title", "Placing Object")) no_full_solution_message.show() diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py index c2422d909a..5b7f4199d8 100644 --- a/cura/Settings/CuraContainerRegistry.py +++ b/cura/Settings/CuraContainerRegistry.py @@ -140,15 +140,20 @@ class CuraContainerRegistry(ContainerRegistry): success = profile_writer.write(file_name, found_containers) except Exception as e: Logger.log("e", "Failed to export profile to %s: %s", file_name, str(e)) - m = Message(catalog.i18nc("@info:status Don't translate the XML tags or !", "Failed to export profile to {0}: {1}", file_name, str(e)), lifetime = 0) + m = Message(catalog.i18nc("@info:status Don't translate the XML tags or !", "Failed to export profile to {0}: {1}", file_name, str(e)), + lifetime = 0, + title = catalog.i18nc("@info:title", "Error")) m.show() return if not success: Logger.log("w", "Failed to export profile to %s: Writer plugin reported failure.", file_name) - m = Message(catalog.i18nc("@info:status Don't translate the XML tag !", "Failed to export profile to {0}: Writer plugin reported failure.", file_name), lifetime = 0) + m = Message(catalog.i18nc("@info:status Don't translate the XML tag !", "Failed to export profile to {0}: Writer plugin reported failure.", file_name), + lifetime = 0, + title = catalog.i18nc("@info:title", "Error")) m.show() return - m = Message(catalog.i18nc("@info:status Don't translate the XML tag !", "Exported profile to {0}", file_name)) + m = Message(catalog.i18nc("@info:status Don't translate the XML tag !", "Exported profile to {0}", file_name), + title = catalog.i18nc("@info:title", "Export Details")) m.show() ## Gets the plugin object matching the criteria diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 7f7593a9d5..4fb700e5ea 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -105,7 +105,8 @@ class MachineManager(QObject): self._auto_hotends_changed = {} self._material_incompatible_message = Message(catalog.i18nc("@info:status", - "The selected material is incompatible with the selected machine or configuration.")) + "The selected material is incompatible with the selected machine or configuration."), + title = catalog.i18nc("@info:title", "Incompatible Material")) globalContainerChanged = pyqtSignal() # Emitted whenever the global stack is changed (ie: when changing between printers, changing a global profile, but not when changing a value) activeMaterialChanged = pyqtSignal() diff --git a/cura/Settings/MaterialManager.py b/cura/Settings/MaterialManager.py index 5640d7af38..e2f91622c8 100644 --- a/cura/Settings/MaterialManager.py +++ b/cura/Settings/MaterialManager.py @@ -21,7 +21,7 @@ class MaterialManager(QObject): #Material diameter changed warning message. self._material_diameter_warning_message = Message(catalog.i18nc("@info:status Has a cancel button next to it.", - "The selected material diameter causes the material to become incompatible with the current printer.")) + "The selected material diameter causes the material to become incompatible with the current printer."), title = catalog.i18nc("@info:title", "Incompatible Material")) self._material_diameter_warning_message.addAction("Undo", catalog.i18nc("@action:button", "Undo"), None, catalog.i18nc("@action", "Undo changing the material diameter.")) self._material_diameter_warning_message.actionTriggered.connect(self._materialWarningMessageAction) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index d94c3be94f..ea1f8c39b4 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -278,7 +278,7 @@ class CuraEngineBackend(QObject, Backend): if job.getResult() == StartSliceJob.StartJobResult.MaterialIncompatible: if Application.getInstance().platformActivity: self._error_message = Message(catalog.i18nc("@info:status", - "The selected material is incompatible with the selected machine or configuration.")) + "The selected material is incompatible with the selected machine or configuration."), title = catalog.i18nc("@info:title", "Material Details")) self._error_message.show() self.backendStateChange.emit(BackendState.Error) else: @@ -305,7 +305,8 @@ class CuraEngineBackend(QObject, Backend): error_labels.add(definitions[0].label) error_labels = ", ".join(error_labels) - self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice with the current settings. The following settings have errors: {0}".format(error_labels))) + self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice with the current settings. The following settings have errors: {0}".format(error_labels)), + title = catalog.i18nc("@info:title", "Setting Details")) self._error_message.show() self.backendStateChange.emit(BackendState.Error) else: @@ -314,7 +315,8 @@ class CuraEngineBackend(QObject, Backend): if job.getResult() == StartSliceJob.StartJobResult.BuildPlateError: if Application.getInstance().platformActivity: - self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice because the prime tower or prime position(s) are invalid.")) + self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice because the prime tower or prime position(s) are invalid."), + title = catalog.i18nc("@info:title", "Invalid position")) self._error_message.show() self.backendStateChange.emit(BackendState.Error) else: @@ -322,7 +324,8 @@ class CuraEngineBackend(QObject, Backend): if job.getResult() == StartSliceJob.StartJobResult.NothingToSlice: if Application.getInstance().platformActivity: - self._error_message = Message(catalog.i18nc("@info:status", "Nothing to slice because none of the models fit the build volume. Please scale or rotate models to fit.")) + self._error_message = Message(catalog.i18nc("@info:status", "Nothing to slice because none of the models fit the build volume. Please scale or rotate models to fit."), + title = catalog.i18nc("@info:title", "Warning")) self._error_message.show() self.backendStateChange.emit(BackendState.Error) else: diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py index 1fe537622f..1fbe50873e 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py @@ -235,7 +235,7 @@ class ProcessSlicedLayersJob(Job): if self.isRunning(): if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView": if not self._progress: - self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0) + self._progress = Message(catalog.i18nc("@info:status", "Processing Layers"), 0, False, 0, catalog.i18nc("@info:title", "Information")) if self._progress.getProgress() != 100: self._progress.show() else: diff --git a/plugins/GCodeReader/GCodeReader.py b/plugins/GCodeReader/GCodeReader.py index c59e6dce72..115b802b4d 100755 --- a/plugins/GCodeReader/GCodeReader.py +++ b/plugins/GCodeReader/GCodeReader.py @@ -251,7 +251,10 @@ class GCodeReader(MeshReader): self._clearValues() - self._message = Message(catalog.i18nc("@info:status", "Parsing G-code"), lifetime=0) + self._message = Message(catalog.i18nc("@info:status", "Parsing G-code"), + lifetime=0, + title = catalog.i18nc("@info:title", "G-code Details")) + self._message.setProgress(0) self._message.show() @@ -362,7 +365,9 @@ class GCodeReader(MeshReader): if Preferences.getInstance().getValue("gcodereader/show_caution"): caution_message = Message(catalog.i18nc( "@info:generic", - "Make sure the g-code is suitable for your printer and printer configuration before sending the file to it. The g-code representation may not be accurate."), lifetime=0) + "Make sure the g-code is suitable for your printer and printer configuration before sending the file to it. The g-code representation may not be accurate."), + lifetime=0, + title = catalog.i18nc("@info:title", "G-code Details")) caution_message.show() # The "save/print" button's state is bound to the backend state. diff --git a/plugins/LayerView/LayerView.py b/plugins/LayerView/LayerView.py index 97a343bd33..f79bf5b929 100755 --- a/plugins/LayerView/LayerView.py +++ b/plugins/LayerView/LayerView.py @@ -90,7 +90,8 @@ class LayerView(View): self._only_show_top_layers = bool(Preferences.getInstance().getValue("view/only_show_top_layers")) self._compatibility_mode = True # for safety - self._wireprint_warning_message = Message(catalog.i18nc("@info:status", "Cura does not accurately display layers when Wire Printing is enabled")) + self._wireprint_warning_message = Message(catalog.i18nc("@info:status", "Cura does not accurately display layers when Wire Printing is enabled"), + title = catalog.i18nc("@info:title", "Layer View")) def _resetSettings(self): self._layer_view_type = 0 # 0 is material color, 1 is color by linetype, 2 is speed diff --git a/plugins/PluginBrowser/PluginBrowser.py b/plugins/PluginBrowser/PluginBrowser.py index b8db123a91..2d4a753014 100644 --- a/plugins/PluginBrowser/PluginBrowser.py +++ b/plugins/PluginBrowser/PluginBrowser.py @@ -161,7 +161,8 @@ class PluginBrowser(QObject, Extension): if plugin_id is None: msg = i18n_catalog.i18nc("@info:status", "Failed to get plugin ID from {0}", file_path) - self._progress_message = Message(msg, lifetime=0, dismissable=False) + msg_title = i18n_catalog.i18nc("@info:tile", "Warning") + self._progress_message = Message(msg, lifetime=0, dismissable=False, title = msg_title) return # find a potential license file diff --git a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py index 80b2a2a430..4b6a6e8071 100644 --- a/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py +++ b/plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py @@ -86,7 +86,7 @@ class RemovableDriveOutputDevice(OutputDevice): job.progress.connect(self._onProgress) job.finished.connect(self._onFinished) - message = Message(catalog.i18nc("@info:progress Don't translate the XML tags !", "Saving to Removable Drive {0}").format(self.getName()), 0, False, -1) + message = Message(catalog.i18nc("@info:progress Don't translate the XML tags !", "Saving to Removable Drive {0}").format(self.getName()), 0, False, -1, catalog.i18nc("@info:title", "Saving")) message.show() self.writeStarted.emit(self) @@ -128,9 +128,8 @@ class RemovableDriveOutputDevice(OutputDevice): self._stream = None except: Logger.logException("w", "An execption occured while trying to write to removable drive.") - message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(), - str( - job.getError()))) + message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(),str(job.getError())), + title = catalog.i18nc("@info:title", "Error")) message.show() self.writeError.emit(self) return @@ -138,13 +137,13 @@ class RemovableDriveOutputDevice(OutputDevice): self._writing = False self.writeFinished.emit(self) if job.getResult(): - message = Message(catalog.i18nc("@info:status", "Saved to Removable Drive {0} as {1}").format(self.getName(), os.path.basename(job.getFileName()))) + message = Message(catalog.i18nc("@info:status", "Saved to Removable Drive {0} as {1}").format(self.getName(), os.path.basename(job.getFileName())), title = catalog.i18nc("@info:title", "File Saved")) message.addAction("eject", catalog.i18nc("@action:button", "Eject"), "eject", catalog.i18nc("@action", "Eject removable device {0}").format(self.getName())) message.actionTriggered.connect(self._onActionTriggered) message.show() self.writeSuccess.emit(self) else: - message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(), str(job.getError()))) + message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(), str(job.getError())), title = catalog.i18nc("@info:title", "Warning")) message.show() self.writeError.emit(self) job.getStream().close() @@ -154,7 +153,7 @@ class RemovableDriveOutputDevice(OutputDevice): if Application.getInstance().getOutputDeviceManager().getOutputDevicePlugin("RemovableDriveOutputDevice").ejectDevice(self): message.hide() - eject_message = Message(catalog.i18nc("@info:status", "Ejected {0}. You can now safely remove the drive.").format(self.getName())) + eject_message = Message(catalog.i18nc("@info:status", "Ejected {0}. You can now safely remove the drive.").format(self.getName()), title = catalog.i18nc("@info:title", "Safely Remove Hardware")) else: - eject_message = Message(catalog.i18nc("@info:status", "Failed to eject {0}. Another program may be using the drive.").format(self.getName())) + eject_message = Message(catalog.i18nc("@info:status", "Failed to eject {0}. Another program may be using the drive.").format(self.getName()), title = catalog.i18nc("@info:title", "Warning")) eject_message.show() diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 30b664ed63..09373d0c2f 100755 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -40,7 +40,11 @@ class SliceInfo(Extension): Preferences.getInstance().addPreference("info/asked_send_slice_info", False) if not Preferences.getInstance().getValue("info/asked_send_slice_info"): - self.send_slice_info_message = Message(catalog.i18nc("@info", "Cura collects anonymised slicing statistics. You can disable this in the preferences."), lifetime = 0, dismissable = False) + self.send_slice_info_message = Message(catalog.i18nc("@info", "Cura collects anonymised slicing statistics. You can disable this in the preferences."), + lifetime = 0, + dismissable = False, + title = catalog.i18nc("@info:title", "Collecting Data")) + self.send_slice_info_message.addAction("Dismiss", catalog.i18nc("@action:button", "Dismiss"), None, "") self.send_slice_info_message.actionTriggered.connect(self.messageActionTriggered) self.send_slice_info_message.show() diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index 450f92a6e3..a0b181b7ce 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -154,12 +154,12 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._authentication_id = None self._authentication_key = None - self._authentication_requested_message = Message(i18n_catalog.i18nc("@info:status", "Access to the printer requested. Please approve the request on the printer"), lifetime = 0, dismissable = False, progress = 0) - self._authentication_failed_message = Message(i18n_catalog.i18nc("@info:status", "")) + self._authentication_requested_message = Message(i18n_catalog.i18nc("@info:status", "Access to the printer requested. Please approve the request on the printer"), lifetime = 0, dismissable = False, progress = 0, title = i18n_catalog.i18nc("@info:title", "Connection status")) + self._authentication_failed_message = Message(i18n_catalog.i18nc("@info:status", ""), title = i18n_catalog.i18nc("@info:title", "Connection Status")) self._authentication_failed_message.addAction("Retry", i18n_catalog.i18nc("@action:button", "Retry"), None, i18n_catalog.i18nc("@info:tooltip", "Re-send the access request")) self._authentication_failed_message.actionTriggered.connect(self.requestAuthentication) - self._authentication_succeeded_message = Message(i18n_catalog.i18nc("@info:status", "Access to the printer accepted")) - self._not_authenticated_message = Message(i18n_catalog.i18nc("@info:status", "No access to print with this printer. Unable to send print job.")) + self._authentication_succeeded_message = Message(i18n_catalog.i18nc("@info:status", "Access to the printer accepted"), title = i18n_catalog.i18nc("@info:title", "Connection Status")) + self._not_authenticated_message = Message(i18n_catalog.i18nc("@info:status", "No access to print with this printer. Unable to send print job."), title = i18n_catalog.i18nc("@info:title", "Connection Status")) self._not_authenticated_message.addAction("Request", i18n_catalog.i18nc("@action:button", "Request Access"), None, i18n_catalog.i18nc("@info:tooltip", "Send access request to the printer")) self._not_authenticated_message.actionTriggered.connect(self.requestAuthentication) @@ -464,7 +464,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._connection_state_before_timeout = self._connection_state self.setConnectionState(ConnectionState.error) self._connection_message = Message(i18n_catalog.i18nc("@info:status", - "The connection with the network was lost.")) + "The connection with the network was lost."), + title = i18n_catalog.i18nc("@info:title", "Connection Status")) self._connection_message.show() if self._progress_message: @@ -495,7 +496,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): # Go into timeout state. Logger.log("d", "We did not receive a response for %0.1f seconds, so it seems the printer is no longer accessible.", time_since_last_response) self._connection_state_before_timeout = self._connection_state - self._connection_message = Message(i18n_catalog.i18nc("@info:status", "The connection with the printer was lost. Check your printer to see if it is connected.")) + self._connection_message = Message(i18n_catalog.i18nc("@info:status", "The connection with the printer was lost. Check your printer to see if it is connected."), + title = i18n_catalog.i18nc("@info:title", "Connection Status")) self._connection_message.show() if self._progress_message: @@ -644,7 +646,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None, **kwargs): if self._printer_state not in ["idle", ""]: self._error_message = Message( - i18n_catalog.i18nc("@info:status", "Unable to start a new print job, printer is busy. Current printer status is %s.") % self._printer_state) + i18n_catalog.i18nc("@info:status", "Unable to start a new print job, printer is busy. Current printer status is %s.") % self._printer_state, + title = i18n_catalog.i18nc("@info:title", "Printer Status")) self._error_message.show() return elif self._authentication_state != AuthState.Authenticated: @@ -668,14 +671,16 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): if self._json_printer_state["heads"][0]["extruders"][index]["hotend"]["id"] == "": Logger.log("e", "No cartridge loaded in slot %s, unable to start print", index + 1) self._error_message = Message( - i18n_catalog.i18nc("@info:status", "Unable to start a new print job. No Printcore loaded in slot {0}".format(index + 1))) + i18n_catalog.i18nc("@info:status", "Unable to start a new print job. No Printcore loaded in slot {0}".format(index + 1)), + title = i18n_catalog.i18nc("@info:title", "Error")) self._error_message.show() return if self._json_printer_state["heads"][0]["extruders"][index]["active_material"]["guid"] == "": Logger.log("e", "No material loaded in slot %s, unable to start print", index + 1) self._error_message = Message( i18n_catalog.i18nc("@info:status", - "Unable to start a new print job. No material loaded in slot {0}".format(index + 1))) + "Unable to start a new print job. No material loaded in slot {0}".format(index + 1)), + title = i18n_catalog.i18nc("@info:title", "Error")) self._error_message.show() return @@ -831,7 +836,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): def startPrint(self): try: self._send_gcode_start = time() - self._progress_message = Message(i18n_catalog.i18nc("@info:status", "Sending data to printer"), 0, False, -1) + self._progress_message = Message(i18n_catalog.i18nc("@info:status", "Sending data to printer"), 0, False, -1, i18n_catalog.i18nc("@info:title", "Sending Data")) self._progress_message.addAction("Abort", i18n_catalog.i18nc("@action:button", "Cancel"), None, "") self._progress_message.actionTriggered.connect(self._progressMessageActionTrigger) self._progress_message.show() @@ -900,7 +905,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): except IOError: self._progress_message.hide() - self._error_message = Message(i18n_catalog.i18nc("@info:status", "Unable to send data to printer. Is another job still active?")) + self._error_message = Message(i18n_catalog.i18nc("@info:status", "Unable to send data to printer. Is another job still active?"), + title = i18n_catalog.i18nc("@info:title", "Warning")) self._error_message.show() except Exception as e: self._progress_message.hide() diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 529783acb8..4b4c24c5d2 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -150,7 +150,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice): def printGCode(self, gcode_list): Logger.log("d", "Started printing g-code") if self._progress or self._connection_state != ConnectionState.connected: - self._error_message = Message(catalog.i18nc("@info:status", "Unable to start a new job because the printer is busy or not connected.")) + self._error_message = Message(catalog.i18nc("@info:status", "Unable to start a new job because the printer is busy or not connected."), title = catalog.i18nc("@info:title", "Print Details")) self._error_message.show() Logger.log("d", "Printer is busy or not connected, aborting print") self.writeError.emit(self) @@ -453,11 +453,11 @@ class USBPrinterOutputDevice(PrinterOutputDevice): container_stack = Application.getInstance().getGlobalContainerStack() if container_stack.getProperty("machine_gcode_flavor", "value") == "UltiGCode": - self._error_message = Message(catalog.i18nc("@info:status", "This printer does not support USB printing because it uses UltiGCode flavor.")) + self._error_message = Message(catalog.i18nc("@info:status", "This printer does not support USB printing because it uses UltiGCode flavor."), title = catalog.i18nc("@info:title", "USB Printing")) self._error_message.show() return elif not container_stack.getMetaDataEntry("supports_usb_connection"): - self._error_message = Message(catalog.i18nc("@info:status", "Unable to start a new job because the printer does not support usb printing.")) + self._error_message = Message(catalog.i18nc("@info:status", "Unable to start a new job because the printer does not support usb printing."), title = catalog.i18nc("@info:title", "Warning")) self._error_message.show() return diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index bb2fda46df..430ec1d844 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -105,7 +105,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension): if file_name.startswith("file://"): file_name = QUrl(file_name).toLocalFile() # File dialogs prepend the path with file://, which we don't need / want if not self._usb_output_devices: - Message(i18n_catalog.i18nc("@info", "Unable to update firmware because there are no printers connected.")).show() + Message(i18n_catalog.i18nc("@info", "Unable to update firmware because there are no printers connected."), title = i18n_catalog.i18nc("@info:title", "Warning")).show() return for printer_connection in self._usb_output_devices: @@ -119,7 +119,7 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension): self._usb_output_devices[printer_connection].setProgress(100, 100) Logger.log("w", "No firmware found for printer %s called '%s'", printer_connection, file_name) Message(i18n_catalog.i18nc("@info", - "Could not find firmware required for the printer at %s.") % printer_connection).show() + "Could not find firmware required for the printer at %s.") % printer_connection, title = i18n_catalog.i18nc("@info:title", "Printer Firmware")).show() self._firmware_view.close() continue