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 330565 - Open location box's auto-complete doesn't work properly
Open location box's auto-complete doesn't work properly
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.3.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2006-02-09 20:40 UTC by Oded Arbel
Modified: 2006-08-12 04:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Oded Arbel 2006-02-09 20:40:56 UTC
Please describe the problem:
When using "Open location" box and typing a location which is auto-completed, 
pressing enter (confirm) immediately passes the text that was actually typed 
and not the auto-completed string which is what is displayed. 

Steps to reproduce:
1. Open GtkFileChooser  
2. Press '/' to access "Open location" with '/' typed in  
3. Press 'u' to invoke auto-complete, which will show '/usr'  
4. Hit ENTER. 
  

Actual results:
GtkFileChooser will complain that it can't open '/u'.   

Expected results:
GtkFileChooser should display the /usr directory  

Does this happen every time?
There is some inconsistency here which I'm not sure what causes it. In some 
cases when you press 'u', '/usr' will be displayed, but with the text 'sr' (the 
part auto-complete added) selected (in the above steps it shouldn't be 
selected). When that happens pressing ENTER will open /usr correctly 

Other information:
Comment 1 Oded Arbel 2006-02-09 20:44:27 UTC
One more note - when invoking "Open location" using Ctrl+L, it doesn't behave that way - it will behave as described in the last paragraph of the bug description by having 'sr/' selected (I think this is the main difference - it automatically add '/' at the end). If you then continue to type 'sr/' and then 'b', auto-complete will write '/usr/bin' and pressing ENTER then will invoke the buggy behavior with GtkFileChooser complaining about '/usr/b'.
Comment 2 Federico Mena Quintero 2006-02-10 00:47:04 UTC
What is the exact version of GTK+ that you are using?  We haven't had this bug for a long while now.
Comment 3 Oded Arbel 2006-02-10 23:50:45 UTC
2.8.11 which is the current version in Mandriva Cooker.
Comment 4 Oded Arbel 2006-05-30 18:06:23 UTC
I still see this happening with GTK+ 2.8.18 in Fedora Core 5. 

The issue is a bit more complicated then what the first comment describes: I couldn't really understand when which behavior is invoked, but when trying the steps described in the first comment, either of these scenarios may be encountered:

The dialog shows '/usr/' where
a) the 'sr/' part is selected, the cursor is not visible and typing will replace 'sr/' with new text. hitting ENTER will pop up "can't open '/u'" error.
b) like (a), but hitting ENTER will actually go to /usr
c) none of the text is selected, the cursor is positioned after the last '/'. Hitting enter will pop up "can't open '/u'" error. 

It behaves differently if after typing 'u' instead of hitting ENTER you press ESC and then immediately try again. Running throw the same procedure multiple times will often come up with different results (though not always - it can be quite consistant at times). I also couldn't get it to have behavior (d) which might be like (c) except that it will work.
Comment 5 Federico Mena Quintero 2006-07-07 16:17:53 UTC
See also bug #333320.
Comment 6 Oded Arbel 2006-07-07 18:45:58 UTC
This issue is no longer valid for GTK+ 2.10.0 (what I'm running now, from Fedora Core 5.90), as the Open location box was removed from the file chooser (I rather like the new file chooser).
Comment 7 Yevgen Muntyan 2006-08-12 04:24:46 UTC
This bug is still there, I can easily get "Could not open file /usr/src/l" message with new filechooser (that's about /usr/src/linux-something/somefile file). This bug is about the entry somehow messing with selection and getting selected text (!) instead of the actual entry content when wants to get entered filename.
Could someone reopen it?
By the way, #333320 describes exactly same problem. The titles and descriptions are so different because the bug is very obscure; one can't guess that the problem is simple - messing with messed up selection (I can't understand how it's possible, but I believe it's true).