Skip to content

Commit

Permalink
Ignore double-click for connect when unpowered
Browse files Browse the repository at this point in the history
  • Loading branch information
cschramm committed Nov 12, 2023
1 parent f083cce commit 359ecea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blueman/gui/manager/ManagerDeviceList.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import cairo
import os

from blueman.bluez.Adapter import Adapter
from blueman.bluez.Battery import Battery
from blueman.bluez.Device import Device
from blueman.bluez.Manager import Manager
Expand Down Expand Up @@ -242,7 +243,7 @@ def on_event_clicked(self, _widget: Gtk.Widget, event: Gdk.Event) -> bool:
if self.menu.show_generic_connect_calc(row["device"]['UUIDs']):
if row["connected"]:
self.menu.disconnect_service(row["device"])
else:
elif Adapter(obj_path=row["device"]["Adapter"])["Powered"]:
self.menu.connect_service(row["device"])

if event.type == Gdk.EventType.BUTTON_PRESS and cast(Gdk.EventButton, event).button == 3:
Expand Down

0 comments on commit 359ecea

Please sign in to comment.