[gnome-panel] fix building with gweather 3.9.2 or newer
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] fix building with gweather 3.9.2 or newer
- Date: Sat, 7 Dec 2013 12:35:41 +0000 (UTC)
commit f9e8250e8c23684a81520acea40ffc499801ae8b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Dec 7 14:35:06 2013 +0200
fix building with gweather 3.9.2 or newer
Fix gnome-panel building when using gweather 3.9.2 or newer. This
fixes bug #711380.
applets/clock/clock-location.c | 10 ++++++----
configure.ac | 5 +++++
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c
index c4748ba..9e263b4 100644
--- a/applets/clock/clock-location.c
+++ b/applets/clock/clock-location.c
@@ -541,10 +541,12 @@ setup_weather_updates (ClockLocation *loc)
priv->weather_timeout = 0;
}
- priv->weather_info =
- gweather_info_new_for_world (priv->world,
- priv->loc,
- GWEATHER_FORECAST_LIST);
+#ifdef HAVE_GWEATHER_3_9_2_OR_NEWER
+ priv->weather_info = gweather_info_new (priv->loc, GWEATHER_FORECAST_LIST);
+#else
+ priv->weather_info = gweather_info_new_for_world (priv->world, priv->loc, GWEATHER_FORECAST_LIST);
+#endif
+
g_signal_connect (priv->weather_info, "updated",
G_CALLBACK (weather_info_updated), loc);
diff --git a/configure.ac b/configure.ac
index 782e10c..d85d6bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,11 @@ PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED glib
AC_SUBST(CLOCK_CFLAGS)
AC_SUBST(CLOCK_LIBS)
+PKG_CHECK_MODULES(GWEATHER, gweather-3.0 >= 3.9.2, HAVE_GWEATHER_3_9_2_OR_NEWER=yes,
HAVE_GWEATHER_3_9_2_OR_NEWER=no)
+if test "x$HAVE_GWEATHER_3_9_2_OR_NEWER" = "xyes" ; then
+ AC_DEFINE(HAVE_GWEATHER_3_9_2_OR_NEWER, 1, [Defined if Gweather version is 3.9.2 or newer])
+fi
+
# Check whether to enable e-d-s support for clock applet
AC_MSG_CHECKING([whether to enable evolution-data-server support])
AC_ARG_ENABLE([eds],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]