[glib] Add more data about origin application to the "Launched" signal.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Add more data about origin application to the "Launched" signal.
- Date: Tue, 8 Feb 2011 04:46:16 +0000 (UTC)
commit d43b2d52b4129bf3eb36af6083063cba8f40cbed
Author: Michal Hruby <michal mhr gmail com>
Date: Mon Feb 7 21:25:33 2011 +0100
Add more data about origin application to the "Launched" signal.
This will help applications such as zeitgeist's datahub to collect
more complete information about application launches, as the "actor"
of a launch is important for zeitgeist's magic to work properly.
gio/gdesktopappinfo.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 1fe5ecf..987f073 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -943,6 +943,7 @@ notify_desktop_launch (GDBusConnection *session_bus,
GVariantBuilder extras_variant;
GList *iter;
const char *desktop_file_id;
+ const char *gio_desktop_file;
if (session_bus == NULL)
return;
@@ -957,6 +958,18 @@ notify_desktop_launch (GDBusConnection *session_bus,
"startup-id",
g_variant_new ("s",
sn_id));
+ gio_desktop_file = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
+ if (gio_desktop_file != NULL)
+ g_variant_builder_add (&extras_variant, "{sv}",
+ "origin-desktop-file",
+ g_variant_new_bytestring (gio_desktop_file));
+ g_variant_builder_add (&extras_variant, "{sv}",
+ "origin-prgname",
+ g_variant_new_bytestring (g_get_prgname ()));
+ g_variant_builder_add (&extras_variant, "{sv}",
+ "origin-pid",
+ g_variant_new ("x",
+ (gint64)getpid ()));
if (info->filename)
desktop_file_id = info->filename;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]