[gnome-contacts] Don't show a map for an address.



commit de836febcd677d3283438f286727af96b19f305a
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Fri Jan 19 11:57:01 2018 +0100

    Don't show a map for an address.
    
    * It crashed on X
    * It didn't render properly on Wayland
    * There are privacy issues

 configure                       |    2 +-
 data/contacts.gresource.xml     |    1 -
 data/ui/contacts-address-map.ui |   40 -------
 meson.build                     |    7 -
 po/POTFILES.in                  |    1 -
 src/contacts-address-map.vala   |  248 ---------------------------------------
 src/contacts-contact-sheet.vala |   19 +---
 src/meson.build                 |    6 -
 8 files changed, 4 insertions(+), 320 deletions(-)
---
diff --git a/configure b/configure
index c3b94ac..aa5f08a 100755
--- a/configure
+++ b/configure
@@ -15,7 +15,7 @@ shopt -s extglob
 # ====================
 DIRECTORY_OPTIONS='--@(prefix|bindir|sbindir|libexecdir|datadir|sysconfdir|libdir|mandir|includedir)'
 # Keep this in sync with meson_options.txt
-PROJECT_OPTIONS='--@(with-cheese|maps|telepathy|with-manpage)'
+PROJECT_OPTIONS='--@(with-cheese|telepathy|with-manpage)'
 
 # The configurable option values
 declare -A option_values
diff --git a/data/contacts.gresource.xml b/data/contacts.gresource.xml
index f652c91..9d47d58 100644
--- a/data/contacts.gresource.xml
+++ b/data/contacts.gresource.xml
@@ -5,7 +5,6 @@
     <file compressed="true" preprocess="xml-stripblanks">gtk/menus.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">ui/contacts-accounts-list.ui</file>
-    <file compressed="true" preprocess="xml-stripblanks">ui/contacts-address-map.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">ui/contacts-avatar-selector.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">ui/contacts-contact-editor.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">ui/contacts-contact-pane.ui</file>
diff --git a/meson.build b/meson.build
index 2746fec..e981cab 100644
--- a/meson.build
+++ b/meson.build
@@ -55,13 +55,6 @@ if cheese_enabled
   cheese_enabled = cheese.found() and cheese_gtk.found()
 endif
 
-maps_enabled = get_option('maps')
-if maps_enabled
-  champlain = dependency('champlain-0.12')
-  clutter_gtk = dependency('clutter-gtk-1.0')
-  geocode_glib = dependency('geocode-glib-1.0', version: '>= 3.15.3')
-endif
-
 telepathy_enabled = get_option('telepathy')
 if telepathy_enabled
   folks_telepathy = dependency('folks-telepathy', version: '>=' + min_folks_version)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cb99c76..c59fc42 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,7 +13,6 @@ data/ui/contacts-list-pane.ui
 data/ui/contacts-setup-window.ui
 data/ui/contacts-window.ui
 src/contacts-accounts-list.vala
-src/contacts-address-map.vala
 src/contacts-app.vala
 src/contacts-avatar.vala
 src/contacts-avatar-dialog.vala
diff --git a/src/contacts-contact-sheet.vala b/src/contacts-contact-sheet.vala
index 2d27463..ed8934e 100644
--- a/src/contacts-contact-sheet.vala
+++ b/src/contacts-contact-sheet.vala
@@ -220,23 +220,10 @@ public class Contacts.ContactSheet : Grid {
 
       var addr_details = p as PostalAddressDetails;
       if (addr_details != null) {
-       foreach (var addr in addr_details.postal_addresses) {
-         string[] strs = Contact.format_address (addr.value);
-         var all_strs = "";
-         foreach (var s in strs) {
-           all_strs += s + "\n";
-         }
-         add_row_with_label (ref i, TypeSet.general.format_type (addr), all_strs);
-       }
-
-#if HAVE_MAPS
-        if (addr_details.postal_addresses.size > 0) {
-          var map = new AddressMap (c, addr_details.postal_addresses);
-          map.load ();
-          attach (map, 1, i);
-          i++;
+        foreach (var addr in addr_details.postal_addresses) {
+          var all_strs = string.joinv ("\n", Contact.format_address (addr.value));
+          add_row_with_label (ref i, TypeSet.general.format_type (addr), all_strs);
         }
-#endif
       }
 
       if (i != 3)
diff --git a/src/meson.build b/src/meson.build
index 2917686..d8b4cd9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -69,12 +69,6 @@ if cheese_enabled
   contacts_c_sources += 'cheese-flash.c'
 endif
 
-if maps_enabled
-  contacts_deps += [ champlain, clutter_gtk, geocode_glib ]
-  contacts_vala_args += [ '-D', 'HAVE_MAPS' ]
-  contacts_vala_sources += 'contacts-address-map.vala'
-endif
-
 if telepathy_enabled
   contacts_deps += [ folks_telepathy, telepathy_glib ]
   contacts_vala_args += [ '-D', 'HAVE_TELEPATHY' ]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]