status-area: Ignore shortcut field to fix parse error

If this has the wrong type, it causes a parse error due to
https://github.com/dbus2/zbus/issues/856.

This fixes the status icon for Slack, and probably other applications.
Not sure how this field is defined in general, but with Slack it is
an `aas`.

`gnome-shell-extension-appindicator` doesn't seem to use the `shortcut`
field either.
This commit is contained in:
Ian Douglas Scott 2024-06-22 19:24:18 -07:00 committed by Jeremy Soller
parent 3641bf8bce
commit 1370558546

View file

@ -156,7 +156,10 @@ pub struct LayoutProps {
#[zvariant(rename = "icon-name")]
icon_name: Option<String>,
disposition: Option<String>,
shortcut: Option<String>,
// If this field has a different type, this causes the whole type to fail
// to parse, due to a zvariant bug.
// https://github.com/dbus2/zbus/issues/856
// shortcut: Option<String>,
}
impl zvariant::Type for LayoutProps {
@ -218,10 +221,6 @@ impl Layout {
pub fn disposition(&self) -> Option<&str> {
self.1.disposition.as_deref()
}
pub fn shortcut(&self) -> Option<&str> {
self.1.shortcut.as_deref()
}
}
#[zbus::proxy(interface = "com.canonical.dbusmenu")]