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

Method _get_selected_host

src/ui/host_list.py:682–697  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

680 pass
681
682 def _get_selected_host(self):
683 if hasattr(self, "list_box") and self.list_box is not None:
684 try:
685 row = self.list_box.get_selected_row()
686 except Exception:
687 row = None
688 if row is not None:
689 host = getattr(row, "_host_ref", None)
690 if host is not None:
691 return host
692 if hasattr(self, "tree_view") and self.tree_view is not None:
693 selection = self.tree_view.get_selection()
694 model, tree_iter = selection.get_selected()
695 if tree_iter:
696 return model.get_value(tree_iter, 5)
697 return self._selected_host
698
699 def _update_bottom_toolbar_sensitivity(self):
700 pass

Callers 2

duplicate_hostMethod · 0.95
delete_hostMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected