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
2024-01-02 08:04:02 -03:00
committed by GitHub
parent 25ab9c962d
commit 1794d8aa24
13 changed files with 301 additions and 92 deletions

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")