summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Danielsson <jonas@threetimestwo.org>2015-09-07 20:41:30 +0200
committerJonas Danielsson <jonas@threetimestwo.org>2015-09-07 20:41:30 +0200
commit1e84f31f2838d533ce10d87dcbd832f5c822170e (patch)
treeb8f3ff3ab24d079496e8a5f77a46f02d0164c3e4
parent873133f929aec17a429a1002b7d356e1c0de176f (diff)
downloadgnome-maps-wip/jonasdn/routing_arb.tar.gz
-rw-r--r--data/ui/context-menu.ui6
-rw-r--r--src/contextMenu.js10
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,