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 584805 - GtkEntryCompletion selection reset when calling gtk_entry_set_icon_from_icon_name as it triggers a relayout
GtkEntryCompletion selection reset when calling gtk_entry_set_icon_from_icon_...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkEntry
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-06-04 09:18 UTC by Holger Hans Peter Freyther
Modified: 2009-06-06 01:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple manual test case (3.08 KB, text/plain)
2009-06-04 09:20 UTC, Holger Hans Peter Freyther
  Details
Patch to fix the issue (1.47 KB, patch)
2009-06-04 09:27 UTC, Holger Hans Peter Freyther
committed Details | Review

Description Holger Hans Peter Freyther 2009-06-04 09:18:08 UTC
Please describe the problem:
In the Epiphany Woohoo-Bar when using the cursor to go down to "Search the Web" and pressing Return will not emit "action-activated" but "activate" of the GtkEntry.

Steps to reproduce:
1. Type localhost in the location bar and press enter
2. Type loc, autocomplete starts, press Cursor Down twice to reach "Search the Web"
3. Press Return


Actual results:
http://loc will be loaded

Expected results:
Google should be searched for loc

Does this happen every time?
Yes

Other information:
This is due a resize triggered by a call to gtk_entry_set_icon_from_icon_name and in the resize completion->priv->current_selected will be reset to -1. A manual test case and patch will be attached.
Comment 1 Holger Hans Peter Freyther 2009-06-04 09:20:16 UTC
Created attachment 135925 [details]
Simple manual test case

Simple manual test case. Type "loc" in the entry, use the cursors to select "Search the Web" press Return and watch the console. "action-activated" should be printed on the console but instead the callback connected to "activate" of the GtkEntry is called.
Comment 2 Holger Hans Peter Freyther 2009-06-04 09:27:07 UTC
Created attachment 135926 [details] [review]
Patch to fix the issue

With this change applied action-activated will be emitted. I don't know how to test for regressions but it seems to be fine.
Comment 3 Matthias Clasen 2009-06-05 23:52:26 UTC
Makes sense to me.