From df17ba9c2b61e8df8587d4e93248e438aabf52d7 Mon Sep 17 00:00:00 2001 From: Sander Sweers Date: Wed, 29 Mar 2023 20:37:19 +0200 Subject: [PATCH] ManagerProgressbar: Hide cancel button when discovering --- blueman/gui/manager/ManagerProgressbar.py | 2 +- blueman/main/Manager.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/blueman/gui/manager/ManagerProgressbar.py b/blueman/gui/manager/ManagerProgressbar.py index c57e37f2f..9433ad178 100644 --- a/blueman/gui/manager/ManagerProgressbar.py +++ b/blueman/gui/manager/ManagerProgressbar.py @@ -61,7 +61,7 @@ def __init__(self, blueman: "Blueman", cancellable: bool = True, text: str = _(" self.show() if not self.cancellable: - self.eventbox.props.sensitive = False + self.eventbox.set_visible(False) self.pulsing = False self.finalized = False diff --git a/blueman/main/Manager.py b/blueman/main/Manager.py index c74ccef7c..2af16cd2f 100644 --- a/blueman/main/Manager.py +++ b/blueman/main/Manager.py @@ -200,8 +200,7 @@ def on_progress(_lst: ManagerDeviceList, frac: float) -> None: else: prog.fraction(frac) - prog = ManagerProgressbar(self, text=_("Searching")) - prog.connect("cancelled", lambda x: self.List.stop_discovery()) + prog = ManagerProgressbar(self, text=_("Searching"), cancellable=False) def on_error(e: Exception) -> None: prog.finalize()