summaryrefslogtreecommitdiff
path: root/src/placeView.js
diff options
context:
space:
mode:
authorJames Westman <james@flyingpimonster.net>2020-12-28 17:28:01 -0600
committerMarcus Lundblad <ml@update.uu.se>2021-02-09 20:48:40 +0000
commitd5771cc4fe4e37a83a9613f259ae0b1de705d149 (patch)
tree6aff21a7b224771fa474e5e47b88e37923c50ba0 /src/placeView.js
parent39cf3f63dd9a84e80a2be3867dd4aab8232151ef (diff)
downloadgnome-maps-d5771cc4fe4e37a83a9613f259ae0b1de705d149.tar.gz
placeBar: Add PlaceDialog
This dialog contains a PlaceView to show information about a place, and is shown when you click/top the PlaceBar. It usually matches the size of the main window, unless that would make it very wide.
Diffstat (limited to 'src/placeView.js')
-rw-r--r--src/placeView.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/placeView.js b/src/placeView.js
index 628dee03..a756c2dd 100644
--- a/src/placeView.js
+++ b/src/placeView.js
@@ -150,11 +150,8 @@ var PlaceView = GObject.registerClass({
}
this.updatePlaceDetails();
- }
- updateLocation() {
- /* Called by the UserLocationMarker when its location changes */
- this._populate(this.place);
+ this._place.connect('notify::location', () => this._updateLocation());
}
get place() {
@@ -547,4 +544,9 @@ var PlaceView = GObject.registerClass({
_clearView() {
this._placeDetails.get_children().forEach((child) => child.destroy());
}
+
+ // called when the place's location changes (e.g. for the current location)
+ _updateLocation() {
+ this._populate(this.place);
+ }
});