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 616709 - Pressing delete key while editing account name offers to delete account
Pressing delete key while editing account name offers to delete account
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
2.4.x
Other All
: Normal normal
: ---
Assigned To: gnucash-ui-maint
gnucash-ui-maint
: 765221 792487 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-04-24 14:36 UTC by Nicholas Sherlock
Modified: 2018-06-29 22:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicholas Sherlock 2010-04-24 14:36:17 UTC
If, while editing the name of an account in the list of accounts by single-clicking on it, you press the delete key to delete a character, it offers to delete the account instead.

The delete key should not perform this function while editing the account name.
Comment 1 Nicholas Sherlock 2010-04-24 14:37:49 UTC
Whoops, by "name" read "description".
Comment 2 Matt McCutchen 2010-06-13 09:11:27 UTC
I filed a bug against Fedora for what I imagine is the same problem:

https://bugzilla.redhat.com/show_bug.cgi?id=603451
Comment 3 JesusFreke 2010-07-26 01:01:00 UTC
I can confirm this bug still exists in 2.3.14
Comment 4 Lukas 2013-02-27 09:24:59 UTC
2.4.11 - still the same :-(
Comment 5 R Ratliff 2013-08-08 04:45:46 UTC
I've researched it a little, and there are two relevant files:

src/gnome/gnc-plugin-page-account-tree.c
This is where the delete key is bound to the deletion of accounts

src/gnome-utils/gnc-tree-view-account.c
This is where the editing of cells is handled.

I see two options from a conceptual point of view:
1. When editing a cell starts, unbind the delete key from EditDeleteAccountAction. When editing finishes, bind the delete key again.
2. When the deletion callback is called (gnc_plugin_page_account_tree_cmd_delete_account) check to see if any cells within that account are currently being edited.

I think #1 is better, since it gives the responsibility to the cell. Not sure how to proceed though. I'm learning how to bind and unbind keys from actions.
Comment 6 Geert Janssens 2013-10-26 09:48:57 UTC
I haven't studied the source files yet. However, here's my view on this:

Whoever binds the delete key to the callback to delete an account should be responsible for blocking it when needed. I guess it's the treeview that does the binding. In that case the treeview should do the blocking and unblocking action.

It can do this by listening for "editing-started", "editing-cancelled" and "edited" signals emitted by the Text Cell Renderers. (This means: it should register a callback that is called when each of these signals is emitted).

On "editing-started", the delete-key-removes-account should be blocked, for the other two signals it should be enabled again.

Instead of removing the delete key from EditDeleteAccountAction, you may simply disable the delete account action while a cell is being edited ?
Comment 7 macho.p 2016-01-17 20:21:08 UTC
Subscribing to this bug and confirming that it remains present in v2.6.6
Comment 8 Milan Knizek 2017-06-04 07:32:26 UTC
Subscribing, too. Editing the chart of accounts is difficult due to this bug.
Comment 9 Geert Janssens 2017-06-06 09:40:59 UTC
*** Bug 765221 has been marked as a duplicate of this bug. ***
Comment 10 David Carlson 2017-09-20 17:25:32 UTC
I see the same problem in the Notes field of the COA in release 2.6.15 in Windows 7
Comment 11 David Carlson 2017-09-20 17:29:13 UTC
Bug title should be corrected to match Comment 1
Comment 12 John Ralls 2017-09-24 22:16:23 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 13 Bob 2017-12-29 12:48:00 UTC
PR 252 Created with a possible fix.
Bob
Comment 14 John Ralls 2017-12-29 22:50:18 UTC
Bob's PR is merged into unstable, so this is fixed for the next major release (which we've decided to call 3.0 instead of 2.8.0).
Comment 15 John Ralls 2018-01-13 04:05:00 UTC
*** Bug 792487 has been marked as a duplicate of this bug. ***
Comment 16 John Ralls 2018-06-29 22:38:29 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=616709. Please update any external references or bookmarks.