feat: macro prompts close #1216 (#1219)

* feat: macro prompts close #1216

now the user can have confirmation on macros using this feature close #835

* prompt: remove separator and remove the header and close button if windowed

* prompt: wakeup screen

* prompt: slightly larger close icon
This commit is contained in:
Alfredo Monclus authored and GitHub committed 2024-01-02 08:04:02 -03:00
1 parent 25ab9c962d
commit 1794d8aa24
13 files changed
+301 -92

No files matched your search

+1 -1
View File
@@ -309,7 +309,7 @@ class BasePanel(ScreenPanel):
def show_update_dialog(self):
if self.update_dialog is not None:
return
button = [{"name": _("Finish"), "response": Gtk.ResponseType.OK}]
button = [{"name": _("Finish"), "response": Gtk.ResponseType.OK, "style": 'dialog-default'}]
self.labels['update_progress'] = Gtk.Label()
self.labels['update_progress'].set_halign(Gtk.Align.START)
self.labels['update_progress'].set_valign(Gtk.Align.START)
+4 -4
View File
@@ -402,8 +402,8 @@ class Panel(ScreenPanel):
grid = self._gtk.HomogeneousGrid()
grid.attach(label, 0, 0, 1, 1)
buttons = [
{"name": _("Apply"), "response": Gtk.ResponseType.APPLY},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
{"name": _("Apply"), "response": Gtk.ResponseType.APPLY, "style": 'dialog-default'},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL, "style": 'dialog-error'}
]
self._gtk.Dialog(_("Save Z"), buttons, grid, self.save_confirm, device)
@@ -438,8 +438,8 @@ class Panel(ScreenPanel):
def cancel(self, widget):
buttons = [
{"name": _("Cancel Print"), "response": Gtk.ResponseType.OK},
{"name": _("Go Back"), "response": Gtk.ResponseType.CANCEL}
{"name": _("Cancel Print"), "response": Gtk.ResponseType.OK, "style": 'dialog-error'},
{"name": _("Go Back"), "response": Gtk.ResponseType.CANCEL, "style": 'dialog-info'}
]
if len(self._printer.get_stat("exclude_object", "objects")) > 1:
buttons.insert(0, {"name": _("Exclude Object"), "response": Gtk.ResponseType.APPLY})
+1 -1
View File
@@ -300,7 +300,7 @@ class Panel(ScreenPanel):
buttons = [
{"name": _("Print"), "response": Gtk.ResponseType.OK},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL, "style": 'dialog-error'}
]
label = Gtk.Label()
+8 -8
View File
@@ -141,9 +141,9 @@ class Panel(ScreenPanel):
vbox.add(label)
scroll.add(vbox)
recoverybuttons = [
{"name": _("Recover Hard"), "response": Gtk.ResponseType.OK},
{"name": _("Recover Soft"), "response": Gtk.ResponseType.APPLY},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
{"name": _("Recover Hard"), "response": Gtk.ResponseType.OK, "style": 'dialog-warning'},
{"name": _("Recover Soft"), "response": Gtk.ResponseType.APPLY, "style": 'dialog-info'},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL, "style": 'dialog-error'}
]
self._gtk.Dialog(_("Recover"), recoverybuttons, scroll, self.reset_confirm, program)
return
@@ -206,8 +206,8 @@ class Panel(ScreenPanel):
scroll.add(vbox)
buttons = [
{"name": _("Update"), "response": Gtk.ResponseType.OK},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
{"name": _("Update"), "response": Gtk.ResponseType.OK, "style": 'dialog-info'},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL, "style": 'dialog-error'}
]
self._gtk.Dialog(_("Update"), buttons, scroll, self.update_confirm, program)
@@ -321,9 +321,9 @@ class Panel(ScreenPanel):
vbox.add(label)
scroll.add(vbox)
buttons = [
{"name": _("Host"), "response": Gtk.ResponseType.OK},
{"name": _("Printer"), "response": Gtk.ResponseType.APPLY},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL}
{"name": _("Host"), "response": Gtk.ResponseType.OK, "style": 'dialog-info'},
{"name": _("Printer"), "response": Gtk.ResponseType.APPLY, "style": 'dialog-warning'},
{"name": _("Cancel"), "response": Gtk.ResponseType.CANCEL, "style": 'dialog-error'}
]
if method == "reboot":
title = _("Restart")