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 471132 - Highlighting a suggestion with the keyboard changes the URL entry in Epiphany; breaks Smart Bookmarks
Highlighting a suggestion with the keyboard changes the URL entry in Epiphany...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkComboBox
2.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-08-28 14:04 UTC by Sebastien Bacher
Modified: 2007-09-08 05:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[1/4] Set the completion prefix on key_press, not on the default completion signal handlers. (1.66 KB, patch)
2007-08-28 21:33 UTC, Xan Lopez
committed Details | Review
[2/4] When returning to the entry from the treeview, put the original input back with the cursor at the end. (1.23 KB, patch)
2007-08-28 21:33 UTC, Xan Lopez
committed Details | Review
[3/4] Make bailing out of the popup work over the action rows too. (845 bytes, patch)
2007-08-28 21:33 UTC, Xan Lopez
committed Details | Review
[4/4] Do not *always* handle the signal on Return, only if there is some selection in the treeview. (903 bytes, patch)
2007-08-28 21:33 UTC, Xan Lopez
committed Details | Review
[0/4] Reset completion prefix on actions too. (3.40 KB, patch)
2007-08-28 21:36 UTC, Xan Lopez
committed Details | Review

Description Sebastien Bacher 2007-08-28 14:04:54 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/epiphany-browser/+bug/134304

"...
When using the location entry to search with a Smart Bookmark, if the text you have entered shows any matches for URLs in your history, then navigating past these items with the keyboard causes the entered text to change. By the time you get to the Smart Bookmark, your entered text does not change back.

I don't know the best way to deal with this. Why do we need to change the text in the entry at all? It seems a bit rude to destroy whatever the user has typed in.

See attached video for clarity.
...
Package: epiphany-browser 2.19.90-0ubuntu1
...
http://launchpadlibrarian.net/8955689/Ephy%20Bug
Ephy Bug  (315.1 KiB, application/ogg)"
Comment 1 Reinout van Schouwen 2007-08-28 14:17:58 UTC
This one is for Xan...
Comment 2 Xan Lopez 2007-08-28 19:22:46 UTC
Agreed, this is pretty bad, but I'm afraid it has to be patched at the gtk level. As a workaround you can use Up to jump to the Smart Bookmarks though.
Comment 3 Reinout van Schouwen 2007-08-28 19:47:37 UTC
Another workaround is to put your favourite smart bookmark on the toolbar, or to use the smart bookmarks loookup extension to feed selected text to a smart bookmark.
Comment 4 Christian Persch 2007-08-28 21:21:41 UTC
Xan: so what should happen is when you move down through the completions and come to the first 'action' menu item in the drop-down, the original text is restored to the entry?

I think this should be re-assigned to gtk+.
Comment 5 Xan Lopez 2007-08-28 21:31:40 UTC
Moving to GTK+ and attaching a swarm of patches, the second one is about the
last comment on bug 457384, the other just address a number of small issues I
found while fixing this.
Comment 6 Xan Lopez 2007-08-28 21:33:09 UTC
Created attachment 94524 [details] [review]
[1/4] Set the completion prefix on key_press, not on the default completion signal handlers.

 gtk/gtkentry.c           |    3 +++
 gtk/gtkentrycompletion.c |    6 ------
 2 files changed, 3 insertions(+), 6 deletions(-)
Comment 7 Xan Lopez 2007-08-28 21:33:18 UTC
Created attachment 94525 [details] [review]
[2/4] When returning to the entry from the treeview, put the original input back with the cursor at the end.

 gtk/gtkentry.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Comment 8 Xan Lopez 2007-08-28 21:33:24 UTC
Created attachment 94526 [details] [review]
[3/4] Make bailing out of the popup work over the action rows too.

 gtk/gtkentry.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
Comment 9 Xan Lopez 2007-08-28 21:33:30 UTC
Created attachment 94527 [details] [review]
[4/4] Do not *always* handle the signal on Return, only if there is some selection in the treeview.

 gtk/gtkentry.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Comment 10 Xan Lopez 2007-08-28 21:36:17 UTC
Created attachment 94528 [details] [review]
[0/4] Reset completion prefix on actions too.

Of course getting it right would be too much. *This* is the first patch in the series.
Comment 11 Xan Lopez 2007-08-28 21:47:33 UTC
Just noticed "last comment on bug foo" is not very resistant historically speaking. So patch [0/4] addresses comment http://bugzilla.gnome.org/show_bug.cgi?id=457384#c3.
Comment 12 Christian Persch 2007-09-03 21:40:44 UTC
Matthias: could these patches please be applied before the 2.12.0 release ? They're rather important for Epiphany. 
Comment 13 Matthias Clasen 2007-09-07 19:22:44 UTC
gtk_entry_completion_key_press() is getting a bit messy...
but I guess these patches make sense.
Comment 14 Matthias Clasen 2007-09-08 05:59:15 UTC
2007-09-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentrycompletion.c:
        * gtk/gtkentry.c: Apply a number of patches by Xan Lopez
        to improve the interaction between actions and inline
        selection.  (#471132)