diff options
-rw-r--r-- | data/ui/context-menu.ui | 6 | ||||
-rw-r--r-- | src/contextMenu.js | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/data/ui/context-menu.ui b/data/ui/context-menu.ui index 41220e64..71af205f 100644 --- a/data/ui/context-menu.ui +++ b/data/ui/context-menu.ui @@ -4,6 +4,12 @@ <template class="Gjs_ContextMenu" parent="GtkMenu"> <property name="visible">False</property> <child> + <object class="GtkMenuItem" id="routeItem"> + <property name="name">route-item</property> + <property name="visible">True</property> + </object> + </child> + <child> <object class="GtkMenuItem" id="whatsHereItem"> <property name="name">whats-here-item</property> <property name="label" translatable="yes">What’s here?</property> diff --git a/src/contextMenu.js b/src/contextMenu.js index fd4381f6..db8f41c0 100644 --- a/src/contextMenu.js +++ b/src/contextMenu.js @@ -50,6 +50,10 @@ const ContextMenu = new Lang.Class({ this._onWhatsHereActivated.bind(this)); this._geoURIItem.connect('activate', this._onGeoURIActivated.bind(this)); + this._routeItem.connect('activate', + this._onRouteActivated.bind(this)); + Application.routeService.query.connect('notify::points', + this._routingUpdate.bind(this)); }, _onButtonReleaseEvent: function(actor, event) { @@ -66,6 +70,12 @@ const ContextMenu = new Lang.Class({ } }, + _routingUpdate: function() { + let query = Application.routeService.query; + + + }, + _onWhatsHereActivated: function() { let location = new Location.Location({ latitude: this._latitude, longitude: this._longitude, |