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 709604 - Click the map should grab (steal) focus away from the search text entry widget
Click the map should grab (steal) focus away from the search text entry widget
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
3.10.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2013-10-08 03:57 UTC by Jean-François Fortin Tam
Modified: 2014-03-07 19:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug patch (2.35 KB, patch)
2014-03-04 22:27 UTC, Dario Di Nucci
needs-work Details | Review
The map now grabs the focus (2.51 KB, patch)
2014-03-05 15:19 UTC, Dario Di Nucci
none Details | Review
The map now grabs the focus (2.51 KB, patch)
2014-03-05 15:35 UTC, Dario Di Nucci
none Details | Review
The map now grabs the focus (2.51 KB, patch)
2014-03-05 15:54 UTC, Dario Di Nucci
committed Details | Review

Description Jean-François Fortin Tam 2013-10-08 03:57:07 UTC
...otherwise, it is impossible to "dismiss" the on-screen keyboard if you're using a touch/tablet device.
Comment 1 Dario Di Nucci 2014-03-04 22:27:56 UTC
Created attachment 270954 [details] [review]
Bug patch

Attached a patch that fix the bug.
Comment 2 Mattias Bengtsson 2014-03-04 22:38:32 UTC
Review of attachment 270954 [details] [review]:

You want to add a more descriptive commit message.

First line is the subject and should be ≤40 chars, just being a short description of what the commit does.
Second line should be blank
Third line and beyound should be ≤ 72 chars (I think?, I try to stop at 70 at least) and add any extra information.

If you use git-bz a reference to the bug is automatically included.

The code looks fine to me otherwise. Zeeshan, Jonas?
Comment 3 Zeeshan Ali 2014-03-05 00:00:56 UTC
(In reply to comment #2)
> Review of attachment 270954 [details] [review]:
> 
> You want to add a more descriptive commit message.
> 
> First line is the subject and should be ≤40 chars, just being a short
> description of what the commit does.
> Second line should be blank
> Third line and beyound should be ≤ 72 chars (I think?, I try to stop at 70 at
> least) and add any extra information.

In future, just point to: https://wiki.gnome.org/Git/CommitMessages . One of the potential SoC students also added a checklist there, which should be helpful for new comers.

> If you use git-bz a reference to the bug is automatically included.
> 
> The code looks fine to me otherwise. Zeeshan, Jonas?

I'll do a review..
Comment 4 Zeeshan Ali 2014-03-05 00:03:04 UTC
Review of attachment 270954 [details] [review]:

The changes look good to me too so if it works, we just need a nice commit log. :)
Comment 5 Jonas Danielsson 2014-03-05 07:29:42 UTC
Review of attachment 270954 [details] [review]:

It does not seem to apply on master for me, what revision is it generated against?
Comment 6 Jonas Danielsson 2014-03-05 09:53:47 UTC
Review of attachment 270954 [details] [review]:

Seems fine.

::: src/mainWindow.js
@@ +121,1 @@
         this.mapView.view.connect('button-press-event',

What is this for? Why do we want to grab focus when we have selected an item to go to?
Not saying it is wrong, just curious on the thinking.
Comment 7 Dario Di Nucci 2014-03-05 14:57:32 UTC
My idea is that after you search something, the focus should go on the map.
In the current release you can search, then move on the maps, and then continue typing... I didn't believe this was a right behaviour.

Is it applying on your code now? Just yesterday I learned how to rebase and branch, now I could manage better this patch.

If it's ok I'm going just to change the commit log, otherwise I'll make the changes. :-)



(In reply to comment #6)
> Review of attachment 270954 [details] [review]:
> 
> Seems fine.
> 
> ::: src/mainWindow.js
> @@ +121,1 @@
>          this.mapView.view.connect('button-press-event',
> 
> What is this for? Why do we want to grab focus when we have selected an item to
> go to?
> Not saying it is wrong, just curious on the thinking.
Comment 8 Jonas Danielsson 2014-03-05 15:02:00 UTC
(In reply to comment #7)
> My idea is that after you search something, the focus should go on the map.
> In the current release you can search, then move on the maps, and then continue
> typing... I didn't believe this was a right behaviour.

Yeah, I agree with you.

> 
> Is it applying on your code now? Just yesterday I learned how to rebase and
> branch, now I could manage better this patch.
> 
> If it's ok I'm going just to change the commit log, otherwise I'll make the
> changes. :-)
> 

It's ok, change the commit log and try to make sure that the new patch applies cleanly on the master branch.

Thanks!

> 
> 
> (In reply to comment #6)
> > Review of attachment 270954 [details] [review] [details]:
> > 
> > Seems fine.
> > 
> > ::: src/mainWindow.js
> > @@ +121,1 @@
> >          this.mapView.view.connect('button-press-event',
> > 
> > What is this for? Why do we want to grab focus when we have selected an item to
> > go to?
> > Not saying it is wrong, just curious on the thinking.
Comment 9 Dario Di Nucci 2014-03-05 15:19:00 UTC
Created attachment 270996 [details] [review]
The map now grabs the focus

Added the property "can-focus" to true for the GtkOverlay where the map is contained. The map take the focus, after clicking on it or after searching a place.
Comment 10 Dario Di Nucci 2014-03-05 15:35:57 UTC
Created attachment 270998 [details] [review]
The map now grabs the focus

Added the property "can-focus" to true for the GtkOverlay where the map is
contained. The map take the focus, after clicking on it or after searching a
place.
Comment 11 Dario Di Nucci 2014-03-05 15:54:33 UTC
Created attachment 271001 [details] [review]
The map now grabs the focus

Added the property "can-focus" to true for the GtkOverlay where the map is
contained. The map take the focus, after clicking on it or after searching a
place.
Comment 12 Jonas Danielsson 2014-03-07 19:19:11 UTC
Review of attachment 271001 [details] [review]:

Thanks, good work!

I will commit this but I will also change the commit message a bit. To make it more in line with how they look in Maps. Take a log at the commit log to see how messages are formated.