fix: pass correct button to submit method

This commit is contained in:
aclist committed 2025-08-09 16:01:00 +09:00
1 parent 3d91e07d25
commit f4f3e61b83
2 files changed
+6 -5

No files matched your search

+3 -2
View File
@@ -3543,9 +3543,10 @@ class Options(Gtk.Box):
self, entry: Gtk.Entry, context: Preferences
) -> None:
text = entry.get_text()
button = entry.sibling
if not self._is_valid_text(text, context):
return
self._on_save_clicked(None, entry, context)
self._on_save_clicked(button, entry, context)
def _make_grid(self, rows: list) -> Gtk.Grid:
grid = Gtk.Grid(
@@ -3569,7 +3570,7 @@ class Options(Gtk.Box):
return grid
def _on_save_clicked(
self, button: Gtk.Button | None, entry: Gtk.Entry, context: Preferences
self, button: Gtk.Button, entry: Gtk.Entry, context: Preferences
) -> None:
show_wait_dialog = True
wait_msg = "Working"