diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2014-01-14 18:12:54 +0000 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2014-01-14 18:34:51 +0000 |
commit | e66ffbfa2278b1fe79d1316c01ff259551efdd96 (patch) | |
tree | 954b931bbe5facebe57f9f8739aa3c2b4319eaf1 /demo/gclue-service-agent.c | |
parent | 4746dd167e1a2223a91c9fe061a83d9b09c564c9 (diff) | |
download | geoclue-e66ffbfa2278b1fe79d1316c01ff259551efdd96.tar.gz |
agent,service-client: Require desktop file ID
Instead of getting a generic title from apps, we now require them to
provide a desktop file id. This will allow agents to add some more
checks and be able to get all info about the app themselves, including a
human-readable title.
Diffstat (limited to 'demo/gclue-service-agent.c')
-rw-r--r-- | demo/gclue-service-agent.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/demo/gclue-service-agent.c b/demo/gclue-service-agent.c index 151032d..8351fb4 100644 --- a/demo/gclue-service-agent.c +++ b/demo/gclue-service-agent.c @@ -230,7 +230,7 @@ typedef struct GDBusMethodInvocation *invocation; NotifyNotification *notification; char *bus_name; - char *title; + char *desktop_id; gboolean authorized; } NotificationData; @@ -238,7 +238,7 @@ static void notification_data_free (NotificationData *data) { g_free (data->bus_name); - g_free (data->title); + g_free (data->desktop_id); g_object_unref (data->notification); g_slice_free (NotificationData, data); } @@ -269,9 +269,9 @@ on_notify_closed (NotifyNotification *notification, NotificationData *data = (NotificationData *) user_data; if (data->authorized) - g_debug ("Authorized %s (%s)", data->title, data->bus_name); + g_debug ("Authorized %s (%s)", data->desktop_id, data->bus_name); else - g_debug ("%s (%s) not authorized", data->title, data->bus_name); + g_debug ("%s (%s) not authorized", data->desktop_id, data->bus_name); gclue_agent_complete_authorize_app (data->agent, data->invocation, data->authorized); @@ -282,7 +282,7 @@ static gboolean gclue_service_agent_handle_authorize_app (GClueAgent *agent, GDBusMethodInvocation *invocation, const char *bus_name, - const char *title) + const char *desktop_id) { NotifyNotification *notification; NotificationData *data; @@ -290,7 +290,7 @@ gclue_service_agent_handle_authorize_app (GClueAgent *agent, char *msg; msg = g_strdup_printf (_("Allow %s to access your location information?"), - title); + desktop_id); notification = notify_notification_new (_("Geolocation"), msg, "dialog-question"); g_free (msg); @@ -298,7 +298,7 @@ gclue_service_agent_handle_authorize_app (GClueAgent *agent, data->invocation = invocation; data->notification = notification; data->bus_name = g_strdup (bus_name); - data->title = g_strdup (title); + data->desktop_id = g_strdup (desktop_id); notify_notification_add_action (notification, ACTION_YES, |