[libnotify] notify: Use the application ID if available to set the fallback app name



commit 1da69964917570a206a886ac6a165f5d42754252
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Mon Apr 25 22:14:22 2022 +0200

    notify: Use the application ID if available to set the fallback app name

 libnotify/notify.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/libnotify/notify.c b/libnotify/notify.c
index bf7d89b..7f72972 100644
--- a/libnotify/notify.c
+++ b/libnotify/notify.c
@@ -151,6 +151,14 @@ notify_init (const char *app_name)
         if (_initted)
                 return TRUE;
 
+#ifdef GLIB_VERSION_2_32
+        if (app_name == NULL && g_application_get_default ()) {
+                GApplication *application = g_application_get_default ();
+
+                app_name = g_application_get_application_id (application);
+        }
+#endif
+
         notify_set_app_name (app_name);
 
 #if !GLIB_CHECK_VERSION (2, 36, 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]