Bug 283804 - Open selected account when pressing ENTER
Summary: Open selected account when pressing ENTER
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.5.3
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 16:48 UTC by schlatter@phys.ethz.ch
Modified: 2011-12-13 17:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schlatter@phys.ethz.ch 2011-10-11 16:48:48 UTC
Version:           4.5.3 (using KDE 4.6.2) 
OS:                Linux

KMyMoney already has pretty nice keyboard navigation. With the cursor and tab keys, we can already browse through accounts, categories, reports, ... However, to actually open an account, ... I still need to use the mouse (double-click). I think the user experience could be improved if the selected account, category, ... would open when enter is pressed

Reproducible: Always

Steps to Reproduce:
Click on "Accounts"
Hit TAB twice to go to the account tree
Browse with cursor keys through account tree (right/left open and close sub-tree)
Hit ENTER when account of interest is highlighted

Actual Results:  
Browsing works. ENTER does nothing.

Expected Results:  
It would improve usability if the selected account (category, report, ...) would open.

OS: Linux (i686) release 2.6.38-11-generic-pae
Compiler: cc
Comment 1 Jack 2011-12-12 23:24:53 UTC
While simply hitting Enter would be easier, you can do most if not all of this with the keyboard now.  If you have selected an account in the accounts view, Alt-A, Alt-O will do the Accounts/Open Ledger menu selection.  Alt-C, Alt-O will open a category in the same manner.  Unfortunately, I have not found a way to go to the account ledger for a transaction selected in the Payee view.

I have found a few posts suggesting there is or could be a keyboard shortcut for the right mouse button, which will bring up a context menu, which usually has what you want to do, but I can't find any way to access or create it.  However, many keyboards do have a key that will bring up a context menu (same as right clicking) - it is typically just to the left of the right control key.  It works fine for me with KDE 4.7.3 under Gentoo.
Comment 2 Cristian Oneț 2011-12-13 06:37:30 UTC
If this where to be implemented "by the book" then we should perform the open action on the activated() signal. This means that a lot of users that have a 'single click open' system setup will have the same behavior in the 'Accounts' view. Would that be OK?
Comment 3 Cristian Oneț 2011-12-13 07:24:10 UTC
Git commit 144938cff15a116025a207984c0b8fe890834bd2 by Cristian Oneț.
Committed on 13/12/2011 at 08:02.
Pushed by conet into branch 'master'.

Emit the openObject() signal also when the Enter/Return key is pressed.

We don't use the activated() signal from QAbstractItemView because
that can be emitted on a single click depending on the system settings
which can make some account views (like the one in the budgets view)
useless.

BUG: 283804

M  +17   -3    kmymoney/widgets/kmymoneyaccounttreeview.cpp
M  +4    -0    kmymoney/widgets/kmymoneyaccounttreeview.h

http://commits.kde.org/kmymoney/144938cff15a116025a207984c0b8fe890834bd2
Comment 4 Cristian Oneț 2011-12-13 07:24:10 UTC
Git commit d06f2c4ef10805df5f6378271b804da483518544 by Cristian Oneț.
Committed on 13/12/2011 at 08:16.
Pushed by conet into branch 'master'.

Move the 'edit transaction on enter pressed' implementation from the event filter
of the ledger view into the register itself just like on double clicking.

In this way we simplified the code and made it possible to open a transaction in
the ledger from the register in the payees view with the 'Enter/Return' keys.

BUG: 283804

M  +0    -15   kmymoney/views/kgloballedgerview.cpp
M  +6    -0    kmymoney/widgets/register.cpp

http://commits.kde.org/kmymoney/d06f2c4ef10805df5f6378271b804da483518544
Comment 5 Cristian Oneț 2011-12-13 07:25:20 UTC
Git commit b26d860c76c909441671d7d2ef4f6c64018adcc1 by Cristian Oneț.
Committed on 13/12/2011 at 08:02.
Pushed by conet into branch '4.6'.

Emit the openObject() signal also when the Enter/Return key is pressed.

We don't use the activated() signal from QAbstractItemView because
that can be emitted on a single click depending on the system settings
which can make some account views (like the one in the budgets view)
useless.

BUG: 283804

M  +17   -3    kmymoney/widgets/kmymoneyaccounttreeview.cpp
M  +4    -0    kmymoney/widgets/kmymoneyaccounttreeview.h

http://commits.kde.org/kmymoney/b26d860c76c909441671d7d2ef4f6c64018adcc1
Comment 6 Cristian Oneț 2011-12-13 07:25:20 UTC
Git commit b9e64e21bd71925949d50eb9588a03527cc65d57 by Cristian Oneț.
Committed on 13/12/2011 at 08:16.
Pushed by conet into branch '4.6'.

Move the 'edit transaction on enter pressed' implementation from the event filter
of the ledger view into the register itself just like on double clicking.

In this way we simplified the code and made it possible to open a transaction in
the ledger from the register in the payees view with the 'Enter/Return' keys.

BUG: 283804

M  +0    -15   kmymoney/views/kgloballedgerview.cpp
M  +6    -0    kmymoney/widgets/register.cpp

http://commits.kde.org/kmymoney/b9e64e21bd71925949d50eb9588a03527cc65d57
Comment 7 Jack 2011-12-13 17:06:22 UTC
Works great.  Thanks Cristian!