GNOME Bugzilla – Bug 584805
GtkEntryCompletion selection reset when calling gtk_entry_set_icon_from_icon_name as it triggers a relayout
Last modified: 2009-06-06 01:49:53 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.
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.
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.
Makes sense to me.