[gnome-maps] placeStore: Do not store contact places



commit c4f65a8e7b7b3d510cf7df4e815265f74190d285
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Tue Jan 13 03:40:43 2015 -0500

    placeStore: Do not store contact places
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741591

 src/placeStore.js |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/placeStore.js b/src/placeStore.js
index da504dd..8493ea5 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -26,6 +26,7 @@ const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
 
 const Application = imports.application;
+const ContactPlace = imports.contactPlace;
 const Place = imports.place;
 const Utils = imports.utils;
 
@@ -75,6 +76,9 @@ const PlaceStore = new Lang.Class({
     },
 
     _addFavorite: function(place) {
+        if (place instanceof ContactPlace.ContactPlace)
+            return;
+
         if (this.exists(place, PlaceType.FAVORITE)) {
             return;
         }
@@ -89,6 +93,9 @@ const PlaceStore = new Lang.Class({
     },
 
     _addRecent: function(place) {
+        if (place instanceof ContactPlace.ContactPlace)
+            return;
+
         if (this.exists(place, PlaceType.RECENT)) {
             this.updatePlace(place);
             return;
@@ -180,6 +187,9 @@ const PlaceStore = new Lang.Class({
             let type = model.get_value(iter, Columns.TYPE);
             let added = model.get_value(iter, Columns.ADDED);
 
+            if (place instanceof ContactPlace.ContactPlace)
+                return;
+
             jsonArray.push({
                 place: place.toJSON(),
                 type: type,


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