Skip to content

Commit

Permalink
status-area: Ignore shortcut field to fix parse error
Browse files Browse the repository at this point in the history
If this has the wrong type, it causes a parse error due to
dbus2/zbus#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.
  • Loading branch information
ids1024 committed Jun 23, 2024
1 parent 41003cc commit 09b2616
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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")]
Expand Down

0 comments on commit 09b2616

Please sign in to comment.