[gnome-maps/wip/jonasdn/routing_arb] wip



commit 1e84f31f2838d533ce10d87dcbd832f5c822170e
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Mon Sep 7 20:41:30 2015 +0200

    wip

 data/ui/context-menu.ui |    6 ++++++
 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 41220e6..71af205 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 fd4381f..db8f41c 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]