[gnome-maps/wip/geoclue-refactor: 1/3] ContextMenu: Remove 'I am here'



commit c5180a00bc5c71316d3aa18b0ce7583e9c2de8b9
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Mon Nov 24 05:55:15 2014 -0500

    ContextMenu: Remove 'I am here'

 src/context-menu.ui |    7 -------
 src/contextMenu.js  |   21 ++-------------------
 2 files changed, 2 insertions(+), 26 deletions(-)
---
diff --git a/src/context-menu.ui b/src/context-menu.ui
index 16aaa07..126c6f5 100644
--- a/src/context-menu.ui
+++ b/src/context-menu.ui
@@ -10,12 +10,5 @@
         <property name="visible">True</property>
       </object>
     </child>
-    <child>
-      <object class="GtkMenuItem" id="i-am-here-item">
-        <property name="name">i-am-here-item</property>
-        <property name="label" translatable="yes">I’m here!</property>
-        <property name="visible">True</property>
-      </object>
-    </child>
   </object>
 </interface>
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 0c1c887..6f01cb1 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -33,9 +33,8 @@ const ContextMenu = new Lang.Class({
     _init: function(mapView) {
         this._mapView = mapView;
 
-        let ui = Utils.getUIObject('context-menu', ['context-menu',
-                                                    'whats-here-item',
-                                                    'i-am-here-item']);
+        let ui = Utils.getUIObject('context-menu', [ 'context-menu',
+                                                     'whats-here-item' ]);
         this._menu = ui.contextMenu;
 
         this._mapView.view.connect('button-release-event',
@@ -43,9 +42,6 @@ const ContextMenu = new Lang.Class({
 
         ui.whatsHereItem.connect('activate',
                                  this._onWhatsHereActivated.bind(this));
-
-        ui.iAmHereItem.connect('activate',
-                               this._onIAmHereActivated.bind(this));
     },
 
     _onButtonReleaseEvent: function(actor, event) {
@@ -68,17 +64,4 @@ const ContextMenu = new Lang.Class({
             this._mapView.showSearchResult(place);
         }).bind(this));
     },
-
-    _onIAmHereActivated: function() {
-        let location = new Geocode.Location({ latitude: this._latitude,
-                                              longitude: this._longitude,
-                                              accuracy: 0,
-                                              description: "" });
-
-        Application.geocodeService.reverse(location, (function(place) {
-            location.description = place.name;
-            Application.geoclue.overrideLocation(location);
-        }).bind(this));
-    }
 });
-Utils.addSignalMethods(ContextMenu.prototype);


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