From 9e15401ddc769325bed4f8c40d8e0a04d6031b14 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 14 Sep 2021 10:36:44 -0400 Subject: [PATCH] Add an accounts list setter --- piker/ui/_position.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/piker/ui/_position.py b/piker/ui/_position.py index f9ee4e2b..54ca8605 100644 --- a/piker/ui/_position.py +++ b/piker/ui/_position.py @@ -133,6 +133,15 @@ class SettingsPane: # encompasing high level namespace order_mode: Optional['OrderMode'] = None # typing: ignore # noqa + def set_accounts( + self, + names: list[str], + sizes: Optional[list[float]] = None, + ) -> None: + + combo = self.form.fields['account'] + return combo.set_items(names) + def update_accounts_icon( self, status: str, # one of the values in ``_icons`` above