Camino only - Bug 371856: Allow user-set menu shortcuts to beat our pseudo-menu shortcuts. r=stridey sr=pink
git-svn-id: svn://10.0.0.236/trunk@223988 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2cca9067c4
commit
1c04806efe
@ -120,6 +120,10 @@ static const int kEscapeKeyCode = 53;
|
||||
BOOL shiftKeyIsDown = (([theEvent modifierFlags] & NSShiftKeyMask) != 0);
|
||||
handled = [windowController handleCommandReturn:shiftKeyIsDown];
|
||||
} else if (keyChar == '+') {
|
||||
// If someone assigns this shortcuts to a menu, we want that to win.
|
||||
if ([[NSApp mainMenu] performKeyEquivalent:theEvent])
|
||||
return YES;
|
||||
|
||||
if ([windowController canMakeTextBigger])
|
||||
[windowController makeTextBigger:nil];
|
||||
else
|
||||
@ -127,6 +131,10 @@ static const int kEscapeKeyCode = 53;
|
||||
handled = YES;
|
||||
} else if (keyChar >= '1' && keyChar <= '9') {
|
||||
if (([theEvent modifierFlags] & standardModifierKeys) == NSCommandKeyMask) {
|
||||
// If someone assigns one of these shortcuts to a menu, we want that to win.
|
||||
if ([[NSApp mainMenu] performKeyEquivalent:theEvent])
|
||||
return YES;
|
||||
|
||||
// use |forceReuse| to disable looking at the modifier keys since we know the command
|
||||
// key is down right now.
|
||||
handled = [windowController loadBookmarkBarIndex:(keyChar - '1') openBehavior:eBookmarkOpenBehavior_ForceReuse];
|
||||
@ -143,6 +151,10 @@ static const int kEscapeKeyCode = 53;
|
||||
if ((([theEvent modifierFlags] & standardModifierKeys) == NSCommandKeyMask) &&
|
||||
[windowController validateActionBySelector:@selector(addBookmark:)])
|
||||
{
|
||||
// If someone assigns this shortcuts to a menu, we want that to win.
|
||||
if ([[NSApp mainMenu] performKeyEquivalent:theEvent])
|
||||
return YES;
|
||||
|
||||
[windowController addBookmark:nil];
|
||||
handled = YES;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user