From 817bdbd124116d6784ee3ae37f196b54efceefe5 Mon Sep 17 00:00:00 2001 From: Christopher Schramm Date: Mon, 19 Sep 2022 11:05:22 +0200 Subject: [PATCH] Implement com.canonical.dbusmenu.AboutToShow KDE Plasma expects this method to be implemented. Otherwise it just does not show submenus. Closes #1856 --- CHANGELOG.md | 1 + blueman/main/indicators/StatusNotifierItem.py | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56ca10e82..927ca8292 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ ### Bugs fixed * Issues with NM PANU connections of equally named devices +* Submenus in KDE Plasma tray ## 2.3.1 diff --git a/blueman/main/indicators/StatusNotifierItem.py b/blueman/main/indicators/StatusNotifierItem.py index 650e3c96b..154965f81 100644 --- a/blueman/main/indicators/StatusNotifierItem.py +++ b/blueman/main/indicators/StatusNotifierItem.py @@ -21,6 +21,7 @@ def __init__(self, on_activate_menu_item: "MenuItemActivator") -> None: self.add_method("GetLayout", ("i", "i", "as"), ("u", "(ia{sv}av)"), self._get_layout) self.add_method("Event", ("i", "s", "v", "u"), (), self._on_event) + self.add_method("AboutToShow", ("i",), ("b",), lambda _: self._revision > self._revision_advertised) self.add_method("GetGroupProperties", ("ai", "as"), ("a(ia{sv})",), lambda ids, props: [(idx, self._render_item(item)) for idx, item in self._iterate_items()