From 75526dbc76fe71c95a86aa2daa0cd9f9b8d514e9 Mon Sep 17 00:00:00 2001 From: Zsolt Foldvari Date: Wed, 6 Dec 2006 23:31:54 +0000 Subject: [PATCH] 2006-12-07 Zsolt Foldvari * src/DataViews/_PlaceView.py (google): Use city, country of main location in google query. svn: r7766 --- ChangeLog | 4 ++++ src/DataViews/_PlaceView.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index c94c612f9..0c7a5e171 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-12-07 Zsolt Foldvari + * src/DataViews/_PlaceView.py (google): Use city, country of main + location in google query. + 2006-12-06 Alex Roitman * src/Makefile.am (gdir_PYTHON): Ship new file. diff --git a/src/DataViews/_PlaceView.py b/src/DataViews/_PlaceView.py index 76b07fa80..1f54d6215 100644 --- a/src/DataViews/_PlaceView.py +++ b/src/DataViews/_PlaceView.py @@ -147,9 +147,13 @@ class PlaceView(PageView.ListView): longitude = place.get_longitude() latitude = place.get_latitude() latitude,longitude = conv_lat_lon(latitude,longitude,"D.D8") + city = place.get_main_location().get_city() + country = place.get_main_location().get_country() if longitude and latitude: path = "http://maps.google.com/?sll=%s,%s&z=15" % (latitude,longitude) + elif city and country: + path = "http://maps.google.com/maps?q=%s,%s" % (city,country) else: path = "http://maps.google.com/maps?q=%s" % '+'.join(descr.split()) GrampsDisplay.url(path)