From ad92dcb5b130b6543db0b85c322984f521c9ad0c Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 19 Nov 2010 00:26:57 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20tiny=20issues=20for=20Bundle=20Edit?= =?UTF-8?q?or=20=E2=80=A2=20fixed=20selector=20name=20in=20CopyTable=20for?= =?UTF-8?q?=20Bundle=20Editor=20input=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPBundleEditorController.m | 14 +++++++++----- Source/SPCopyTable.m | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'Source') 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]; -- cgit v1.2.3