[libgweather] [libgweather] Add gweather_timezone_get_utc() to get the UTC timezone
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgweather] [libgweather] Add gweather_timezone_get_utc() to get the UTC timezone
- Date: Wed, 12 Aug 2009 09:02:15 +0000 (UTC)
commit c1167da58c5c31952bc2ef276af6b4cfa5293da0
Author: Vincent Untz <vuntz gnome org>
Date: Wed Aug 12 01:59:23 2009 +0200
[libgweather] Add gweather_timezone_get_utc() to get the UTC timezone
libgweather/gweather-timezone.c | 24 ++++++++++++++++++++++++
libgweather/gweather-timezone.h | 2 ++
po/POTFILES.in | 1 +
3 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/libgweather/gweather-timezone.c b/libgweather/gweather-timezone.c
index c17d192..79a4192 100644
--- a/libgweather/gweather-timezone.c
+++ b/libgweather/gweather-timezone.c
@@ -27,6 +27,7 @@
#define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
#include "gweather-timezone.h"
#include "parser.h"
+#include "weather-priv.h"
/**
* GWeatherTimezone:
@@ -296,6 +297,29 @@ gweather_timezone_get_type (void)
}
/**
+ * gweather_timezone_get_utc:
+ *
+ * Gets the UTC timezone.
+ *
+ * Return value: a #GWeatherTimezone for UTC, or %NULL on error.
+ **/
+GWeatherTimezone *
+gweather_timezone_get_utc (void)
+{
+ GWeatherTimezone *zone = NULL;
+
+ zone = g_slice_new0 (GWeatherTimezone);
+ zone->ref_count = 1;
+ zone->id = g_strdup ("GMT");
+ zone->name = g_strdup (_("Greenwich Mean Time"));
+ zone->offset = 0;
+ zone->has_dst = FALSE;
+ zone->dst_offset = 0;
+
+ return zone;
+}
+
+/**
* gweather_timezone_get_name:
* @zone: a #GWeatherTimezone
*
diff --git a/libgweather/gweather-timezone.h b/libgweather/gweather-timezone.h
index 100a564..220223a 100644
--- a/libgweather/gweather-timezone.h
+++ b/libgweather/gweather-timezone.h
@@ -43,6 +43,8 @@ int gweather_timezone_get_dst_offset (GWeatherTimezone *zone);
GWeatherTimezone *gweather_timezone_ref (GWeatherTimezone *zone);
void gweather_timezone_unref (GWeatherTimezone *zone);
+GWeatherTimezone *gweather_timezone_get_utc (void);
+
G_END_DECLS
#endif /* __GWEATHER_TIMEZONE_H__ */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index d43f77b..4aa2bf5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,6 +4,7 @@
[encoding: UTF-8]
libgweather/gweather-gconf.c
libgweather/gweather-prefs.c
+libgweather/gweather-timezone.c
libgweather/gweather.schemas.in
libgweather/timezone-menu.c
libgweather/weather-iwin.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]