summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2010-10-16 13:28:12 -0700
committerGrant Paul <chpwn@chpwn.com>2010-10-16 13:28:12 -0700
commit72b825bcd9ce6f4691759dec0a0c31a19ed0e581 (patch)
treebd3c400e08cbfe67a7fcdce830dc9a66f8820b5c
parent0d43d640da137d0de4b4d66613898d3a0eed4808 (diff)
Removed reloading data when clearing queue. Method of clearing without reloading confirmed in Synaptic Package Manager, so it's probably right.
-rw-r--r--Cydia.mm18
1 files changed, 11 insertions, 7 deletions
diff --git a/Cydia.mm b/Cydia.mm
index c64a587..b7d2b35 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -8349,19 +8349,23 @@ static _finline void _setHomePage(Cydia *self) {
- (void) cancelAndClear:(bool)clear {
@synchronized (self) {
if (clear) {
- /* XXX: clear marks instead of reloading data */
- /*pkgCacheFile &cache([database_ cache]);
+ // Clear all marks.
+ pkgCacheFile &cache([database_ cache]);
for (pkgCache::PkgIterator iterator = cache->PkgBegin(); !iterator.end(); ++iterator) {
- if (!cache[iterator].Keep()) cache->MarkKeep(iterator, false, false);
+ // Unmark method taken from Synaptic Package Manager.
+ // Thanks for being sane, unlike Aptitude.
+ if (!cache[iterator].Keep()) {
+ cache->MarkKeep(iterator, false);
+ cache->SetReInstall(iterator, false);
+ }
}
- [self updateData];
-
+ // Stop queuing, and let the appropriate controller know it.
Queuing_ = false;
[[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kManageTag] != -1 ? [self indexOfTabWithTag:kManageTag] : [self indexOfTabWithTag:kInstalledTag]] tabBarItem] setBadgeValue:nil];
- [queueDelegate_ queueStatusDidChange];*/
- [self reloadData];
+ [queueDelegate_ queueStatusDidChange];
} else {
+ // Start queuing, and let the controllers know.
Queuing_ = true;
[[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kManageTag] != -1 ? [self indexOfTabWithTag:kManageTag] : [self indexOfTabWithTag:kInstalledTag]] tabBarItem] setBadgeValue:UCLocalize("Q_D")];