From 124cea03e0ddad4e041caafc3112e9c34a2af075 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 21 Feb 2011 03:14:26 -0800 Subject: [PATCH] Remove class Progress: it was slow anyway. --- MobileCydia.mm | 45 ++------------------------------------------- 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 9711d12a..e21e3d8f 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -1248,46 +1248,6 @@ class Status : } }; /* }}} */ -/* Progress Delegation {{{ */ -class Progress : - public OpProgress -{ - private: - _transient id delegate_; - float percent_; - - protected: - virtual void Update() { - /*if (abs(Percent - percent_) > 2) - //NSLog(@"%s:%s:%f", Op.c_str(), SubOp.c_str(), Percent); - percent_ = Percent; - }*/ - - //[delegate_ performSelectorOnMainThread:@selector(setProgressTitle:) withObject:[NSString stringWithUTF8String:Op.c_str()] waitUntilDone:YES]; - //[delegate_ performSelectorOnMainThread:@selector(setProgressPercent:) withObject:[NSNumber numberWithFloat:(Percent / 100)] waitUntilDone:YES]; - } - - public: - Progress() : - delegate_(nil), - percent_(0) - { - } - - void setDelegate(id delegate) { - delegate_ = delegate; - } - - id getDelegate() const { - return delegate_; - } - - virtual void Done() { - //NSLog(@"DONE"); - //[delegate_ performSelectorOnMainThread:@selector(setProgressPercent:) withObject:[NSNumber numberWithFloat:1] waitUntilDone:YES]; - } -}; -/* }}} */ /* Database Interface {{{ */ typedef std::map< unsigned long, _H > SourceMap; @@ -1314,7 +1274,6 @@ typedef std::map< unsigned long, _H > SourceMap; _transient NSObject *delegate_; Status status_; - Progress progress_; int cydiafd_; int statusfd_; @@ -3499,7 +3458,8 @@ static NSString *Warning_; NSString *title(UCLocalize("DATABASE")); _trace(); - while (!cache_.Open(progress_, true)) { pop: + OpProgress progress; + while (!cache_.Open(progress, true)) { pop: std::string error; bool warning(!_error->PopMessage(error)); lprintf("cache_.Open():[%s]\n", error.c_str()); @@ -3816,7 +3776,6 @@ static NSString *Warning_; - (void) setDelegate:(id)delegate { delegate_ = delegate; status_.setDelegate(delegate); - progress_.setDelegate(delegate); } - (Source *) getSource:(pkgCache::PkgFileIterator)file { -- 2.47.2