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 639842 - TAB completion stopped working ok with update from 2.20 to 2.22
TAB completion stopped working ok with update from 2.20 to 2.22
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
filechooser-easish-fix
: 673172 693851 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-01-18 13:05 UTC by Pacho Ramos
Modified: 2016-03-14 18:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pacho Ramos 2011-01-18 13:05:54 UTC
As reported downstream in:
http://bugs.gentoo.org/show_bug.cgi?id=352014

"For example in GIMP I select File->Save As...
In dialog I type "/ho" and Press TAB button. With gtk+-2.20.1 I saw "/home/"
after that. With 2.22.1 focus is going to "Browse to other folders".
Sometimes the first completion is successful, but the second fails.
Completitions in gtk's open dialog works fine.
It is reproducible in all gtk-software on my system."

This is also reproducible by me, specially the second scenario (first completion ok but second failing)

Thanks
Comment 1 Federico Mena Quintero 2011-01-18 15:57:00 UTC
Are you running a clipboard program?
Comment 2 tot-to 2011-01-18 16:28:10 UTC
What is implied by "clipboard program"?
Comment 3 Pacho Ramos 2011-01-18 16:46:57 UTC
(In reply to comment #1)
> Are you running a clipboard program?

I don't think I am running any
Comment 4 Federico Mena Quintero 2011-01-19 00:18:03 UTC
A clipboard program is something that saves past items that you cut/paste, so that you can reuse them later.

Clipboard programs often steal the primary selection in X, and this breaks the file chooser's completion.

If you are absolutely sure you aren't running one...

Does this happen?

1. You start typing.

2. You hit Tab.

3. The popup with completion suggetions appears.

4. You hit Tab and the focus goes to the "Browse for other folders" expander.
Comment 5 tot-to 2011-01-19 09:11:19 UTC
I am using very minimalistic system, therefore I am completely sure. I haven't any clipboard program.
1. typing '/ho'
2. hitting tab
3. completition work, I see '/home/'
4. I type 'to' (my username is 'tot-to'), i.e. I see '/home/to'
5. hitting tab again
6. focus goes to "Browse for other folders"

If I am tring again:
7. Selecting all
8. hitting delete
9. typing '/ho'
10. hitting tab
11. focus goes to "Browse for other folders"

I did video to gain a better understanding. Direct link:
http://tot-to.com/files/completition-bug.ogv (1.3M)
Comment 6 Pacho Ramos 2011-01-19 09:46:26 UTC
And, in my case, I see the same behavior
Comment 7 Federico Mena Quintero 2011-01-24 17:52:48 UTC

*** This bug has been marked as a duplicate of bug 627139 ***
Comment 8 Pacho Ramos 2011-01-24 18:58:53 UTC
I am not sure this is the same problem as we are suffering this with 2.22.1, that should contain the fix for bug 627139
Comment 9 Pacho Ramos 2011-01-25 14:06:29 UTC
I have confirmed the patch is included in 2.22.1 and it doesn't solve this issue
Comment 10 Federico Mena Quintero 2011-02-28 23:12:29 UTC
Pacho, what distro are you running?  Can you please send a "ps -aux" so I can see what processes are running?

I've seen this bug happen only once or twice on my machine, but I haven't been able to reproduce it intentionally.
Comment 11 Federico Mena Quintero 2011-02-28 23:18:11 UTC
Never mind, I found a way to reproduce this on GTK+ 3.0.
Comment 12 Federico Mena Quintero 2011-02-28 23:25:02 UTC
To reproduce on 3.0:

1. testfilechooser --action=save
2. type "/home/f"
3. wait for suggestion window to appear
4. type Tab

The focus will switch to the next widget.

We are hitting this:

  • #0 gtk_window_focus
    at gtkwindow.c line 5894
  • #1 _gtk_marshal_BOOLEAN__ENUM
    at gtkmarshalers.c line 165
  • #2 g_type_class_meta_marshal
    at gclosure.c line 878
  • #3 g_closure_invoke
    at gclosure.c line 767
  • #4 signal_emit_unlocked_R
    at gsignal.c line 3290
  • #5 g_signal_emit_valist
    at gsignal.c line 2993
  • #6 g_signal_emit
    at gsignal.c line 3040
  • #7 gtk_widget_child_focus
    at gtkwidget.c line 9546
  • #8 gtk_entry_completion_key_press
    at gtkentry.c line 9572
  • #9 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #10 g_closure_invoke
    at gclosure.c line 767
  • #11 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #12 g_signal_emit_valist
    at gsignal.c line 2993
  • #13 g_signal_emit
    at gsignal.c line 3040
  • #14 gtk_widget_event_internal
    at gtkwidget.c line 6063
  • #15 gtk_widget_event
    at gtkwidget.c line 5779
  • #16 gtk_entry_completion_popup_key_event
    at gtkentrycompletion.c line 906

Comment 13 Pacho Ramos 2011-03-01 08:07:53 UTC
Thanks a lot for your investigation
Comment 14 Timothy Arceri 2013-05-21 02:34:14 UTC
*** Bug 673172 has been marked as a duplicate of this bug. ***
Comment 15 Timothy Arceri 2013-05-21 02:35:33 UTC
*** Bug 693851 has been marked as a duplicate of this bug. ***
Comment 16 tot-to 2013-06-20 14:15:35 UTC
As a initial reporter I should say that at the moment this bug is not present for me. (I have gtk+-2.24.19 installed right now). But I can see another issue:

Previously when I opened file chooser dialog, I could press "/" and start to enter path using completions. Now if I press "/" nothing happens. I should press TAB at first to change focus from "Recently used" to file list (from the left side to the right side of the dialog) and only then I can press "/" end enter address.
Comment 17 Federico Mena Quintero 2016-03-10 21:47:30 UTC
The new Tab completion code (... new from November 2011) is now in the gtk-2-24 branch as well as gtk-3-14, gtk-3-16, gtk-3-18, and master.  Closing this bug.
Comment 18 ar 2016-03-13 11:22:49 UTC
Still not entirely working though, but maybe this is intended behavior.

When there's more than one possible completion, a Tab will now fill to their lowest common denominator, but further presses do nothing (instead of cycle the possibilities).
Comment 19 Federico Mena Quintero 2016-03-14 18:54:30 UTC
It's intended to complete to the longest common prefix, not to cycle among possibilities.  If there are multiple possibilities, you should get a popup list.