Tracker: Use Alt-L to set focus on Navigator's location

* Alt-L shortcut sets the focus to location input view in single navigation mode;
* Fixes #9602.

- GCI2013
This commit is contained in:
Puck Meerburg 2013-11-19 22:22:42 +00:00 committed by Siarzhuk Zharski
parent a6e7154312
commit fdc8f5b8c2
3 changed files with 9 additions and 1 deletions

View File

@ -4056,6 +4056,8 @@ BContainerWindow::SetSingleWindowBrowseShortcuts(bool enabled)
new BMessage(kNavigatorCommandUp), Navigator());
AddShortcut(B_DOWN_ARROW, B_OPTION_KEY | B_COMMAND_KEY,
new BMessage(kOpenSelection), PoseView());
AddShortcut('L', B_COMMAND_KEY,
new BMessage(kNavigatorCommandSetFocus), Navigator());
} else {
RemoveShortcut(B_LEFT_ARROW, B_COMMAND_KEY);
@ -4078,6 +4080,7 @@ BContainerWindow::SetSingleWindowBrowseShortcuts(bool enabled)
AddShortcut(B_UP_ARROW, B_COMMAND_KEY | B_OPTION_KEY,
new BMessage(kOpenParentDir), PoseView());
// command + option results in closing the parent window
RemoveShortcut('L', B_COMMAND_KEY);
}
}

View File

@ -234,6 +234,10 @@ BNavigator::MessageReceived(BMessage* message)
GoTo();
break;
case kNavigatorCommandSetFocus:
fLocation->MakeFocus();
break;
default:
{
// Catch any dropped refs and try to switch to this new directory

View File

@ -58,7 +58,8 @@ enum NavigationAction
kNavigatorCommandBackward = 'NVBW',
kNavigatorCommandForward = 'NVFW',
kNavigatorCommandUp = 'NVUP',
kNavigatorCommandLocation = 'NVLC'
kNavigatorCommandLocation = 'NVLC',
kNavigatorCommandSetFocus = 'NVSF'
};