From a52f4ee50f43aa8d269326dac045809cd873547d Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 8 Sep 2010 22:16:35 +0000 Subject: - Add a further UI hint in the form of a accessory view to the SSH key location dialogs (Note: r2615 and this commit both shamelessly stole the UI concept from Transmit 4; thanks to Panic for the inspiration!) --- Source/SPPreferenceController.m | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Source/SPPreferenceController.m') diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 42503649..c1f3877a 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -704,13 +704,17 @@ filePath = [[favoritesController valueForKeyPath:@"selection.sshKeyLocation"] lastPathComponent]; directoryPath = [[favoritesController valueForKeyPath:@"selection.sshKeyLocation"] stringByDeletingLastPathComponent]; } - [[NSOpenPanel openPanel] beginSheetForDirectory:directoryPath - file:filePath - types:[NSArray arrayWithObjects:@"pem", @"", nil] - modalForWindow:preferencesWindow - modalDelegate:self - didEndSelector:@selector(chooseSSHKeySheetDidEnd:returnCode:contextInfo:) - contextInfo:nil]; + + + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; + [openPanel setAccessoryView:sshKeyLocationHelp]; + [openPanel beginSheetForDirectory:directoryPath + file:filePath + types:[NSArray arrayWithObjects:@"pem", @"", nil] + modalForWindow:preferencesWindow + modalDelegate:self + didEndSelector:@selector(chooseSSHKeySheetDidEnd:returnCode:contextInfo:) + contextInfo:nil]; } /** -- cgit v1.2.3