[gnome-maps] routeQuery: Add new places to placeStore
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] routeQuery: Add new places to placeStore
- Date: Mon, 29 Feb 2016 08:51:51 +0000 (UTC)
commit f4cdc1848dc7e96fbd9bc0ed383e64ca8394d9f6
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Mon Feb 29 09:51:28 2016 +0100
routeQuery: Add new places to placeStore
src/routeQuery.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/routeQuery.js b/src/routeQuery.js
index 2108440..4ae8264 100644
--- a/src/routeQuery.js
+++ b/src/routeQuery.js
@@ -23,6 +23,9 @@ const GObject = imports.gi.GObject;
const Geocode = imports.gi.GeocodeGlib;
const Lang = imports.lang;
+const Application = imports.application;
+const PlaceStore = imports.placeStore;
+
const Transportation = {
CAR: 0,
BIKE: 1,
@@ -119,6 +122,13 @@ const RouteQuery = new Lang.Class({
this._points.splice(index, 0, point);
point.connect('notify::place', (function() {
+ let placeStore = Application.placeStore;
+ if (point.place) {
+ if (!placeStore.exists(point.place, null)) {
+ placeStore.addPlace(point.place,
+ PlaceStore.PlaceType.RECENT);
+ }
+ }
this.notify('points');
}).bind(this));
this.notify('points');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]