aboutsummaryrefslogtreecommitdiff
path: root/src/timezone-geoclue.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-09-03 17:22:46 -0500
committerTed Gould <ted@gould.cx>2013-09-03 17:22:46 -0500
commite52036bc485871c70e1f3f651680587bc796809c (patch)
tree1e119c9c7fe38dbd6446437e5449d5333dcde9e9 /src/timezone-geoclue.c
parentf47b93edd44b7eb7525f704e7801985e895716c6 (diff)
downloadayatana-indicator-datetime-e52036bc485871c70e1f3f651680587bc796809c.tar.gz
ayatana-indicator-datetime-e52036bc485871c70e1f3f651680587bc796809c.tar.bz2
ayatana-indicator-datetime-e52036bc485871c70e1f3f651680587bc796809c.zip
Add a signal handler for the slightly different prototype.
Diffstat (limited to 'src/timezone-geoclue.c')
-rw-r--r--src/timezone-geoclue.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/timezone-geoclue.c b/src/timezone-geoclue.c
index 239ac50..f7dcf5c 100644
--- a/src/timezone-geoclue.c
+++ b/src/timezone-geoclue.c
@@ -77,6 +77,18 @@ on_address_changed (GeoclueAddress * address G_GNUC_UNUSED,
}
}
+/* The signal doesn't have the parameter for an error, so it ends up needing
+ a NULL inserted. */
+static void
+on_address_changed_sig (GeoclueAddress * address G_GNUC_UNUSED,
+ int timestamp G_GNUC_UNUSED,
+ GHashTable * addy_data,
+ GeoclueAccuracy * accuracy G_GNUC_UNUSED,
+ gpointer gself)
+{
+ return on_address_changed(address, timestamp, addy_data, accuracy, NULL, gself);
+}
+
static void
on_address_created (GeoclueMasterClient * master G_GNUC_UNUSED,
GeoclueAddress * address,
@@ -95,7 +107,7 @@ on_address_created (GeoclueMasterClient * master G_GNUC_UNUSED,
p->address = g_object_ref (address);
geoclue_address_get_address_async (address, on_address_changed, gself);
- g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed), gself);
+ g_signal_connect (address, "address-changed", G_CALLBACK(on_address_changed_sig), gself);
}
}
@@ -161,7 +173,7 @@ geo_stop (IndicatorDatetimeTimezoneGeoclue * self)
if (p->address != NULL)
{
- g_signal_handlers_disconnect_by_func (p->address, on_address_changed, self);
+ g_signal_handlers_disconnect_by_func (p->address, on_address_changed_sig, self);
g_clear_object (&p->address);
}