MCPcopy Create free account
hub / github.com/BuddySirJava/SSH-Studio / show_toast

Method show_toast

src/ui/main_window.py:114–125  ·  view source on GitHub ↗

Show a transient toast using Adw.ToastOverlay.

(self, message: str)

Source from the content-addressed store, hash-verified

112 self._raw_wrap_lines = False
113
114 def show_toast(self, message: str):
115 """Show a transient toast using Adw.ToastOverlay."""
116 try:
117 toast = Adw.Toast.new(message)
118 try:
119 toast.set_timeout(3)
120 except Exception:
121 pass
122 if hasattr(self, "toast_overlay") and self.toast_overlay is not None:
123 self.toast_overlay.add_toast(toast)
124 except Exception:
125 pass
126
127 def _show_undo_toast(self, message: str, on_undo):
128 """Show a toast with an Undo action; executes on_undo when clicked."""

Callers 6

_show_undo_toastMethod · 0.95
on_responseMethod · 0.95
_on_show_toastMethod · 0.95
_update_statusMethod · 0.95
_show_errorMethod · 0.95
_show_toastMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected