Codebase list gnome-maps / 21f3b99
placeEntry: Allow pasting maps: URIs into the search entry Marcus Lundblad 2 years ago
1 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3333 const Place = imports.place;
3434 const PlaceStore = imports.placeStore;
3535 const PlacePopover = imports.placePopover;
36 const URIS = imports.uris;
3637 const Utils = imports.utils;
3738
3839 // minimum number of characters to start completion
224225 parsed = true;
225226 }
226227
228 if (this.text.startsWith('maps:')) {
229 let query = URIS.parseMapsURI(this.text);
230
231 if (query) {
232 this.text = query;
233 } else {
234 let msg = _("Failed to parse Maps URI");
235 Utils.showDialog(msg, Gtk.MessageType.ERROR, this.get_toplevel());
236 }
237
238 parsed = true;
239 }
240
227241 let parsedLocation = Place.Place.parseCoordinates(this.text);
228242 if (parsedLocation) {
229243 /* if the place was a parsed OSM coordinate URL, it will have