diff options
-rw-r--r-- | Source/SPTableContent.h | 1 | ||||
-rw-r--r-- | Source/SPTableContent.m | 12 |
2 files changed, 2 insertions, 11 deletions
diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h index ac720d01..74329e20 100644 --- a/Source/SPTableContent.h +++ b/Source/SPTableContent.h @@ -125,7 +125,6 @@ BOOL _mainNibLoaded; BOOL isWorking; pthread_mutex_t tableValuesLock; - NSCondition *tableLoadingCondition; #ifndef SP_CODA NSMutableArray *nibObjectsToRelease; #endif diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 62f3b758..0d33c1ae 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -172,7 +172,6 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper usedQuery = [[NSString alloc] initWithString:@""]; tableLoadTimer = nil; - tableLoadingCondition = [NSCondition new]; blackColor = [NSColor blackColor]; lightGrayColor = [NSColor lightGrayColor]; @@ -1056,11 +1055,8 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper // Set up the table updates timer and wait for it to notify this thread about completion [[self onMainThread] initTableLoadTimer]; - [tableLoadingCondition lock]; - while (![tableValues dataDownloaded]) { - [tableLoadingCondition waitUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; - } - [tableLoadingCondition unlock]; + [tableValues awaitDataDownloaded]; + tableRowsCount = [tableValues count]; // If the final column autoresize wasn't performed, perform it @@ -1265,10 +1261,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper } if ([tableValues dataDownloaded]) { - [tableLoadingCondition lock]; - [tableLoadingCondition signal]; [self clearTableLoadTimer]; - [tableLoadingCondition unlock]; } // Check whether a table update is required, based on whether new rows are @@ -4226,7 +4219,6 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper if(fieldEditor) SPClear(fieldEditor); [self clearTableLoadTimer]; - SPClear(tableLoadingCondition); SPClear(tableValues); pthread_mutex_destroy(&tableValuesLock); SPClear(dataColumns); |