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 734597 - PlaceEntry completion: name doesn't show.
PlaceEntry completion: name doesn't show.
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-11 05:20 UTC by Mattias Bengtsson
Modified: 2014-08-24 18:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
placeEntry: Return true from 'match-selected' (1.32 KB, patch)
2014-08-24 18:06 UTC, Jonas Danielsson
committed Details | Review

Description Mattias Bengtsson 2014-08-11 05:20:42 UTC
When using the entrycompletion in a PlaceEntry to choose a location the name of the choosen place should be shown in the entry. It currently isn't (it works fine selecting results from the popover though).

From a little debugging it seems that PlaceEntry.text is properly set to place.name when a new place is set but then immediately gets cleared.
Comment 1 Rishi Raj Singh Jhelumi 2014-08-14 13:32:15 UTC
The 'match-selected' signal correctly sets the place but then the 'search-signal' activates and sets the place to null, as the length of search text becomes 0 on selecting a place from the EntryCompletion list.

Why does search text becomes empty on selecting a place from the entry completion list?? 
Maybe a GTKEntryCompletion bug.

This doesn't happen on selecting the place from SearchPopup.
Comment 2 Jonas Danielsson 2014-08-24 18:06:51 UTC
Created attachment 284355 [details] [review]
placeEntry: Return true from 'match-selected'

The documentation for GtkEntryCompletion states:

"When the user selects a completion, the content of the
entry is updated. By default, the content of the entry is
replaced by the text column of the model, but this can be
overridden by connecting to the "match-selected" signal and
updating the entry in the signal handler. Note that you
should return TRUE from the signal handler to suppress the
default behaviour."

We update the entry in our signal handler but we do not
return TRUE. This results in the text being set to the
empty string and setting the place of the placeEntry
to null.
Comment 3 Jonas Danielsson 2014-08-24 18:07:14 UTC
Attachment 284355 [details] pushed as d64ce65 - placeEntry: Return true from 'match-selected'