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 695761 - Pressing enter in "New" dialog should select first option
Pressing enter in "New" dialog should select first option
Status: RESOLVED FIXED
Product: gnome-weather
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-03-13 12:05 UTC by Xan Lopez
Modified: 2013-11-03 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GWeatherLocationEntry: autocomplete on activate (10.59 KB, patch)
2013-03-15 22:54 UTC, Giovanni Campagna
committed Details | Review
New dialog: fix activation behavior (1.63 KB, patch)
2013-03-15 22:55 UTC, Giovanni Campagna
committed Details | Review

Description Xan Lopez 2013-03-13 12:05:37 UTC
Basically:

- Press "New"
- Type "mad"
- Madrid appears as only option
- Pressing Enter should do the right thing
Comment 1 Giovanni Campagna 2013-03-15 22:54:31 UTC
Created attachment 239010 [details] [review]
GWeatherLocationEntry: autocomplete on activate

Extend GWeatherLocationEntry so that when only one completion is possible,
we insert it when pressing enter, and then propagate the activation up.
At the same time, and without breaking backward compatibility of documented
API, add a private structure.
Comment 2 Giovanni Campagna 2013-03-15 22:55:37 UTC
Created attachment 239011 [details] [review]
New dialog: fix activation behavior

If we don't set the default response, pressing enter has no effect.
At the same time, convert some property setters to JS conventions.
Comment 3 Giovanni Campagna 2013-03-15 22:56:26 UTC
I attached the patches here if you want to try them. First one is on libgweather, second one on gnome-weather.
Anyway, I'll merge them to master when 3.8 is out.
Comment 4 Giovanni Campagna 2013-03-26 14:59:11 UTC
Attachment 239011 [details] pushed as 4776cd2 - New dialog: fix activation behavior
Comment 5 Lars Karlitski 2013-11-03 11:35:39 UTC
This patch assumes that get_cells() returns non-NULL, which is not true anymore with the fix to bug #635499 in gtk.

It's kind of a hack anyway. I propose reverting it and setting "inline-completion" to TRUE and "popup-single-match" to FALSE. That should have the desired effect and will also work when hitting enter when multiple locations are in the popup.