After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 735215 - Add support for --uri
Add support for --uri
Status: RESOLVED DUPLICATE of bug 756512
Product: gnome-maps
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
: 705604 (view as bug list)
Depends on: 722871
Blocks:
 
 
Reported: 2014-08-22 11:07 UTC by Jonas Danielsson
Modified: 2015-11-02 10:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main.c: Use the correct argv and argc (1.00 KB, patch)
2014-08-22 11:07 UTC, Jonas Danielsson
needs-work Details | Review
mapWalker: Make sure we center on location after zoom (682 bytes, patch)
2014-08-22 11:08 UTC, Jonas Danielsson
reviewed Details | Review
Add uri command line option (11.88 KB, patch)
2014-08-22 11:09 UTC, Jonas Danielsson
needs-work Details | Review
main.c: Use the correct argv/argc (1.12 KB, patch)
2014-08-22 12:52 UTC, Jonas Danielsson
committed Details | Review
mapWalker: Center on location after zoom (719 bytes, patch)
2014-08-22 12:52 UTC, Jonas Danielsson
accepted-commit_now Details | Review
Add uri command line option (13.74 KB, patch)
2014-08-25 07:10 UTC, Jonas Danielsson
none Details | Review

Description Jonas Danielsson 2014-08-22 11:07:03 UTC
Since Geocode has support for parsing geoURI and glib now have support for adding command line options, lets try to add this for maps!
Comment 1 Jonas Danielsson 2014-08-22 11:07:48 UTC
Created attachment 284178 [details] [review]
main.c: Use the correct argv and argc

This should probably go in either way, since I consider it a bug-fix.
Comment 2 Jonas Danielsson 2014-08-22 11:08:50 UTC
Created attachment 284179 [details] [review]
mapWalker: Make sure we center on location after zoom

Damian: It might make sense to merge this along with your patches.
It fixes some things for me. When going to a place the marker might sometime be near an edge and that will result in the bubble not showing, and other funny things.
Comment 3 Jonas Danielsson 2014-08-22 11:09:16 UTC
Created attachment 284180 [details] [review]
Add uri command line option
Comment 4 Jonas Danielsson 2014-08-22 11:17:11 UTC
Review of attachment 284180 [details] [review]:

::: src/URIMarker.js
@@ +35,3 @@
+        this.parent(params);
+
+        let iconActor = Utils.CreateActorFromImageFile(Path.ICONS_DIR + "/pin.svg");

If someone has an idea for a better icon that would be lovely.

::: src/uri-bubble.ui
@@ +15,3 @@
+        <property name="can_focus">False</property>
+        <property name="margin_start">10</property>
+        <child>

If someone knows of a nice image/icin we can have do describe this that would be lovely as well.
Comment 5 Jonas Danielsson 2014-08-22 11:46:55 UTC
Review of attachment 284180 [details] [review]:

::: src/URIBubble.js
@@ +43,3 @@
+        ui.labelCoordinates.label = this.place.location.latitude.toFixed(5)
+                                  + ', '
+                                  + this.place.location.longitude.toFixed(5);

An alternative approach to this is to set the coordinates as name (and thus the bubble-title class) if there is no place-name.
Comment 6 Zeeshan Ali 2014-08-22 12:15:09 UTC
Review of attachment 284178 [details] [review]:

Patch itself is good and I don't think its just your opinion that its a bug fix. :)

* A comma after "Without this" would help readability a LOT. :) A comma after 'With this fix" would also be nice but not necessary.
* Were we lying to GApplication about what?
* "will be able to go" -> "will be able to do"?
Comment 7 Jonas Danielsson 2014-08-22 12:21:19 UTC
Review of attachment 284178 [details] [review]:

Sure commas can go in there.

We were lying about what our actual argv was :) Removing the program-name part of the string-array.

How about:
"Before this, commandline handling would not work.
We were removing the program-name from the argv string array.
With this fix, we will be able to use the standard GApplication
options.

$ gnome-maps --help-gapplication
$ gnome-maps --gapplication-service

etc."
Comment 8 Zeeshan Ali 2014-08-22 12:33:01 UTC
Review of attachment 284179 [details] [review]:

What mapWalker.js? I don't see any such module in git master.

shortlog could be shorter so why not? Please always try you best to keep it under the 50 chars recommendation.
Comment 9 Jonas Danielsson 2014-08-22 12:36:18 UTC
Review of attachment 284179 [details] [review]:

Sure. mapWalker: Center on location after zoom

mapWalker is a new module from the blocking bug, which is Damians marker bug.
Since there is no mapLocation anymore mapWalker is no responsible for the goTo-code.
See that bug for details.
Comment 10 Zeeshan Ali 2014-08-22 12:48:07 UTC
Review of attachment 284180 [details] [review]:

Cool, although I think maybe we should support this in the UI as well? Through search entry perhaps?

::: src/mapView.js
@@ +154,3 @@
     },
 
+    showURI: function(uri) {

With URI in URIBubble's name, I'd think it should be URIBubble that should handle parsing of URI.
Comment 11 Zeeshan Ali 2014-08-22 12:49:09 UTC
Review of attachment 284179 [details] [review]:

OK, please update patch with new commit log.
Comment 12 Jonas Danielsson 2014-08-22 12:52:08 UTC
Created attachment 284195 [details] [review]
main.c: Use the correct argv/argc

Updated commit message.
Comment 13 Jonas Danielsson 2014-08-22 12:52:46 UTC
Created attachment 284196 [details] [review]
mapWalker: Center on location after zoom

Updated shortlog.
Comment 14 Jonas Danielsson 2014-08-22 12:54:32 UTC
Review of attachment 284180 [details] [review]:

::: src/mapView.js
@@ +154,3 @@
     },
 
+    showURI: function(uri) {

You mean URIMarker? Hmm, well it could be done. But it can't be done in the constructor since it can fail.

So will have to create the marker and then see if it can parse the uri and if not error out, sounds ok?
Comment 15 Jonas Danielsson 2014-08-22 13:25:35 UTC
Review of attachment 284180 [details] [review]:

We could check if the search-string starts with geo: and send it to the same code path, yeah. Think that would be worthwhile?
Comment 16 Zeeshan Ali 2014-08-22 14:07:40 UTC
Review of attachment 284180 [details] [review]:

yeah. :)
Comment 17 Zeeshan Ali 2014-08-22 14:24:08 UTC
Review of attachment 284195 [details] [review]:

great
Comment 18 Zeeshan Ali 2014-08-22 14:24:42 UTC
Review of attachment 284196 [details] [review]:

ack
Comment 19 Jonas Danielsson 2014-08-24 17:27:39 UTC
Comment on attachment 284195 [details] [review]
main.c: Use the correct argv/argc

Attachment 284195 [details] pushed as b5d5365 - main.c: Use the correct argv/argc
Comment 20 Jonas Danielsson 2014-08-25 07:10:58 UTC
Created attachment 284377 [details] [review]
Add uri command line option

* placeEntry no emits an 'uri' signal on activation when the text starts with 'geo:'.

* Did not move the parsing of uri to URIMarker, since the MapMarker base class expects a valid place in the constructor.
Comment 21 Jonas Danielsson 2015-08-17 12:16:42 UTC
*** Bug 705604 has been marked as a duplicate of this bug. ***
Comment 22 Jonas Danielsson 2015-11-02 10:49:43 UTC
Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 756512 ***