diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-11-19 00:26:57 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-11-19 00:26:57 +0000 |
commit | ad92dcb5b130b6543db0b85c322984f521c9ad0c (patch) | |
tree | a9c89ee28e71f8abd2a613bdeef5ffebd7d7e4ef | |
parent | 3f11234f767748cefc04ec42de6008954359b19d (diff) | |
download | sequelpro-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
-rw-r--r-- | Source/SPBundleEditorController.m | 14 | ||||
-rw-r--r-- | Source/SPCopyTable.m | 2 |
2 files changed, 10 insertions, 6 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); } diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index c54e0cee..045d7856 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -864,7 +864,7 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; input = [self rowsAsCsvStringWithHeaders:YES onlySelectedRows:YES]; } else if([inputAction isEqualToString:SPBundleInputSourceSelectedTableRowsAsSqlInsert]) { - input = [self selectedRowsAsSqlInsertsOnlySelectedRows:YES]; + input = [self rowsAsSqlInsertsOnlySelectedRows:YES]; } else if([inputAction isEqualToString:SPBundleInputSourceTableRowsAsTab]) { input = [self rowsAsTabStringWithHeaders:YES onlySelectedRows:NO]; |