mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 19:35:58 +08:00
Merge branch '3.4'
This commit is contained in:
commit
16b8d3f137
@ -452,7 +452,7 @@ class CuraApplication(QtApplication):
|
|||||||
|
|
||||||
## A reusable dialogbox
|
## A reusable dialogbox
|
||||||
#
|
#
|
||||||
showMessageBox = pyqtSignal(str, str, str, str, str, int, int, arguments = ["title", "footer", "text", "informativeText", "detailedText", "buttons", "icon"])
|
showMessageBox = pyqtSignal(str, str, str, str, int, int, arguments = ["title", "text", "informativeText", "detailedText", "buttons", "icon"])
|
||||||
|
|
||||||
def messageBox(self, title, text, informativeText = "", detailedText = "", buttons = QMessageBox.Ok, icon = QMessageBox.NoIcon, callback = None, callback_arguments = []):
|
def messageBox(self, title, text, informativeText = "", detailedText = "", buttons = QMessageBox.Ok, icon = QMessageBox.NoIcon, callback = None, callback_arguments = []):
|
||||||
self._message_box_callback = callback
|
self._message_box_callback = callback
|
||||||
|
@ -1350,6 +1350,10 @@ class MachineManager(QObject):
|
|||||||
self._updateMaterialWithVariant(position)
|
self._updateMaterialWithVariant(position)
|
||||||
self._updateQualityWithMaterial()
|
self._updateQualityWithMaterial()
|
||||||
|
|
||||||
|
# See if we need to show the Discard or Keep changes screen
|
||||||
|
if self.hasUserSettings and Preferences.getInstance().getValue("cura/active_mode") == 1:
|
||||||
|
self._application.discardOrKeepProfileChanges()
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def setQualityGroupByQualityType(self, quality_type: str) -> None:
|
def setQualityGroupByQualityType(self, quality_type: str) -> None:
|
||||||
if self._global_container_stack is None:
|
if self._global_container_stack is None:
|
||||||
|
@ -64,20 +64,25 @@ class FirmwareUpdateCheckerJob(Job):
|
|||||||
if (checked_version != "") and (checked_version != current_version):
|
if (checked_version != "") and (checked_version != current_version):
|
||||||
Logger.log("i", "SHOWING FIRMWARE UPDATE MESSAGE")
|
Logger.log("i", "SHOWING FIRMWARE UPDATE MESSAGE")
|
||||||
|
|
||||||
footer_text = i18n_catalog.i18nc("@action:info", "Read more on how to update printer firmware")
|
|
||||||
footer_link = "?url=https://ultimaker.com/en/resources/23129-updating-the-firmware?utm_source=cura&utm_medium=software&utm_campaign=hw-update"
|
|
||||||
|
|
||||||
footer_message = footer_text + " " + footer_link
|
|
||||||
|
|
||||||
message = Message(i18n_catalog.i18nc(
|
message = Message(i18n_catalog.i18nc(
|
||||||
"@info Don't translate {machine_name}, since it gets replaced by a printer name!",
|
"@info Don't translate {machine_name}, since it gets replaced by a printer name!",
|
||||||
"New features are available for your {machine_name}! It is recommended to update the firmware on your printer.").format(
|
"New features are available for your {machine_name}! It is recommended to update the firmware on your printer.").format(
|
||||||
machine_name=machine_name),
|
machine_name=machine_name),
|
||||||
title=i18n_catalog.i18nc(
|
title=i18n_catalog.i18nc(
|
||||||
"@info:title The %s gets replaced with the printer name.",
|
"@info:title The %s gets replaced with the printer name.",
|
||||||
"New %s firmware available") % machine_name,
|
"New %s firmware available") % machine_name)
|
||||||
footer = footer_message)
|
|
||||||
|
|
||||||
|
message.addAction("download",
|
||||||
|
i18n_catalog.i18nc("@action:button", "How to update"),
|
||||||
|
"[no_icon]",
|
||||||
|
"[no_description]",
|
||||||
|
button_style=Message.ActionButtonStyle.LINK,
|
||||||
|
button_align=Message.ActionButtonStyle.BUTTON_ALIGN_LEFT)
|
||||||
|
|
||||||
|
|
||||||
|
# If we do this in a cool way, the download url should be available in the JSON file
|
||||||
|
if self._set_download_url_callback:
|
||||||
|
self._set_download_url_callback("https://ultimaker.com/en/resources/20500-upgrade-firmware")
|
||||||
message.actionTriggered.connect(self._callback)
|
message.actionTriggered.connect(self._callback)
|
||||||
message.show()
|
message.show()
|
||||||
|
|
||||||
|
@ -46,10 +46,11 @@ class SliceInfo(QObject, Extension):
|
|||||||
dismissable = False,
|
dismissable = False,
|
||||||
title = catalog.i18nc("@info:title", "Collecting Data"))
|
title = catalog.i18nc("@info:title", "Collecting Data"))
|
||||||
|
|
||||||
self.send_slice_info_message.addAction("Dismiss", name = catalog.i18nc("@action:button", "Allow"), icon = None,
|
|
||||||
description = catalog.i18nc("@action:tooltip", "Allow Cura to send anonymized usage statistics to help prioritize future improvements to Cura. Some of your preferences and settings are sent, the Cura version and a hash of the models you're slicing."))
|
|
||||||
self.send_slice_info_message.addAction("MoreInfo", name = catalog.i18nc("@action:button", "More info"), icon = None,
|
self.send_slice_info_message.addAction("MoreInfo", name = catalog.i18nc("@action:button", "More info"), icon = None,
|
||||||
description = catalog.i18nc("@action:tooltip", "See more information on what data Cura sends."), button_style = Message.ActionButtonStyle.LINK)
|
description = catalog.i18nc("@action:tooltip", "See more information on what data Cura sends."), button_style = Message.ActionButtonStyle.LINK)
|
||||||
|
|
||||||
|
self.send_slice_info_message.addAction("Dismiss", name = catalog.i18nc("@action:button", "Allow"), icon = None,
|
||||||
|
description = catalog.i18nc("@action:tooltip", "Allow Cura to send anonymized usage statistics to help prioritize future improvements to Cura. Some of your preferences and settings are sent, the Cura version and a hash of the models you're slicing."))
|
||||||
self.send_slice_info_message.actionTriggered.connect(self.messageActionTriggered)
|
self.send_slice_info_message.actionTriggered.connect(self.messageActionTriggered)
|
||||||
self.send_slice_info_message.show()
|
self.send_slice_info_message.show()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user