[gnome-panel/wip/applets/clock] clock: add function to serialize ClockLocation
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/applets/clock] clock: add function to serialize ClockLocation
- Date: Sat, 15 Nov 2014 01:52:29 +0000 (UTC)
commit 4c12b6dd7941a2cba19d920aa95e56f2d1618168
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Nov 15 03:46:19 2014 +0200
clock: add function to serialize ClockLocation
applets/clock/clock-location.c | 15 +++++++++++++++
applets/clock/clock-location.h | 2 ++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c
index f914ee2..5b696c4 100644
--- a/applets/clock/clock-location.c
+++ b/applets/clock/clock-location.c
@@ -775,3 +775,18 @@ clock_location_equal (ClockLocation *location1,
return FALSE;
}
+
+GVariant *
+clock_location_serialize (ClockLocation *location)
+{
+ ClockLocationPrivate *priv;
+
+ priv = location->priv;
+
+ return g_variant_new ("(ssm(dd))",
+ priv->name,
+ gweather_location_get_code (priv->loc),
+ TRUE,
+ priv->latitude,
+ priv->longitude);
+}
diff --git a/applets/clock/clock-location.h b/applets/clock/clock-location.h
index 9d14895..b7320c8 100644
--- a/applets/clock/clock-location.h
+++ b/applets/clock/clock-location.h
@@ -113,6 +113,8 @@ gboolean clock_location_setup_weather_tooltip (ClockLocation *locati
gboolean clock_location_equal (ClockLocation *location1,
ClockLocation *location2);
+GVariant *clock_location_serialize (ClockLocation *location);
+
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]