aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleEditorController.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-11-19 00:26:57 +0000
committerBibiko <bibiko@eva.mpg.de>2010-11-19 00:26:57 +0000
commitad92dcb5b130b6543db0b85c322984f521c9ad0c (patch)
treea9c89ee28e71f8abd2a613bdeef5ffebd7d7e4ef /Source/SPBundleEditorController.m
parent3f11234f767748cefc04ec42de6008954359b19d (diff)
downloadsequelpro-ad92dcb5b130b6543db0b85c322984f521c9ad0c.tar.gz
sequelpro-ad92dcb5b130b6543db0b85c322984f521c9ad0c.tar.bz2
sequelpro-ad92dcb5b130b6543db0b85c322984f521c9ad0c.zip
• fixed tiny issues for Bundle Editor
• fixed selector name in CopyTable for Bundle Editor input action
Diffstat (limited to 'Source/SPBundleEditorController.m')
-rw-r--r--Source/SPBundleEditorController.m14
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index 21cedc6e..deb8e0be 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -708,17 +708,20 @@
// Transform KeyCombo struct to KeyBinding.dict format for NSMenuItems
NSMutableString *keyEq = [NSMutableString string];
+ NSString *theChar = [[aRecorder keyCharsIgnoringModifiers] lowercaseString];
[keyEq setString:@""];
if(newKeyCombo.code > -1) {
if(newKeyCombo.flags & NSControlKeyMask)
[keyEq appendString:@"^"];
if(newKeyCombo.flags & NSAlternateKeyMask)
[keyEq appendString:@"~"];
- if(newKeyCombo.flags & NSShiftKeyMask)
+ if(newKeyCombo.flags & NSShiftKeyMask) {
[keyEq appendString:@"$"];
+ theChar = [theChar uppercaseString];
+ }
if(newKeyCombo.flags & NSCommandKeyMask)
[keyEq appendString:@"@"];
- [keyEq appendString:[aRecorder keyCharsIgnoringModifiers]];
+ [keyEq appendString:theChar];
}
[[commandBundleArray objectAtIndex:[commandsTableView selectedRow]] setObject:keyEq forKey:SPBundleFileKeyEquivalentKey];
@@ -821,9 +824,6 @@
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
- // Allow to record short-cuts used by the Bundle Editor
- if([[NSApp mainWindow] firstResponder] == keyEquivalentField) return NO;
-
SEL action = [menuItem action];
if ( (action == @selector(duplicateCommandBundle:))
@@ -831,10 +831,14 @@
|| (action == @selector(saveBundle:))
)
{
+ // Allow to record short-cuts used by the Bundle Editor
+ if([[NSApp mainWindow] firstResponder] == keyEquivalentField) return NO;
return ([commandsTableView numberOfSelectedRows] == 1);
}
else if ( (action == @selector(removeCommandBundle:)) )
{
+ // Allow to record short-cuts used by the Bundle Editor
+ if([[NSApp mainWindow] firstResponder] == keyEquivalentField) return NO;
return ([commandsTableView numberOfSelectedRows] > 0);
}