diff options
author | Niels De Graef <nielsdegraef@gmail.com> | 2017-12-29 02:56:19 +0100 |
---|---|---|
committer | Niels De Graef <nielsdegraef@gmail.com> | 2017-12-29 02:56:19 +0100 |
commit | f09c7b15b33b0fc52a7fae1afbbcd1ee48aa6307 (patch) | |
tree | a05076a1550679098526cc64c73a4903b6815eb4 /src/contacts-contact.vala | |
parent | a03654fc0628b8324eb9efa855d55971388f6ee0 (diff) | |
download | gnome-contacts-f09c7b15b33b0fc52a7fae1afbbcd1ee48aa6307.tar.gz |
Keep all the Geocode and Map stuff in one place.
Diffstat (limited to 'src/contacts-contact.vala')
-rw-r--r-- | src/contacts-contact.vala | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala index e2ac68b..17f290a 100644 --- a/src/contacts-contact.vala +++ b/src/contacts-contact.vala @@ -19,7 +19,6 @@ using Gtk; using Folks; using Gee; -using Geocode; public errordomain ContactError { NOT_IMPLEMENTED, @@ -271,39 +270,6 @@ public class Contacts.Contact : GLib.Object { return res; } - public static async Place geocode_address (PostalAddress addr) { - SourceFunc callback = geocode_address.callback; - var params = new HashTable<string, GLib.Value?>(str_hash, str_equal); - - if (is_set (addr.street)) - params.insert("street", addr.street); - - if (is_set (addr.locality)) - params.insert("locality", addr.locality); - - if (is_set (addr.region)) - params.insert("region", addr.region); - - if (is_set (addr.country)) - params.insert("country", addr.country); - - Place? place = null; - var forward = new Forward.for_params (params); - forward.search_async.begin (null, (object, res) => { - try { - var places = forward.search_async.end (res); - - place = places.nth_data (0); - callback (); - } catch (GLib.Error e) { - debug ("No geocode result found for contact"); - callback (); - } - }); - yield; - return place; - } - public static string[] format_address (PostalAddress addr) { string[] lines = {}; |