Skip to content

Commit

Permalink
PowerManager: Add back the BluetoothStatusChanged signal
Browse files Browse the repository at this point in the history
fixes #2318
  • Loading branch information
infirit committed Apr 3, 2024
1 parent 35e87d0 commit b9bbf30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blueman/plugins/applet/PowerManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def on_load(self) -> None:

self.request_in_progress = False

self._add_dbus_signal("BluetoothStatusChanged", "b")
self._add_dbus_method("SetBluetoothStatus", ("b",), "", self.request_power_state)
self._add_dbus_method("GetBluetoothStatus", (), "b", self.get_bluetooth_status)

Expand Down Expand Up @@ -163,6 +164,7 @@ def update_power_state(self) -> None:
logging.info(f"Signalling {new_state}")
self.current_state = new_state

self._emit_dbus_signal("BluetoothStatusChanged", new_state)
for plugin in self.parent.Plugins.get_loaded_plugins(PowerStateListener):
plugin.on_power_state_changed(self, new_state)

Expand Down

0 comments on commit b9bbf30

Please sign in to comment.