Group next/prev or up/down keys in help dialog

Instead of putting two navigation keys on their own lines in the help
dialog, cluster them by sibling relationship (up/down, next/prev) and
show the pair on one line:

  n / p : Next page / previous page
  ] / [ : Next file / previous file

To improve clustering of identical actions and make it easier to
locate a task each group is now sorted by help text, rather than
by key stroke.

Change-Id: I21d0d93558d276a78127b110c6afc77852ab8ba9
This commit is contained in:
Shawn Pearce
2013-11-21 00:51:53 -08:00
parent 698064c51f
commit bb18abb8f5
9 changed files with 72 additions and 42 deletions

View File

@@ -67,15 +67,13 @@ public abstract class PagedSingleListScreen extends Screen {
table = new ChangeTable2() {
{
keysNavigation.add(new DoLinkCommand(0, 'p', Util.C
.changeTablePagePrev(), prev));
keysNavigation.add(new DoLinkCommand(0, 'n', Util.C
.changeTablePageNext(), next));
keysNavigation.add(
new DoLinkCommand(0, 'p', Util.C.changeTablePagePrev(), prev),
new DoLinkCommand(0, 'n', Util.C.changeTablePageNext(), next));
keysNavigation.add(new DoLinkCommand(0, '[', Util.C
.changeTablePagePrev(), prev));
keysNavigation.add(new DoLinkCommand(0, ']', Util.C
.changeTablePageNext(), next));
keysNavigation.add(
new DoLinkCommand(0, '[', Util.C.changeTablePagePrev(), prev),
new DoLinkCommand(0, ']', Util.C.changeTablePageNext(), next));
keysNavigation.add(new KeyCommand(0, 'R', Util.C.keyReloadSearch()) {
@Override