aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-07-11 00:29:00 +0000
committerrowanbeentje <rowan@beent.je>2011-07-11 00:29:00 +0000
commit79bba63e1bed358c458f49351d8c4836c0fec20b (patch)
treea56fa07a89a464dcf791ed15fee3acdbd1bf3b7b /Source
parent711366fe825bc3d02cae80772bd46cdac9dbe6a7 (diff)
downloadsequelpro-79bba63e1bed358c458f49351d8c4836c0fec20b.tar.gz
sequelpro-79bba63e1bed358c458f49351d8c4836c0fec20b.tar.bz2
sequelpro-79bba63e1bed358c458f49351d8c4836c0fec20b.zip
- Fix thread-safety issues creating the encoding popupbuttoncell on the Structure view (addresses http://spbug.com/l/2123 )
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableStructure.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m
index 618b37b4..0f5222a0 100644
--- a/Source/SPTableStructure.m
+++ b/Source/SPTableStructure.m
@@ -296,16 +296,16 @@
// Set up the encoding PopUpButtonCell
NSArray *encodings = [databaseDataInstance getDatabaseCharacterSetEncodings];
if ([encodings count]) {
- [encodingPopupCell removeAllItems];
- [encodingPopupCell addItemWithTitle:@""];
+ [[encodingPopupCell onMainThread] removeAllItems];
+ [[encodingPopupCell onMainThread] addItemWithTitle:@""];
// Populate encoding popup button
for (NSDictionary *encoding in encodings)
- [encodingPopupCell addItemWithTitle:(![encoding objectForKey:@"DESCRIPTION"]) ? [encoding objectForKey:@"CHARACTER_SET_NAME"] : [NSString stringWithFormat:@"%@ (%@)", [encoding objectForKey:@"DESCRIPTION"], [encoding objectForKey:@"CHARACTER_SET_NAME"]]];
+ [[encodingPopupCell onMainThread] addItemWithTitle:(![encoding objectForKey:@"DESCRIPTION"]) ? [encoding objectForKey:@"CHARACTER_SET_NAME"] : [NSString stringWithFormat:@"%@ (%@)", [encoding objectForKey:@"DESCRIPTION"], [encoding objectForKey:@"CHARACTER_SET_NAME"]]];
}
else {
- [encodingPopupCell addItemWithTitle:NSLocalizedString(@"Not available", @"not available label")];
+ [[encodingPopupCell onMainThread] addItemWithTitle:NSLocalizedString(@"Not available", @"not available label")];
}
// Process all the fields to normalise keys and add additional information