mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
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
This commit is contained in:
parent
adf7a6f892
commit
6059c744f8
|
@ -118,8 +118,13 @@ static int get_property_callback(sd_bus_message *msg, void *data,
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
if (sd_bus_message_is_method_error(msg, NULL)) {
|
if (sd_bus_message_is_method_error(msg, NULL)) {
|
||||||
sway_log(SWAY_ERROR, "%s %s: %s", sni->watcher_id, prop,
|
const sd_bus_error *err = sd_bus_message_get_error(msg);
|
||||||
sd_bus_message_get_error(msg)->message);
|
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);
|
ret = sd_bus_message_get_errno(msg);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue