Merge branch 'wip/tintou/send-app-id' into 'master'
Send the application ID when possible See merge request GNOME/libnotify!1
This commit is contained in:
commit
7c711f8a8a
|
@ -634,6 +634,9 @@ notify_notification_show (NotifyNotification *notification,
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
gpointer key, data;
|
gpointer key, data;
|
||||||
GVariant *result;
|
GVariant *result;
|
||||||
|
#ifdef GLIB_VERSION_2_32
|
||||||
|
GApplication *application;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_return_val_if_fail (notification != NULL, FALSE);
|
g_return_val_if_fail (notification != NULL, FALSE);
|
||||||
g_return_val_if_fail (NOTIFY_IS_NOTIFICATION (notification), FALSE);
|
g_return_val_if_fail (NOTIFY_IS_NOTIFICATION (notification), FALSE);
|
||||||
|
@ -668,6 +671,17 @@ notify_notification_show (NotifyNotification *notification,
|
||||||
g_variant_builder_add (&hints_builder, "{sv}", key, data);
|
g_variant_builder_add (&hints_builder, "{sv}", key, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GLIB_VERSION_2_32
|
||||||
|
application = g_application_get_default ();
|
||||||
|
if (application != NULL) {
|
||||||
|
GVariant *desktop_entry = g_hash_table_lookup (priv->hints, "desktop-entry");
|
||||||
|
if (desktop_entry == NULL) {
|
||||||
|
g_variant_builder_add (&hints_builder, "{sv}", "desktop-entry",
|
||||||
|
g_variant_new_string (g_application_get_application_id (application)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* TODO: make this nonblocking */
|
/* TODO: make this nonblocking */
|
||||||
result = g_dbus_proxy_call_sync (proxy,
|
result = g_dbus_proxy_call_sync (proxy,
|
||||||
"Notify",
|
"Notify",
|
||||||
|
|
Loading…
Reference in New Issue