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

Method _combo_select

src/ui/host_editor.py:1484–1497  ·  view source on GitHub ↗
(self, combo_row, values: list[str], value: str)

Source from the content-addressed store, hash-verified

1482 self.connect_timeout_entry.remove_css_class("entry-error")
1483
1484 def _combo_select(self, combo_row, values: list[str], value: str):
1485 try:
1486 lower_values = [v.lower() for v in values]
1487 idx = (
1488 lower_values.index(value.lower())
1489 if value.lower() in lower_values
1490 else 0
1491 )
1492 combo_row.set_selected(idx)
1493 except Exception:
1494 try:
1495 combo_row.set_selected(0)
1496 except Exception:
1497 pass
1498
1499 def _validate_and_update_host(self):
1500 field_errors = self._collect_field_errors()

Callers 1

load_hostMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected