[libnotify] notification: Improve debug logs when rewriting paths
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnotify] notification: Improve debug logs when rewriting paths
- Date: Mon, 25 Apr 2022 17:13:53 +0000 (UTC)
commit 0d86d8c8d5c7154fd68871d63c49253db3da44ed
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Fri Apr 22 00:52:41 2022 +0200
notification: Improve debug logs when rewriting paths
libnotify/notification.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/libnotify/notification.c b/libnotify/notification.c
index c2d2c72..d3e3b6f 100644
--- a/libnotify/notification.c
+++ b/libnotify/notification.c
@@ -597,10 +597,6 @@ try_prepend_snap_desktop (NotifyNotification *notification,
ret = g_strdup_printf ("%s_%s", priv->snap_name, desktop);
}
- if (ret) {
- g_debug ("Using snap ID: %s", ret);
- }
-
return ret;
}
@@ -1015,6 +1011,7 @@ typedef gchar * (*StringParserFunc) (NotifyNotification *, const gchar *);
static GVariant *
get_parsed_variant (NotifyNotification *notification,
+ const char *key,
GVariant *variant,
StringParserFunc str_parser)
{
@@ -1022,6 +1019,8 @@ get_parsed_variant (NotifyNotification *notification,
gchar *parsed = str_parser (notification, str);
if (parsed != NULL && g_strcmp0 (str, parsed) != 0) {
+ g_debug ("Hint %s updated in snap environment: '%s' -> '%s'\n",
+ key, str, parsed);
g_variant_unref (variant);
variant = g_variant_new_take_string (parsed);
}
@@ -1039,12 +1038,14 @@ maybe_parse_snap_hint_value (NotifyNotification *notification,
if (g_strcmp0 (key, "desktop-entry") == 0) {
value = get_parsed_variant (notification,
+ key,
value,
try_prepend_snap_desktop);
} else if (g_strcmp0 (key, "image-path") == 0 ||
g_strcmp0 (key, "image_path") == 0 ||
g_strcmp0 (key, "sound-file") == 0) {
value = get_parsed_variant (notification,
+ key,
value,
try_prepend_snap);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]