Browse Source

Added Title for messages
CURA-4203

alekseisasin 7 years ago
parent
commit
204019702d

+ 7 - 2
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()

+ 1 - 1
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.

+ 2 - 2
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
 

+ 2 - 2
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()

+ 8 - 3
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 <filename> or <message>!", "Failed to export profile to <filename>{0}</filename>: <message>{1}</message>", file_name, str(e)), lifetime = 0)
+            m = Message(catalog.i18nc("@info:status Don't translate the XML tags <filename> or <message>!", "Failed to export profile to <filename>{0}</filename>: <message>{1}</message>", 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 <filename>!", "Failed to export profile to <filename>{0}</filename>: Writer plugin reported failure.", file_name), lifetime = 0)
+            m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Failed to export profile to <filename>{0}</filename>: 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 <filename>!", "Exported profile to <filename>{0}</filename>", file_name))
+        m = Message(catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Exported profile to <filename>{0}</filename>", file_name),
+                    title = catalog.i18nc("@info:title", "Export Details"))
         m.show()
 
     ##  Gets the plugin object matching the criteria

+ 2 - 1
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()

+ 1 - 1
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)
 

+ 7 - 4
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:

+ 1 - 1
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:

+ 7 - 2
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.

Some files were not shown because too many files changed in this diff