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

Method _show_welcome_view

src/ui/main_window.py:550–582  ·  view source on GitHub ↗

Show the welcome view when no host is selected.

(self)

Source from the content-addressed store, hash-verified

548 self.content_nav.push_by_tag("host-editor")
549
550 def _show_welcome_view(self):
551 """Show the welcome view when no host is selected."""
552 if hasattr(self, "content_nav") and self.content_nav:
553 try:
554 page = None
555 if hasattr(self.content_nav, "find_page"):
556 try:
557 page = self.content_nav.find_page("welcome")
558 except Exception:
559 page = None
560 if page is None:
561 try:
562 pages = self.content_nav.get_pages()
563 except Exception:
564 pages = []
565 for p in pages:
566 try:
567 tag = p.get_tag() if hasattr(p, "get_tag") else getattr(p, "tag", None)
568 except Exception:
569 tag = None
570 if tag == "welcome":
571 page = p
572 break
573
574 if page is not None:
575 self.content_nav.pop_to_page(page)
576 else:
577 self.content_nav.push_by_tag("welcome")
578 except Exception:
579 try:
580 self.content_nav.push_by_tag("welcome")
581 except Exception:
582 pass
583
584 def _on_host_added(self, host_list, host):
585 if self.parser:

Callers 3

__init__Method · 0.95
_on_host_deletedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected