Skip to content

Commit

Permalink
ManagerProgressbar: Hide cancel button when discovering
Browse files Browse the repository at this point in the history
  • Loading branch information
infirit committed Mar 29, 2023
1 parent 9c2f5d1 commit df17ba9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blueman/gui/manager/ManagerProgressbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions blueman/main/Manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit df17ba9

Please sign in to comment.