diff --git a/blueman/plugins/applet/DisconnectItems.py b/blueman/plugins/applet/DisconnectItems.py index 3ebc6d27c..13a585c0c 100644 --- a/blueman/plugins/applet/DisconnectItems.py +++ b/blueman/plugins/applet/DisconnectItems.py @@ -35,8 +35,8 @@ def on_device_property_changed(self, path: str, key: str, value: Any) -> None: self._render() def _render(self) -> None: - for device in self.parent.Manager.get_devices(): + for idx, device in enumerate(self.parent.Manager.get_devices()): if device["Connected"]: - self._menu.add(self, 25, text=_("Disconnect %s") % device["Alias"], + self._menu.add(self, (25, idx), text=_("Disconnect %s") % device["Alias"], icon_name="bluetooth-disconnected-symbolic", callback=lambda dev=device: dev.disconnect()) diff --git a/blueman/plugins/applet/PulseAudioProfile.py b/blueman/plugins/applet/PulseAudioProfile.py index c6c0fdd7a..097a3609a 100644 --- a/blueman/plugins/applet/PulseAudioProfile.py +++ b/blueman/plugins/applet/PulseAudioProfile.py @@ -77,7 +77,7 @@ def _generate_profiles_menu(info: "CardInfo") -> List["SubmenuItemDict"]: return items info = self._devices[device['Address']] - menu = self._menu.add(self, 42, _("Audio Profiles for %s") % device['Alias'], + menu = self._menu.add(self, (42, info["index"]), _("Audio Profiles for %s") % device['Alias'], icon_name="audio-card-symbolic", submenu_function=lambda: _generate_profiles_menu(info)) self._device_menus[device['Address']] = menu