dialogs: set title

This commit is contained in:
alfrix
2022-11-30 11:51:24 -03:00
parent 3a764be93f
commit 9de058b0d7
6 changed files with 21 additions and 8 deletions

View File

@@ -375,7 +375,8 @@ class KlipperScreen(Gtk.Window):
buttons = [
{"name": _("Go Back"), "response": Gtk.ResponseType.CANCEL}
]
self.gtk.Dialog(self, buttons, grid, self.error_modal_response)
dialog = self.gtk.Dialog(self, buttons, grid, self.error_modal_response)
dialog.set_title(_("Error"))
def error_modal_response(self, dialog, response_id):
self.gtk.remove_dialog(dialog)
@@ -756,6 +757,7 @@ class KlipperScreen(Gtk.Window):
if self.confirm is not None:
self.gtk.remove_dialog(self.confirm)
self.confirm = self.gtk.Dialog(self, buttons, label, self._confirm_send_action_response, method, params)
self.confirm.set_title("KlipperScreen")
def _confirm_send_action_response(self, dialog, response_id, method, params):
self.gtk.remove_dialog(dialog)