diff --git a/dzgui/config/query.py b/dzgui/config/query.py index 00bb522..dc544d1 100644 --- a/dzgui/config/query.py +++ b/dzgui/config/query.py @@ -40,11 +40,11 @@ def get_favorites(path: Path) -> list[str]: return conf["ip_list"] -def is_in_favs(record: str, path: Path) -> bool: - favs = get_favorites(path) - if record in favs: - return True - return False +# def is_in_favs(record: str, path: Path) -> bool: +# favs = get_favorites(path) +# if record in favs: +# return True +# return False def enum_to_key(enum: Preferences) -> str: diff --git a/dzgui/controllers/mc.py b/dzgui/controllers/mc.py index ee05d32..30a132c 100644 --- a/dzgui/controllers/mc.py +++ b/dzgui/controllers/mc.py @@ -2,7 +2,6 @@ import inspect import logging from typing import Any, Callable, TYPE_CHECKING -from warnings import deprecated import dzgui.util._json as JSON # noqa @@ -373,9 +372,6 @@ class Controller(GObject.GObject): return False return True - # def is_in_favs(self) -> bool: - # return self.config_man.is_in_favs() - def get_config_man(self) -> ConfigManager: return self.config_man diff --git a/dzgui/views/trees/tree_servers.py b/dzgui/views/trees/tree_servers.py index cc416a8..98250c7 100644 --- a/dzgui/views/trees/tree_servers.py +++ b/dzgui/views/trees/tree_servers.py @@ -271,8 +271,7 @@ class ServerTreeView(ContextMixin, TreeView): def is_in_favs(self) -> bool: record = self.get_record_string() - ips = self.controller.get_config_man().lookup(Preferences.IP_LIST) - if record in ips: + if self.controller.get_config_man().is_in_favs(record): return True return False