From 485bf21ccaaebc2916460924e7b0ac6e6c38c28f Mon Sep 17 00:00:00 2001 From: Hari Rana Date: Tue, 24 Dec 2024 09:21:18 -0500 Subject: [PATCH] list: Rename `update_bottles` to `update_bottles_list` It makes more sense and is more explanatory. --- bottles/frontend/views/list.py | 10 +++++----- bottles/frontend/views/new.py | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bottles/frontend/views/list.py b/bottles/frontend/views/list.py index cd74d64379..a1e2a4522b 100644 --- a/bottles/frontend/views/list.py +++ b/bottles/frontend/views/list.py @@ -160,7 +160,7 @@ def __init__(self, window, arg_bottle=None, **kwargs): self.bottle_status.set_icon_name(APP_ID) - self.update_bottles() + self.update_bottles_list() def __search_bottles(self, widget, event=None, data=None): """ @@ -176,7 +176,7 @@ def __filter_bottles(row, terms=None): text = row.get_title().lower() return terms.lower() in text - def idle_update_bottles(self, show=False): + def idle_update_bottles_list(self, show=False): self.__bottles = {} while self.list_bottles.get_first_child(): self.list_bottles.remove(self.list_bottles.get_first_child()) @@ -222,10 +222,10 @@ def idle_update_bottles(self, show=False): self.arg_bottle = None def backend_local_bottle_loaded(self, _: Result): - self.update_bottles() + self.update_bottles_list() - def update_bottles(self, show=False): - GLib.idle_add(self.idle_update_bottles, show) + def update_bottles_list(self, show=False): + GLib.idle_add(self.idle_update_bottles_list, show) def disable_bottle(self, config): self.__bottles[config.Path].disable() diff --git a/bottles/frontend/views/new.py b/bottles/frontend/views/new.py index 8cbbb69db0..1755e76d16 100644 --- a/bottles/frontend/views/new.py +++ b/bottles/frontend/views/new.py @@ -243,7 +243,9 @@ def send_notification(notification: Gio.Notification) -> None: # Ask the manager to check for new bottles, # then update the user bottles' list. self.manager.check_bottles() - self.window.page_list.update_bottles(show=result.data.get("config").get("Path")) + self.window.page_list.update_bottles_list( + show=result.data.get("config").get("Path") + ) def __radio_get_active(self) -> str: # TODO: Remove this ugly zig zag and find a better way to set the environment