summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-19 15:37:15 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-02-19 16:44:27 -0800
commit4187453f7ddca4228cecb5ab9512b52f3886e41a (patch)
treebcf184331ea581011d42fdaf876ce1ca17bdbdd8 /MobileCydia.mm
parent27024935c34952e65f0513facd94f7baddaaeb57 (diff)
Move setConfigurationData: to main thread.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm18
1 files changed, 5 insertions, 13 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index c1a99dc..abe7cd5 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -3251,9 +3251,9 @@ static NSString *Warning_;
size_t size(line.size());
lprintf("S:%s\n", data);
- if (conffile_r(data, size)) {
- [delegate_ setConfigurationData:conffile_r[1]];
- } else if (strncmp(data, "status: ", 8) == 0)
+ if (conffile_r(data, size))
+ [delegate_ performSelectorOnMainThread:@selector(setConfigurationData:) withObject:conffile_r[1] waitUntilDone:YES];
+ else if (strncmp(data, "status: ", 8) == 0)
[delegate_ performSelectorOnMainThread:@selector(setProgressTitle:) withObject:[NSString stringWithUTF8String:(data + 8)] waitUntilDone:YES];
else if (pmstatus_r(data, size)) {
std::string type([pmstatus_r[1] UTF8String]);
@@ -3272,7 +3272,7 @@ static NSString *Warning_;
else if (type == "pmstatus")
[delegate_ performSelectorOnMainThread:@selector(setProgressTitle:) withObject:string waitUntilDone:YES];
else if (type == "pmconffile")
- [delegate_ setConfigurationData:string];
+ [delegate_ performSelectorOnMainThread:@selector(setConfigurationData:) withObject:string waitUntilDone:YES];
else
lprintf("E:unknown pmstatus\n");
} else
@@ -5070,14 +5070,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
];
}
-- (void) setConfigurationData:(NSString *)data {
- [self
- performSelectorOnMainThread:@selector(_setConfigurationData:)
- withObject:data
- waitUntilDone:YES
- ];
-}
-
- (void) setProgressError:(NSString *)error withTitle:(NSString *)title {
CYAlertView *sheet([[[CYAlertView alloc]
initWithTitle:title
@@ -5097,7 +5089,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
return false;
}
-- (void) _setConfigurationData:(NSString *)data {
+- (void) setConfigurationData:(NSString *)data {
static Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
if (!conffile_r(data)) {