mirror of https://github.com/gmbrax/Pilgrim.git
Added `on_footer_action` handler to manage footer action clicks in `EditEntryScreen`.
This commit is contained in:
parent
cc723bdbbb
commit
4f1740f575
|
|
@ -1028,3 +1028,12 @@ class EditEntryScreen(Screen):
|
||||||
elif self.focused is self.text_entry and event.key == "tab":
|
elif self.focused is self.text_entry and event.key == "tab":
|
||||||
self.text_entry.insert('\t')
|
self.text_entry.insert('\t')
|
||||||
event.stop()
|
event.stop()
|
||||||
|
|
||||||
|
def on_footer_action(self, event) -> None:
|
||||||
|
"""Handle clicks on footer actions (Textual 3.x)."""
|
||||||
|
action = event.action
|
||||||
|
method = getattr(self, f"action_{action}", None)
|
||||||
|
if method:
|
||||||
|
method()
|
||||||
|
else:
|
||||||
|
self.notify(f"No action found for: {action}", severity="warning")
|
||||||
Loading…
Reference in New Issue