[gnome-internet-radio-locator] Reverse lookup with city accuracy with the geocode-glib-1.0 library
- From: ole <ole src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-internet-radio-locator] Reverse lookup with city accuracy with the geocode-glib-1.0 library
- Date: Sun, 13 Aug 2017 11:14:56 +0000 (UTC)
commit 846fb1874a3d681cb15d509e4b700b6b07bd948f
Author: Ole Aamot <oka oka no>
Date: Sun Aug 13 13:14:13 2017 +0200
Reverse lookup with city accuracy with the geocode-glib-1.0 library
NEWS | 8 ++++++
configure.ac | 5 ++-
gnome-internet-radio-locator.spec.in | 40 +++++++++++++++++----------------
src/gnome-internet-radio-locator.c | 17 ++++++++++----
4 files changed, 44 insertions(+), 26 deletions(-)
---
diff --git a/NEWS b/NEWS
index 5681d0e..738df48 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,12 @@
=============
+Version 0.8.0
+=============
+
+GUI
+ * configure.ac: Require geocode-glib-1.0
+ * src/gnome-internet-radio-locator.c: Reverse geocode with city accuracy
+
+=============
Version 0.7.0
=============
diff --git a/configure.ac b/configure.ac
index 514c14a..d2d30cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT(gnome-internet-radio-locator,0.7.0)
+AC_INIT(gnome-internet-radio-locator,0.8.0)
AM_INIT_AUTOMAKE([-Wno-portability 1.11 no-dist-gzip dist-xz tar-ustar subdir-objects])
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/gnome-internet-radio-locator.c])
@@ -70,12 +70,13 @@ PKG_CHECK_MODULES(GNOME_INTERNET_RADIO_LOCATOR,
pangoft2 >= 0.28 \
champlain-gtk-0.12 >= 0.12.10 \
libxml-2.0 >= 2.0 \
+ geocode-glib-1.0 >= 3.20 \
gstreamer-tag-1.0 >= 1.0 \
gstreamer-1.0 >= 1.0 \
gstreamer-player-1.0 >= 1.0 \
gstreamer-video-1.0)
-GNOME_INTERNET_RADIO_LOCATOR_PKG_DEPS="gtk+-3.0 glib-2.0 gobject-2.0 pangoft2 champlain-gtk-0.12 libxml-2.0,
gstreamer-1.0 gstreamer-player-1.0 gstreamer-video-1.0"
+GNOME_INTERNET_RADIO_LOCATOR_PKG_DEPS="geocode-glib-1.0 gtk+-3.0 glib-2.0 gobject-2.0 pangoft2
champlain-gtk-0.12 libxml-2.0, gstreamer-1.0 gstreamer-player-1.0 gstreamer-video-1.0"
GTK_DOC_CHECK([1.16], [--flavour no-tmpl])
diff --git a/gnome-internet-radio-locator.spec.in b/gnome-internet-radio-locator.spec.in
index 7ec87b9..d81e12f 100644
--- a/gnome-internet-radio-locator.spec.in
+++ b/gnome-internet-radio-locator.spec.in
@@ -15,11 +15,13 @@ BuildRequires: intltool
BuildRequires: itstool
BuildRequires: libappstream-glib
BuildRequires: desktop-file-utils
+BuildRequires: geocode-glib-devel
BuildRequires: gstreamer-devel
BuildRequires: gstreamer1-plugins-bad-free-devel
BuildRequires: gstreamer1-plugins-base-devel
Requires: gstreamer1 >= 1.8.3
-Requires: gstreamer1-plugins-ugly >= 1.8.3
+Requires: gstreamer1-plugins-ugly-free >= 1.8.3
+Requires: geocode-glib >= 3.20.1
%description
GNOME Internet Radio Locator is a Free Software program that allows
@@ -47,14 +49,12 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
-/usr/bin/update-desktop-database &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
-/usr/bin/update-desktop-database &> /dev/null || :
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
@@ -69,50 +69,52 @@ fi
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_mandir}/man1/%{name}.1*
-# %{_datadir}/help/*/%{name}
%changelog
-* Fri Aug 04 2017 Ole Aamot - 0.7.0-1.fc26
+* Sat Aug 12 2017 Ole Aamot <ole gnome org> - 0.8.0-1
+- gnome-internet-radio-locator 0.8.0 build on Fedora Linux 26
+
+* Fri Aug 04 2017 Ole Aamot <ole gnome org> - 0.7.0-1
- gnome-internet-radio-locator 0.7.0 build on Fedora Linux 26
-* Wed Aug 02 2017 Ole Aamot - 0.6.2-1.fc26
+* Wed Aug 02 2017 Ole Aamot <ole gnome org> - 0.6.2-1
- gnome-internet-radio-locator 0.6.2 build on Fedora Linux 26
-* Tue Aug 01 2017 Ole Aamot - 0.6.1-1.fc26
+* Tue Aug 01 2017 Ole Aamot <ole gnome org> - 0.6.1-1
- gnome-internet-radio-locator 0.6.1 build on Fedora Linux 26
-* Wed Jul 19 2017 Ole Aamot - 0.6.0-1.fc25
+* Wed Jul 19 2017 Ole Aamot <ole gnome org> - 0.6.0-1
- gnome-internet-radio-locator 0.6.0 build on Fedora Linux 25
-* Tue Jul 18 2017 Ole Aamot - 0.5.3-1.fc25
+* Tue Jul 18 2017 Ole Aamot <ole gnome org> - 0.5.3-1
- gnome-internet-radio-locator 0.5.3 build on Fedora Linux 25
-* Tue Jul 18 2017 Ole Aamot - 0.5.2-1.fc25
+* Tue Jul 18 2017 Ole Aamot <ole gnome org> - 0.5.2-1
- gnome-internet-radio-locator 0.5.2 build on Fedora Linux 25
-* Mon Jul 17 2017 Ole Aamot - 0.5.1-1.fc25
+* Mon Jul 17 2017 Ole Aamot <ole gnome org> - 0.5.1-1
- gnome-internet-radio-locator 0.5.1 build on Fedora Linux 25
-* Sun Jul 09 2017 Ole Aamot - 0.5.0-1.fc25
+* Sun Jul 09 2017 Ole Aamot <ole gnome org> - 0.5.0-1
- gnome-internet-radio-locator 0.5.0 build on Fedora Linux 25
-* Tue Jun 27 2017 Ole Aamot - 0.4.0-1.fc25
+* Tue Jun 27 2017 Ole Aamot <ole gnome org> - 0.4.0-1
- gnome-internet-radio-locator 0.4.0 build on Fedora Linux 25
-* Sun Jun 18 2017 Ole Aamot - 0.3.0-1.fc25
+* Sun Jun 18 2017 Ole Aamot <ole gnome org> - 0.3.0-1
- gnome-internet-radio-locator 0.3.0 build on Fedora Linux 25
-* Sat Jun 17 2017 Ole Aamot - 0.2.1-1.fc25
+* Sat Jun 17 2017 Ole Aamot <ole gnome org> - 0.2.1-1
- gnome-internet-radio-locator 0.2.1 build on Fedora Linux 25
-* Fri Jun 16 2017 Ole Aamot - 0.2.0-1.fc25
+* Fri Jun 16 2017 Ole Aamot <ole gnome org> - 0.2.0-1
- gnome-internet-radio-locator 0.2.0 build on Fedora Linux 25
-* Thu Apr 27 2017 Ole Aamot - 0.1.2-1.fc25
+* Thu Apr 27 2017 Ole Aamot <ole gnome org> - 0.1.2-1
- gnome-internet-radio-locator 0.1.2 build on Fedora Linux 25
-* Thu Apr 27 2017 Ole Aamot - 0.1.1-1.fc25
+* Thu Apr 27 2017 Ole Aamot <ole gnome org> - 0.1.1-1
- gnome-internet-radio-locator 0.1.1 build on Fedora Linux 25
-* Wed Apr 26 2017 Ole Aamot - 0.1.0-1.fc25
+* Wed Apr 26 2017 Ole Aamot <ole gnome org> - 0.1.0-1
- gnome-internet-radio-locator 0.1.0 build on Fedora Linux 25
diff --git a/src/gnome-internet-radio-locator.c b/src/gnome-internet-radio-locator.c
index 97ae80d..27ac361 100644
--- a/src/gnome-internet-radio-locator.c
+++ b/src/gnome-internet-radio-locator.c
@@ -25,6 +25,7 @@
#include <champlain/champlain.h>
#include <champlain-gtk/champlain-gtk.h>
#include <clutter-gtk/clutter-gtk.h>
+#include <geocode-glib/geocode-glib.h>
#include <glib/gstdio.h>
#include <string.h>
@@ -110,17 +111,23 @@ toggle_layer (GtkToggleButton *widget,
static gboolean
mouse_click_cb (ClutterActor *actor, ClutterButtonEvent *event, ChamplainView *view)
{
+ GError **error;
gdouble lat, lon;
- /* GeocodeNominatim *nom; */
+ GeocodePlace *place;
+ GeocodeLocation *location;
+ GeocodeReverse *reverse;
+ const char *name;
/* GeocodeForward *fwd; */
/* GList *list; */
/* GError **err; */
lon = champlain_view_x_to_longitude (view, event->x);
lat = champlain_view_y_to_latitude (view, event->y);
- /* fwd = geocode_forward_new_for_string ("Oslo, Norway"); */
- /* list = geocode_forward_search (fwd, err); */
- /* gnome_internet_radio_locator_radius (lat, lon, 100); */
- g_print ("Mouse click at: %f %f\n", lat, lon);
+ location = geocode_location_new (lat, lon, GEOCODE_LOCATION_ACCURACY_CITY);
+ reverse = geocode_reverse_new_for_location (location);
+ place = geocode_reverse_resolve (reverse, error);
+ name = geocode_place_get_town (place);
+ gtk_entry_set_text(GTK_ENTRY(input),(gchar *)name);
+ g_print ("Mouse click at: %f %f (%s)\n", lat, lon, name);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]