Add Reft and Right side aligned action buttons to the message box

CURA-4952
This commit is contained in:
Aleksei S 2018-05-29 18:15:16 +02:00
parent fed0a015ee
commit b46a08f566
3 changed files with 16 additions and 5 deletions

View file

@ -75,9 +75,19 @@ class FirmwareUpdateCheckerJob(Job):
machine_name=machine_name),
title=i18n_catalog.i18nc(
"@info:title The %s gets replaced with the printer name.",
"New %s firmware available") % machine_name,
footer = footer_message)
"New %s firmware available") % machine_name)
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.show()