[gnome-maps] mapBubble: Always convert to GeocodePlace to Place
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] mapBubble: Always convert to GeocodePlace to Place
- Date: Wed, 3 Dec 2014 18:38:53 +0000 (UTC)
commit ad416a223ccce55c7101cf9d8be5c555000e7469
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Tue Dec 2 01:07:04 2014 -0500
mapBubble: Always convert to GeocodePlace to Place
https://bugzilla.gnome.org/show_bug.cgi?id=740937
src/mapBubble.js | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/mapBubble.js b/src/mapBubble.js
index 20b8183..e12e351 100644
--- a/src/mapBubble.js
+++ b/src/mapBubble.js
@@ -45,7 +45,7 @@ const MapBubble = new Lang.Class({
Abstract: true,
_init: function(params) {
- this._place = params.place;
+ this._place = new Place.Place({ place: params.place });
delete params.place;
this._mapView = params.mapView;
@@ -104,13 +104,11 @@ const MapBubble = new Lang.Class({
button.visible = true;
button.active = isFavorite;
button.connect('toggled', (function() {
- let place = new Place.Place({ place: this._place });
-
if (button.active)
- placeStore.addPlace(place,
+ placeStore.addPlace(this._place,
PlaceStore.PlaceType.FAVORITE);
else
- placeStore.removePlace(place,
+ placeStore.removePlace(this._place,
PlaceStore.PlaceType.FAVORITE);
}).bind(this));
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]