[gnome-panel/wip/applets/clock] clock: add function to compare two 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 compare two ClockLocation
- Date: Sat, 15 Nov 2014 01:52:24 +0000 (UTC)
commit 7f5b686bd6343f9c5985aeeeeb72a6b915ef45fe
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Nov 15 03:21:47 2014 +0200
clock: add function to compare two ClockLocation
applets/clock/clock-location.c | 13 +++++++++++++
applets/clock/clock-location.h | 3 +++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c
index 6df798c..f914ee2 100644
--- a/applets/clock/clock-location.c
+++ b/applets/clock/clock-location.c
@@ -762,3 +762,16 @@ clock_location_setup_weather_tooltip (ClockLocation *location,
return TRUE;
}
+
+gboolean
+clock_location_equal (ClockLocation *location1,
+ ClockLocation *location2)
+{
+ if (g_strcmp0 (location1->priv->name, location2->priv->name) == 0 &&
+ location1->priv->latitude == location2->priv->latitude &&
+ location1->priv->longitude == location2->priv->longitude &&
+ gweather_location_equal (location1->priv->loc, location2->priv->loc))
+ return TRUE;
+
+ return FALSE;
+}
diff --git a/applets/clock/clock-location.h b/applets/clock/clock-location.h
index 1aad78c..9d14895 100644
--- a/applets/clock/clock-location.h
+++ b/applets/clock/clock-location.h
@@ -110,6 +110,9 @@ GDesktopClockFormat clock_location_get_clock_format (ClockLocation *locati
gboolean clock_location_setup_weather_tooltip (ClockLocation *location,
GtkTooltip *tip);
+gboolean clock_location_equal (ClockLocation *location1,
+ ClockLocation *location2);
+
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]