[gnome-maps] contextMenu: Handle nothing found in reverse geocode



commit 8eafb1f9318ca32adaeea16ce4bc4f345614f5fa
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Sun Feb 21 15:50:15 2016 +0100

    contextMenu: Handle nothing found in reverse geocode
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762400

 src/contextMenu.js |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/contextMenu.js b/src/contextMenu.js
index 874414b..c399dd2 100644
--- a/src/contextMenu.js
+++ b/src/contextMenu.js
@@ -124,7 +124,12 @@ const ContextMenu = new Lang.Class({
                                                accuracy: 0 });
 
         Application.geocodeService.reverse(location, null, (function(place) {
-            this._mapView.showPlace(place, false);
+            if (place) {
+                this._mapView.showPlace(place, false);
+            } else {
+                let msg = _("Nothing found here!");
+                Application.notificationManager.showMessage(msg);
+            }
         }).bind(this));
     },
 


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