Skip to content

Commit

Permalink
Update DiscvManager.py: prevent the Discoverable... -1s case
Browse files Browse the repository at this point in the history
  • Loading branch information
kuraga authored and cschramm committed Nov 12, 2023
1 parent 40449c0 commit dd995ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions blueman/plugins/applet/DiscvManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ def on_manager_state_changed(self, state: bool) -> None:
self.update_menuitems()

def on_update(self) -> bool:
self.time_left -= 1
self.item.set_text(_("Discoverable… %ss") % self.time_left)
self.item.set_sensitive(False)
if self.time_left >= 1:
self.item.set_text(_("Discoverable… %ss") % self.time_left)
else:
self.item.set_text(_("Discoverable…"))
self.time_left -= 1

return True

Expand Down

0 comments on commit dd995ab

Please sign in to comment.