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 452067 - Beeps when pressing backspace to go up
Beeps when pressing backspace to go up
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Keyboardability
2.20.x
Other Linux
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-28 22:17 UTC by Josh Lee
Modified: 2007-10-03 14:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
my attempts at a fix (648 bytes, patch)
2007-10-03 13:23 UTC, Joachim Sauer
committed Details | Review

Description Josh Lee 2007-06-28 22:17:56 UTC
When you press backspace to go up a level, Nautilus emits a system beep. This is superfluous and annoying.

Using gtk 2.11.4-0ubuntu1 and nautilus 1:2.19.4-0ubuntu1.
Comment 1 Sebastien Bacher 2007-10-02 20:16:20 UTC
The bug has also been submitted on https://bugs.launchpad.net/bugs/146428

"Binary package hint: nautilus

To reproduce:
Go to the desktop.
Create an empty file.
delete it by selecting it with the mouse and deleting it with the keyboard.
You hear a system beep.

This is a fresh pristine copy of Gutsy Beta.

Not very important, but one of the little wrinkles that need ironing."
Comment 2 Joachim Sauer 2007-10-03 13:23:12 UTC
Personally I was really bugged by that behaviour and I've tried to investigate it and produce a fix. I've not written any serious C code in ages and never developed with GTK, so the fix might be way of, but it works for me.

The problem seems to be that nautilus tries to active the search entry box for every key pressed except for a limited set. Backspace and Delete are not in this set, so they activate the search window, which then tries to consume the key press and beeps because Backspace and Delete are not valid actions on a currently empty entry box.

My fix simply won't forward BackSpace and Delete to the Searchentry. Backspace and Delete still seem to work correctly once the search entry is open, since then the search entry itself has the focus and its key-handling routine will be called (and not the one in nautilus-icon-container.c that I modified).
Comment 3 Joachim Sauer 2007-10-03 13:23:32 UTC
Created attachment 96567 [details] [review]
my attempts at a fix
Comment 4 Alexander Larsson 2007-10-03 13:46:04 UTC
Doesn't that mean you can't backspace in the typeahead search?
Comment 5 Joachim Sauer 2007-10-03 13:50:13 UTC
@Reply #4:

That's a valid concern and since I know so little of GTK+ I was afraid that it was so.

But it seems that once the typeahead search entry box is shown it receives the focus and thus its key pressed handler is called before any other and correctly handles the keys. It correctly deletes characters with Backspace and Delete and correctly beeps when it's not possible (i.e. no more characters before or after the cursor position).
Comment 6 Sebastien Bacher 2007-10-03 14:43:05 UTC
Thank you for your work, the patch works correctly and alex approved it on IRC, I've commited to trunk and gnome-2-20

2007-10-03  Sebastien Bacher  <seb128@ubuntu.com>

	* libnautilus-private/nautilus-icon-container.c: (key_press_event):
	patch from Joachim Sauer, fix beep when backspace or delete are pressed
	(#452067)