mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
fix: focus OK button when dialog opens
This commit is contained in:
1 parent
c6a75c1e78
commit
2f4606ede0
1 file changed
+6
@@ -309,6 +309,12 @@ class ExceptionDialog(TextBufferDialog):
|
|||||||
content.set_spacing(0)
|
content.set_spacing(0)
|
||||||
content.add(scrollable)
|
content.add(scrollable)
|
||||||
|
|
||||||
|
self.connect("map", self._on_map)
|
||||||
|
|
||||||
|
def _on_map(self, dialog: Self) -> None:
|
||||||
|
button = self.get_widget_for_response(Gtk.ResponseType.OK)
|
||||||
|
button.grab_focus()
|
||||||
|
|
||||||
def _on_page_changed(
|
def _on_page_changed(
|
||||||
self, notebook: Gtk.Notebook, child: Gtk.Box | Gtk.ScrolledWindow, index: int
|
self, notebook: Gtk.Notebook, child: Gtk.Box | Gtk.ScrolledWindow, index: int
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
Reference in new issue
Block a user