ChangeScreen2: Add key binding for Expand All/Collapse All buttons
eb924ff74ainroduced one of the most wanted features, that the whole community has been waiting for years. Let's add key bindings for that too. Change-Id: I9b159a9a877cf95edd1628329a9448de3a59fe21 (cherry picked from commit79f675a5a5)
This commit is contained in:
committed by
David Ostrovsky
parent
a310bbc448
commit
ffd17c0f32
@@ -250,6 +250,18 @@ public class ChangeScreen2 extends Screen {
|
||||
}
|
||||
}
|
||||
});
|
||||
keysAction.add(new KeyCommand(0, 'x', Util.C.keyExpandAllMessages()) {
|
||||
@Override
|
||||
public void onKeyPress(KeyPressEvent event) {
|
||||
onExpandAll(null);
|
||||
}
|
||||
});
|
||||
keysAction.add(new KeyCommand(0, 'z', Util.C.keyCollapseAllMessages()) {
|
||||
@Override
|
||||
public void onKeyPress(KeyPressEvent event) {
|
||||
onCollapseAll(null);
|
||||
}
|
||||
});
|
||||
if (Gerrit.isSignedIn()) {
|
||||
keysAction.add(new KeyCommand(0, 's', Util.C.changeTableStar()) {
|
||||
@Override
|
||||
|
||||
@@ -62,6 +62,8 @@ public interface ChangeConstants extends Constants {
|
||||
String keyEditTopic();
|
||||
String keyEditMessage();
|
||||
String keyAddReviewers();
|
||||
String keyExpandAllMessages();
|
||||
String keyCollapseAllMessages();
|
||||
|
||||
String patchTableColumnName();
|
||||
String patchTableColumnComments();
|
||||
|
||||
@@ -42,6 +42,8 @@ keyPublishComments = Review and publish comments
|
||||
keyEditTopic = Edit change topic
|
||||
keyEditMessage = Edit commit message
|
||||
keyAddReviewers = Add reviewers
|
||||
keyExpandAllMessages = Expand all messages
|
||||
keyCollapseAllMessages = Collapse all messages
|
||||
|
||||
|
||||
patchTableColumnName = File Path
|
||||
|
||||
Reference in New Issue
Block a user