Skip to content

Commit

Permalink
list: Rename update_bottles to update_bottles_list
Browse files Browse the repository at this point in the history
It makes more sense and is more explanatory.
  • Loading branch information
TheEvilSkeleton committed Dec 24, 2024
1 parent 41b7d16 commit 485bf21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions bottles/frontend/views/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand All @@ -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())
Expand Down Expand Up @@ -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()
4 changes: 3 additions & 1 deletion bottles/frontend/views/new.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 485bf21

Please sign in to comment.