aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPBundleEditorController.m14
-rw-r--r--Source/SPCopyTable.m2
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];