From 040f27d6558e818439b6aff1d06bb41cd4854cba Mon Sep 17 00:00:00 2001 From: jakob Date: Thu, 28 Jan 2010 20:52:15 +0000 Subject: * fixed typo that prevented the document window from closing when choosing 'disconnect' in the connection error dialog * improved some comments --- Source/SPConnectionDelegate.m | 5 +++-- Source/SPSSHTunnel.m | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'Source') diff --git a/Source/SPConnectionDelegate.m b/Source/SPConnectionDelegate.m index fea894b6..d3c03c81 100644 --- a/Source/SPConnectionDelegate.m +++ b/Source/SPConnectionDelegate.m @@ -111,7 +111,8 @@ - (MCPConnectionCheck)connectionLost:(id)connection { [NSApp beginSheet:connectionErrorDialog modalForWindow:tableWindow modalDelegate:self didEndSelector:nil contextInfo:nil]; - NSInteger connectionErrorCode = [NSApp runModalForWindow:connectionErrorDialog]; + NSLog(@"Connection error on main thread? %d", [[NSThread currentThread] isMainThread] ); + NSInteger connectionErrorCode = [NSApp runModalForWindow:connectionErrorDialog]; [NSApp endSheet:connectionErrorDialog]; [connectionErrorDialog orderOut:nil]; @@ -130,7 +131,7 @@ * everything up before it's all deallocated as a result of the close. * Also sets alpha to fully transparent so accidental dialogs are hidden! */ -- (void) closeDocumentWindowAndDisconnect +- (void) closeDocumentWindowAndDisconnect:(id)anObject { _isConnected = NO; [self windowWillClose:nil]; diff --git a/Source/SPSSHTunnel.m b/Source/SPSSHTunnel.m index 9b53adda..48d17932 100644 --- a/Source/SPSSHTunnel.m +++ b/Source/SPSSHTunnel.m @@ -476,7 +476,7 @@ // request an answer on the main thread (UI stuff must be done on main thread) [self performSelectorOnMainThread:@selector(workerGetResponseForQuestion:) withObject:theQuestion waitUntilDone:YES]; - // wait until an answer is available + // wait for the signal in closeSSHQuestionSheet: while (!isAnswerAvailable) [answerAvailableCondition wait]; // save the answer @@ -533,7 +533,7 @@ // request password on the main thread (UI stuff must be done on main thread) [self performSelectorOnMainThread:@selector(workerGetPasswordForQuery:) withObject:theQuery waitUntilDone:YES]; - // wait until an answer is available + // wait for the signal in closeSSHPasswordSheet: while (!isAnswerAvailable) [answerAvailableCondition wait]; // save the answer -- cgit v1.2.3