Updating branch refs/heads/master to 3ca9ea6a646d83d01ad21e282bef005816bc2223 (commit) from 530b200ccc07e54acff6f77e5029a100dc348111 (commit)
commit 3ca9ea6a646d83d01ad21e282bef005816bc2223 Author: Harald Judt <h.j...@gmx.at> Date: Thu Nov 29 10:51:56 2012 +0100 Create configure option for GeoNames. README | 13 +++++++++++++ configure.ac.in | 10 ++++++++++ panel-plugin/Makefile.am | 1 + panel-plugin/weather-config.c | 1 - 4 files changed, 24 insertions(+), 1 deletions(-) diff --git a/README b/README index 77a01b2..1c080b8 100644 --- a/README +++ b/README @@ -30,6 +30,19 @@ up a forecast and details page. Right-clicking opens the contextual menu. +INFORMATION FOR PACKAGE MAINTAINERS AND DISTRIBUTORS +========================================================================== +If you're going to distribute this package, please be so kind and set +the GEONAMES_USERNAME configure option for the GeoNames web service +which is used for altitude detection. GeoNames requires you to +register an account and limits requests on a per-hour and per-day +basis to prevent misuse of their service. There are no other +restrictions and registration is free, uncomplicated and takes less +than a minute (http://www.geonames.org/export/web-services.html). +Performing these steps will ensure the altitude detection continues +to work for all users of the plugin. + + MET.NO API DOCUMENTATION ========================================================================== To get a quick overview, please consolidate the met.no API weather diff --git a/configure.ac.in b/configure.ac.in index 5bb6038..f7136af 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -69,6 +69,16 @@ XDT_CHECK_PACKAGE([SOUP], [libsoup-2.4], [2.26.0]) AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv]) AC_SUBST(LIBRESOLV) +dnl ************************************ +dnl *** Special compile time options *** +dnl ************************************ +AC_ARG_VAR([GEONAMES_USERNAME], [Username for the GeoNames webservice. + Please register your own if you're going to distribute the + package, as requests are limited per hour and day. + See README for further information.]) +AS_IF([test "x$GEONAMES_USERNAME" = x], [GEONAMES_USERNAME="xfce4weatherplugin"]) + + dnl *********************************** dnl *** Check for debugging support *** dnl *********************************** diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index 672424e..fcd086f 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -1,6 +1,7 @@ INCLUDES = \ -I$(top_srcdir) \ -DTHEMESDIR=\"$(datadir)/xfce4/weather/icons\" \ + -DGEONAMES_USERNAME=\"@GEONAMES_USERNAME@\" \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DG_LOG_DOMAIN=\"weather\" diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c index a9d8463..248e1f5 100644 --- a/panel-plugin/weather-config.c +++ b/panel-plugin/weather-config.c @@ -31,7 +31,6 @@ #include "weather-search.h" #include "weather-scrollbox.h" -#define GEONAMES_USERNAME "xfce4weatherplugin" #define UPDATE_TIMER_DELAY 7 #define OPTIONS_N 13 #define BORDER 4 _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits