Commit 0ab663bd authored by Mattias Bengtsson's avatar Mattias Bengtsson Committed by Jonas Danielsson

ContextMenu: Use params pattern

This makes ContextMenu consistent with most other classes in Maps.

https://bugzilla.gnome.org/show_bug.cgi?id=740647
parent 8ca738fc
......@@ -34,9 +34,11 @@ const ContextMenu = new Lang.Class({
Template: 'resource:///org/gnome/Maps/ui/context-menu.ui',
InternalChildren: [ 'whatsHereItem' ],
_init: function(mapView) {
this._mapView = mapView;
this.parent();
_init: function(params) {
this._mapView = params.mapView;
delete params.mapView;
this.parent(params);
this._mapView.view.connect('button-release-event',
this._onButtonReleaseEvent.bind(this));
......
......@@ -77,7 +77,7 @@ const MainWindow = new Lang.Class({
this._sidebar = this._createSidebar();
this._contextMenu = new ContextMenu.ContextMenu(this._mapView);
this._contextMenu = new ContextMenu.ContextMenu({ mapView: this._mapView });
this._layersButton.popover = new LayersPopover.LayersPopover();
this._favoritesButton.popover = new FavoritesPopover.FavoritesPopover({ mapView: this._mapView });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment