[gnome-bluetooth] Implement remove in the geoclue plugin
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-bluetooth] Implement remove in the geoclue plugin
- Date: Wed, 24 Jun 2009 10:47:16 +0000 (UTC)
commit d625b880557cf2453380a285f75567f02cf43ce1
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jun 24 11:46:16 2009 +0100
Implement remove in the geoclue plugin
lib/plugins/geoclue.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/lib/plugins/geoclue.c b/lib/plugins/geoclue.c
index 7ae83d5..52658fe 100644
--- a/lib/plugins/geoclue.c
+++ b/lib/plugins/geoclue.c
@@ -182,7 +182,21 @@ get_config_widgets (const char *bdaddr, const char **uuids)
static void
device_removed (const char *bdaddr)
{
- g_message ("Device '%s' got removed", bdaddr);
+ GConfClient *client;
+ char *str;
+
+ client = gconf_client_get_default ();
+ if (client == NULL)
+ return;
+
+ str = gconf_client_get_string (client, GPS_KEY, NULL);
+ if (g_strcmp0 (str, bdaddr) == 0) {
+ gconf_client_set_string (client, GPS_KEY, "", NULL);
+ g_message ("Device '%s' got disabled as a Geoclue GPS", bdaddr);
+ }
+
+ g_free (str);
+ g_object_unref (client);
}
static GbtPluginInfo plugin_info = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]