diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-03-17 04:49:04 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-03-17 04:49:04 -0400 |
| commit | 250b79735b3e72115c278faf2cf467d297540c23 (patch) | |
| tree | 0589d8bc080b9a0a42410d82117cd73b72449aa9 /swaybar | |
| parent | 461eb0a4d3d792938de96f2538e918c4d0e359fa (diff) | |
swaybar: silence missing IconThemePath message
IconThemePath is not a standard property in XDG's StatusNotifierItem
specification, so missing this property should not be logged as an error.
This patch changes the log level to SWAY_DEBUG when swaybar queries the
value of IconThemePath so that swaybar won't log the returned message as
an error if IconThemePath does not exist.
Closes: https://github.com/swaywm/sway/issues/6092
Diffstat (limited to 'swaybar')
| -rw-r--r-- | swaybar/tray/item.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c index a5660f62..c9da51d4 100644 --- a/swaybar/tray/item.c +++ b/swaybar/tray/item.c @@ -118,8 +118,13 @@ static int get_property_callback(sd_bus_message *msg, void *data, int ret; if (sd_bus_message_is_method_error(msg, NULL)) { - sway_log(SWAY_ERROR, "%s %s: %s", sni->watcher_id, prop, - sd_bus_message_get_error(msg)->message); + const sd_bus_error *err = sd_bus_message_get_error(msg); + sway_log_importance_t log_lv = SWAY_ERROR; + if ((!strcmp(prop, "IconThemePath")) && + (!strcmp(err->name, SD_BUS_ERROR_UNKNOWN_PROPERTY))) { + log_lv = SWAY_DEBUG; + } + sway_log(log_lv, "%s %s: %s", sni->watcher_id, prop, err->message); ret = sd_bus_message_get_errno(msg); goto cleanup; } |
