summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.app/manage.html99
-rw-r--r--MobileCydia.app/packages.pngbin6710 -> 0 bytes
-rw-r--r--MobileCydia.app/source.pngbin2295 -> 0 bytes
-rw-r--r--MobileCydia.app/source7.pngbin23769 -> 0 bytes
-rw-r--r--MobileCydia.app/source7@2x.pngbin24782 -> 0 bytes
-rw-r--r--MobileCydia.app/source7s.pngbin23690 -> 0 bytes
-rw-r--r--MobileCydia.app/source7s@2x.pngbin24640 -> 0 bytes
-rw-r--r--MobileCydia.app/source@2x.pngbin3595 -> 0 bytes
-rw-r--r--MobileCydia.app/sources.pngbin9252 -> 0 bytes
-rw-r--r--MobileCydia.app/storage.pngbin5228 -> 0 bytes
-rw-r--r--MobileCydia.mm321
11 files changed, 141 insertions, 279 deletions
diff --git a/MobileCydia.app/manage.html b/MobileCydia.app/manage.html
deleted file mode 100644
index 9aeab4d..0000000
--- a/MobileCydia.app/manage.html
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-16"?>
-<html><head>
- <title localize="MANAGE"></title>
- <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <script type="text/javascript" src="menes/menes.js"></script>
- <script type="text/javascript" src="localize.js"></script>
- <base target="_blank"/>
-
- <style>
- body {
- background-size: 7px 1px;
- display: table;
- font-family: Helvetica;
- height: 337px;
- margin: 0;
- padding: 0;
- -webkit-text-size-adjust: none;
- -webkit-user-select: none;
- }
-
- div.page {
- display: table-cell;
- text-align: center;
- margin: 0 auto;
- vertical-align: middle;
- width: 320px;
- }
-
- a.giant-button {
- background-color: rgba(0, 0, 0, .15);
- -webkit-border-radius: 10px;
- color: #193250;
- display: block;
- margin: 10px;
- text-decoration: none;
- }
-
- a.giant-button > img {
- display: inline-block;
- float: left;
- height: 80px;
- margin: 10px -10px 0 10px;
- width: 80px;
- vertical-align: middle;
- }
-
- a.giant-button > div.contents {
- display: inline-block;
- width: 190px;
- margin: 5px 10px 17px 10px;
- }
-
- a.giant-button > div.contents > label {
- display: block;
- font-size: 28px;
- margin: 8px 0 6px 0;
- text-align: center;
- text-shadow: rgba(200, 200, 200, 0.75) 1px 1px 0;
- }
-
- a.giant-button > div.contents > div {
- display: block;
- font-size: 12px;
- margin-left: 4px;
- text-align: center;
- }
- </style>
-</head><body><div class="page">
-<div class="dialog">
- <div class="panel">
-
-<a href="cydia://installed" class="giant-button">
- <img src="packages.png"/>
- <div class="contents">
- <label localize="PACKAGES"></label>
- <div localize="PACKAGES_EX"></div>
- </div>
-</a>
-
-<a href="cydia://sources" class="giant-button">
- <img src="sources.png"/>
- <div class="contents">
- <label localize="SOURCES"></label>
- <div localize="SOURCES_EX"></div>
- </div>
-</a>
-
-<a href="cydia://storage" class="giant-button">
- <img src="storage.png"/>
- <div class="contents">
- <label localize="STORAGE"></label>
- <div localize="STORAGE_EX"></div>
- </div>
-</a>
-
- </div>
-</div>
-</div></body></html>
diff --git a/MobileCydia.app/packages.png b/MobileCydia.app/packages.png
deleted file mode 100644
index 4e3a793..0000000
--- a/MobileCydia.app/packages.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/source.png b/MobileCydia.app/source.png
deleted file mode 100644
index 2dcfdbc..0000000
--- a/MobileCydia.app/source.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/source7.png b/MobileCydia.app/source7.png
deleted file mode 100644
index 070b5be..0000000
--- a/MobileCydia.app/source7.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/source7@2x.png b/MobileCydia.app/source7@2x.png
deleted file mode 100644
index ffef928..0000000
--- a/MobileCydia.app/source7@2x.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/source7s.png b/MobileCydia.app/source7s.png
deleted file mode 100644
index f3979cb..0000000
--- a/MobileCydia.app/source7s.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/source7s@2x.png b/MobileCydia.app/source7s@2x.png
deleted file mode 100644
index 5334fbc..0000000
--- a/MobileCydia.app/source7s@2x.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/source@2x.png b/MobileCydia.app/source@2x.png
deleted file mode 100644
index 65d70c3..0000000
--- a/MobileCydia.app/source@2x.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/sources.png b/MobileCydia.app/sources.png
deleted file mode 100644
index d7e6f76..0000000
--- a/MobileCydia.app/sources.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.app/storage.png b/MobileCydia.app/storage.png
deleted file mode 100644
index 3ca1c73..0000000
--- a/MobileCydia.app/storage.png
+++ /dev/null
Binary files differ
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 2e02459..734fd3d 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -1944,7 +1944,7 @@ struct ParsedPackage {
- (bool) isUnfilteredAndSearchedForBy:(NSArray *)query;
- (bool) isUnfilteredAndSelectedForBy:(NSString *)search;
- (bool) isInstalledAndUnfiltered:(NSNumber *)number;
-- (bool) isVisibleInSection:(NSString *)section;
+- (bool) isVisibleInSection:(NSString *)section source:(Source *)source;
- (bool) isVisibleInSource:(Source *)source;
@end
@@ -3079,13 +3079,16 @@ struct PackageNameOrdering :
return ![self uninstalled] && (![number boolValue] && role_ != 7 || [self unfiltered]);
}
-- (bool) isVisibleInSection:(NSString *)name {
+- (bool) isVisibleInSection:(NSString *)name source:(Source *)source {
NSString *section([self section]);
return (
name == nil ||
section == nil && [name length] == 0 ||
[name isEqualToString:section]
+ ) && (
+ source == nil ||
+ [self source] == source
) && [self visible];
}
@@ -6520,10 +6523,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
SEL filter_;
IMP imp_;
_H<NSObject> object_;
+ _H<NSObject> stuff_;
}
- (void) setObject:(id)object;
+- (void) setStuff:(id)object;
+- (void) setObject:(id)object andStuff:(id)stuff;
+
- (void) setObject:(id)object forFilter:(SEL)filter;
+- (void) setObject:(id)object andStuff:(id)stuff forFilter:(SEL)filter;
- (SEL) filter;
- (void) setFilter:(SEL)filter;
@@ -6554,10 +6562,28 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
object_ = object;
} }
+- (void) setStuff:(id)stuff {
+@synchronized (self) {
+ stuff_ = stuff;
+} }
+
+- (void) setObject:(id)object andStuff:(id)stuff {
+@synchronized (self) {
+ object_ = object;
+ stuff_ = stuff;
+} }
+
- (void) setObject:(id)object forFilter:(SEL)filter {
@synchronized (self) {
[self setFilter:filter];
- [self setObject:object];
+ object_ = object;
+} }
+
+- (void) setObject:(id)object andStuff:(id)stuff forFilter:(SEL)filter {
+@synchronized (self) {
+ [self setFilter:filter];
+ object_ = object;
+ stuff_ = stuff;
} }
- (NSMutableArray *) _reloadPackages {
@@ -6570,16 +6596,18 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
IMP imp;
SEL filter;
_H<NSObject> object;
+ _H<NSObject> stuff;
@synchronized (self) {
imp = imp_;
filter = filter_;
object = object_;
+ stuff = stuff_;
}
_profile(PackageTable$reloadData$Filter)
for (Package *package in packages)
- if ([package valid] && (*reinterpret_cast<bool (*)(id, SEL, id)>(imp))(package, filter, object))
+ if ([package valid] && (*reinterpret_cast<bool (*)(id, SEL, id, id)>(imp))(package, filter, object, stuff))
[filtered addObject:package];
_end
@@ -6589,7 +6617,15 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
- (id) initWithDatabase:(Database *)database title:(NSString *)title filter:(SEL)filter with:(id)object {
if ((self = [super initWithDatabase:database title:title]) != nil) {
[self setFilter:filter];
- [self setObject:object];
+ object_ = object;
+ } return self;
+}
+
+- (id) initWithDatabase:(Database *)database title:(NSString *)title filter:(SEL)filter with:(id)object with:(id)stuff {
+ if ((self = [super initWithDatabase:database title:title]) != nil) {
+ [self setFilter:filter];
+ object_ = object;
+ stuff_ = stuff;
} return self;
}
@@ -6667,62 +6703,6 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
@end
/* }}} */
-/* Manage Controller {{{ */
-@interface ManageController : CydiaWebViewController {
-}
-
-- (void) queueStatusDidChange;
-
-@end
-
-@implementation ManageController
-
-- (id) init {
- if ((self = [super init]) != nil) {
- [self setURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"manage" ofType:@"html"]]];
- } return self;
-}
-
-- (NSURL *) navigationURL {
- return [NSURL URLWithString:@"cydia://manage"];
-}
-
-- (UIBarButtonItem *) leftButton {
- return [[[UIBarButtonItem alloc]
- initWithTitle:UCLocalize("SETTINGS")
- style:UIBarButtonItemStylePlain
- target:self
- action:@selector(settingsButtonClicked)
- ] autorelease];
-}
-
-- (void) settingsButtonClicked {
- [delegate_ showSettings];
-}
-
-- (void) queueButtonClicked {
- [delegate_ queue];
-}
-
-- (UIBarButtonItem *) rightButton {
- return Queuing_ ? [[[UIBarButtonItem alloc]
- initWithTitle:UCLocalize("QUEUE")
- style:UIBarButtonItemStyleDone
- target:self
- action:@selector(queueButtonClicked)
- ] autorelease] : nil;
-}
-
-- (void) queueStatusDidChange {
- [self applyRightButton];
-}
-
-- (bool) isLoading {
- return !Queuing_ && [super isLoading];
-}
-
-@end
-/* }}} */
/* Refresh Bar {{{ */
@interface RefreshBar : UINavigationBar {
@@ -7213,45 +7193,52 @@ if (kCFCoreFoundationVersionNumber < 800) {
/* Section Controller {{{ */
@interface SectionController : FilteredPackageListController {
+ _H<NSString> key_;
_H<NSString> section_;
}
-- (id) initWithDatabase:(Database *)database section:(NSString *)section;
+- (id) initWithDatabase:(Database *)database source:(Source *)source section:(NSString *)section;
@end
@implementation SectionController
- (NSURL *) referrerURL {
- NSString *name = section_;
- if (name == nil)
- name = @"all";
-
- return [NSURL URLWithString:[NSString stringWithFormat:@"%@/#!/sections/%@", UI_, [name stringByAddingPercentEscapesIncludingReserved]]];
+ NSString *name(section_);
+ name = name ?: @"*";
+ NSString *key(key_);
+ key = key ?: @"*";
+ return [NSURL URLWithString:[NSString stringWithFormat:@"%@/#!/sections/%@/%@", UI_, [key stringByAddingPercentEscapesIncludingReserved], [name stringByAddingPercentEscapesIncludingReserved]]];
}
- (NSURL *) navigationURL {
- NSString *name = section_;
- if (name == nil)
- name = @"all";
-
- return [NSURL URLWithString:[NSString stringWithFormat:@"cydia://sections/%@", [name stringByAddingPercentEscapesIncludingReserved]]];
+ NSString *name(section_);
+ name = name ?: @"*";
+ NSString *key(key_);
+ key = key ?: @"*";
+ return [NSURL URLWithString:[NSString stringWithFormat:@"cydia://sections/%@/%@", [key stringByAddingPercentEscapesIncludingReserved], [name stringByAddingPercentEscapesIncludingReserved]]];
}
-- (id) initWithDatabase:(Database *)database section:(NSString *)name {
+- (id) initWithDatabase:(Database *)database source:(Source *)source section:(NSString *)section {
NSString *title;
- if (name == nil)
+ if (section == nil)
title = UCLocalize("ALL_PACKAGES");
- else if (![name isEqual:@""])
- title = [[NSBundle mainBundle] localizedStringForKey:Simplify(name) value:nil table:@"Sections"];
+ else if (![section isEqual:@""])
+ title = [[NSBundle mainBundle] localizedStringForKey:Simplify(section) value:nil table:@"Sections"];
else
title = UCLocalize("NO_SECTION");
- if ((self = [super initWithDatabase:database title:title filter:@selector(isVisibleInSection:) with:name]) != nil) {
- section_ = name;
+ if ((self = [super initWithDatabase:database title:title filter:@selector(isVisibleInSection:source:) with:section with:source]) != nil) {
+ key_ = [source key];
+ section_ = section;
} return self;
}
+- (void) reloadData {
+ [super setStuff:[database_ sourceWithKey:key_]];
+ [super reloadData];
+}
+
@end
/* }}} */
/* Sections Controller {{{ */
@@ -7260,12 +7247,13 @@ if (kCFCoreFoundationVersionNumber < 800) {
UITableViewDelegate
> {
_transient Database *database_;
+ _H<NSString> key_;
_H<NSMutableArray> sections_;
_H<NSMutableArray> filtered_;
_H<UITableView, 2> list_;
}
-- (id) initWithDatabase:(Database *)database;
+- (id) initWithDatabase:(Database *)database source:(Source *)source;
- (void) editButtonClicked;
@end
@@ -7273,7 +7261,13 @@ if (kCFCoreFoundationVersionNumber < 800) {
@implementation SectionsController
- (NSURL *) navigationURL {
- return [NSURL URLWithString:@"cydia://sections"];
+ return [NSURL URLWithString:[NSString stringWithFormat:@"cydia://sources/%@", [key_ stringByAddingPercentEscapesIncludingReserved]]];
+}
+
+- (Source *) source {
+ if (key_ == nil)
+ return nil;
+ return [database_ sourceWithKey:key_];
}
- (void) updateNavigationItem {
@@ -7354,6 +7348,7 @@ if (kCFCoreFoundationVersionNumber < 800) {
SectionController *controller = [[[SectionController alloc]
initWithDatabase:database_
+ source:[self source]
section:[section name]
] autorelease];
[controller setDelegate:delegate_];
@@ -7385,9 +7380,10 @@ if (kCFCoreFoundationVersionNumber < 800) {
[super releaseSubviews];
}
-- (id) initWithDatabase:(Database *)database {
+- (id) initWithDatabase:(Database *)database source:(Source *)source {
if ((self = [super init]) != nil) {
database_ = database;
+ key_ = [source key];
} return self;
}
@@ -7401,8 +7397,13 @@ if (kCFCoreFoundationVersionNumber < 800) {
NSMutableDictionary *sections([NSMutableDictionary dictionaryWithCapacity:32]);
+ Source *source([self source]);
+
_trace();
for (Package *package in packages) {
+ if (source != nil && [package source] != source)
+ continue;
+
NSString *name([package section]);
NSString *key(name == nil ? @"" : name);
@@ -8075,17 +8076,15 @@ if (kCFCoreFoundationVersionNumber < 800) {
- (void) queueStatusDidChange {
#if !AlwaysReload
- if (IsWildcat_) {
- if (Queuing_) {
- [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc]
- initWithTitle:UCLocalize("QUEUE")
- style:UIBarButtonItemStyleDone
- target:self
- action:@selector(queueButtonClicked)
- ] autorelease]];
- } else {
- [[self navigationItem] setLeftBarButtonItem:nil];
- }
+ if (Queuing_) {
+ [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc]
+ initWithTitle:UCLocalize("QUEUE")
+ style:UIBarButtonItemStyleDone
+ target:self
+ action:@selector(queueButtonClicked)
+ ] autorelease]];
+ } else {
+ [[self navigationItem] setLeftBarButtonItem:nil];
}
#endif
}
@@ -8165,6 +8164,13 @@ if (kCFCoreFoundationVersionNumber < 800) {
[NSThread detachNewThreadSelector:@selector(_setSource:) toTarget:self withObject:url_];
}
+- (void) setAllSource {
+ icon_ = [UIImage applicationImageNamed:@"folder.png"];
+ origin_ = UCLocalize("ALL_SOURCES");
+ label_ = UCLocalize("ALL_SOURCES_EX");
+ [content_ setNeedsDisplay];
+}
+
- (SourceCell *) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) != nil) {
UIView *content([self contentView]);
@@ -8219,45 +8225,6 @@ if (kCFCoreFoundationVersionNumber < 800) {
@end
/* }}} */
-/* Source Controller {{{ */
-@interface SourceController : FilteredPackageListController {
- _transient Source *source_;
- _H<NSString> key_;
-}
-
-- (id) initWithDatabase:(Database *)database source:(Source *)source;
-
-@end
-
-@implementation SourceController
-
-- (NSURL *) referrerURL {
- return [NSURL URLWithString:[NSString stringWithFormat:@"%@/#!/sources/%@", UI_, [key_ stringByAddingPercentEscapesIncludingReserved]]];
-}
-
-- (NSURL *) navigationURL {
- return [NSURL URLWithString:[NSString stringWithFormat:@"cydia://sources/%@", [key_ stringByAddingPercentEscapesIncludingReserved]]];
-}
-
-- (id) initWithDatabase:(Database *)database source:(Source *)source {
- if ((self = [super initWithDatabase:database title:[source label] filter:@selector(isVisibleInSource:) with:source]) != nil) {
- source_ = source;
- key_ = [source key];
- } return self;
-}
-
-- (void) reloadData {
- source_ = [database_ sourceWithKey:key_];
- key_ = [source_ key];
- [self setObject:source_];
-
- [[self navigationItem] setTitle:[source_ label]];
-
- [super reloadData];
-}
-
-@end
-/* }}} */
/* Sources Controller {{{ */
@interface SourcesController : CyteViewController <
UITableViewDataSource,
@@ -8316,57 +8283,70 @@ if (kCFCoreFoundationVersionNumber < 800) {
}
- (NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
- return 1;
+ return 2;
}
- (NSString *) tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
+ if (section == 1)
+ return UCLocalize("INDIVIDUAL_SOURCES");
return nil;
}
- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return [sources_ count];
+ switch (section) {
+ case 0: return 1;
+ case 1: return [sources_ count];
+ default: return 0;
+ }
}
- (Source *) sourceAtIndexPath:(NSIndexPath *)indexPath {
@synchronized (database_) {
if ([database_ era] != era_)
return nil;
-
+ if ([indexPath section] != 1)
+ return nil;
NSUInteger index([indexPath row]);
- return index < [sources_ count] ? [sources_ objectAtIndex:index] : nil;
+ if (index >= [sources_ count])
+ return nil;
+ return [sources_ objectAtIndex:index];
} }
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"SourceCell";
SourceCell *cell = (SourceCell *) [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
- if(cell == nil) cell = [[[SourceCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellIdentifier] autorelease];
- [cell setSource:[self sourceAtIndexPath:indexPath]];
+ if (cell == nil) cell = [[[SourceCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellIdentifier] autorelease];
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
+ Source *source([self sourceAtIndexPath:indexPath]);
+ if (source == nil)
+ [cell setAllSource];
+ else
+ [cell setSource:source];
+
return cell;
}
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- Source *source = [self sourceAtIndexPath:indexPath];
- if (source == nil) return;
-
- SourceController *controller = [[[SourceController alloc]
+ SectionsController *controller([[[SectionsController alloc]
initWithDatabase:database_
- source:source
- ] autorelease];
+ source:[self sourceAtIndexPath:indexPath]
+ ] autorelease]);
[controller setDelegate:delegate_];
-
[[self navigationController] pushViewController:controller animated:YES];
}
- (BOOL) tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
+ if ([indexPath section] != 1)
+ return false;
Source *source = [self sourceAtIndexPath:indexPath];
return [source record] != nil;
}
- (void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+ _assert([indexPath section] == 1);
if (editingStyle == UITableViewCellEditingStyleDelete) {
Source *source = [self sourceAtIndexPath:indexPath];
if (source == nil) return;
@@ -8684,7 +8664,7 @@ if (kCFCoreFoundationVersionNumber < 800) {
action:@selector(editButtonClicked)
] autorelease] animated:animated];
- if (IsWildcat_ && !editing)
+ if (!editing)
[[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc]
initWithTitle:UCLocalize("SETTINGS")
style:UIBarButtonItemStylePlain
@@ -9645,14 +9625,6 @@ if (kCFCoreFoundationVersionNumber < 800) {
NSString *destination = [[url absoluteString] substringFromIndex:([scheme length] + [@"://" length] + [base length] + [@"/" length])];
controller = [[[CydiaWebViewController alloc] initWithURL:[NSURL URLWithString:destination]] autorelease];
} else if (!external && [components count] == 1) {
- if ([base isEqualToString:@"manage"]) {
- controller = [[[ManageController alloc] init] autorelease];
- }
-
- if ([base isEqualToString:@"storage"]) {
- controller = [[[CydiaWebViewController alloc] initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/storage/", UI_]]] autorelease];
- }
-
if ([base isEqualToString:@"sources"]) {
controller = [[[SourcesController alloc] initWithDatabase:database_] autorelease];
}
@@ -9662,7 +9634,7 @@ if (kCFCoreFoundationVersionNumber < 800) {
}
if ([base isEqualToString:@"sections"]) {
- controller = [[[SectionsController alloc] initWithDatabase:database_] autorelease];
+ controller = [[[SectionsController alloc] initWithDatabase:database_ source:nil] autorelease];
}
if ([base isEqualToString:@"search"]) {
@@ -9688,9 +9660,9 @@ if (kCFCoreFoundationVersionNumber < 800) {
}
if (!external && [base isEqualToString:@"sections"]) {
- if ([argument isEqualToString:@"all"])
+ if ([argument isEqualToString:@"all"] || [argument isEqualToString:@"*"])
argument = nil;
- controller = [[[SectionController alloc] initWithDatabase:database_ section:argument] autorelease];
+ controller = [[[SectionController alloc] initWithDatabase:database_ source:nil section:argument] autorelease];
}
if (!external && [base isEqualToString:@"sources"]) {
@@ -9699,7 +9671,7 @@ if (kCFCoreFoundationVersionNumber < 800) {
[(SourcesController *)controller showAddSourcePrompt];
} else {
Source *source([database_ sourceWithKey:argument]);
- controller = [[[SourceController alloc] initWithDatabase:database_ source:source] autorelease];
+ controller = [[[SectionsController alloc] initWithDatabase:database_ source:source] autorelease];
}
}
@@ -9721,6 +9693,12 @@ if (kCFCoreFoundationVersionNumber < 800) {
}
}
}
+
+ if ([base isEqualToString:@"sections"]) {
+ Source *source([arg1 isEqualToString:@"*"] ? nil : [database_ sourceWithKey:arg1]);
+ NSString *section([arg2 isEqualToString:@"*"] ? nil : arg2);
+ controller = [[[SectionController alloc] initWithDatabase:database_ source:source section:section] autorelease];
+ }
}
[controller setDelegate:self];
@@ -9830,31 +9808,19 @@ if (kCFCoreFoundationVersionNumber < 800) {
if (kCFCoreFoundationVersionNumber < 800) {
items = [NSMutableArray arrayWithObjects:
[[[UITabBarItem alloc] initWithTitle:@"Cydia" image:[UIImage applicationImageNamed:@"home.png"] tag:0] autorelease],
- [[[UITabBarItem alloc] initWithTitle:UCLocalize("SECTIONS") image:[UIImage applicationImageNamed:@"install.png"] tag:0] autorelease],
+ [[[UITabBarItem alloc] initWithTitle:UCLocalize("SOURCES") image:[UIImage applicationImageNamed:@"install.png"] tag:0] autorelease],
[[[UITabBarItem alloc] initWithTitle:UCLocalize("CHANGES") image:[UIImage applicationImageNamed:@"changes.png"] tag:0] autorelease],
+ [[[UITabBarItem alloc] initWithTitle:UCLocalize("INSTALLED") image:[UIImage applicationImageNamed:@"manage.png"] tag:0] autorelease],
[[[UITabBarItem alloc] initWithTitle:UCLocalize("SEARCH") image:[UIImage applicationImageNamed:@"search.png"] tag:0] autorelease],
nil];
-
- if (IsWildcat_) {
- [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("SOURCES") image:[UIImage applicationImageNamed:@"source.png"] tag:0] autorelease] atIndex:3];
- [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("INSTALLED") image:[UIImage applicationImageNamed:@"manage.png"] tag:0] autorelease] atIndex:3];
- } else {
- [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("MANAGE") image:[UIImage applicationImageNamed:@"manage.png"] tag:0] autorelease] atIndex:3];
- }
} else {
items = [NSMutableArray arrayWithObjects:
[[[UITabBarItem alloc] initWithTitle:@"Cydia" image:[UIImage applicationImageNamed:@"home7.png"] selectedImage:[UIImage applicationImageNamed:@"home7s.png"]] autorelease],
- [[[UITabBarItem alloc] initWithTitle:UCLocalize("SECTIONS") image:[UIImage applicationImageNamed:@"install7.png"] selectedImage:[UIImage applicationImageNamed:@"install7s.png"]] autorelease],
+ [[[UITabBarItem alloc] initWithTitle:UCLocalize("SOURCES") image:[UIImage applicationImageNamed:@"install7.png"] selectedImage:[UIImage applicationImageNamed:@"install7s.png"]] autorelease],
[[[UITabBarItem alloc] initWithTitle:UCLocalize("CHANGES") image:[UIImage applicationImageNamed:@"changes7.png"] selectedImage:[UIImage applicationImageNamed:@"changes7s.png"]] autorelease],
+ [[[UITabBarItem alloc] initWithTitle:UCLocalize("INSTALLED") image:[UIImage applicationImageNamed:@"manage7.png"] selectedImage:[UIImage applicationImageNamed:@"manage7s.png"]] autorelease],
[[[UITabBarItem alloc] initWithTitle:UCLocalize("SEARCH") image:[UIImage applicationImageNamed:@"search7.png"] selectedImage:[UIImage applicationImageNamed:@"search7s.png"]] autorelease],
nil];
-
- if (IsWildcat_) {
- [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("SOURCES") image:[UIImage applicationImageNamed:@"source7.png"] selectedImage:[UIImage applicationImageNamed:@"source7s.png"]] autorelease] atIndex:3];
- [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("INSTALLED") image:[UIImage applicationImageNamed:@"manage7.png"] selectedImage:[UIImage applicationImageNamed:@"manage7s.png"]] autorelease] atIndex:3];
- } else {
- [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("MANAGE") image:[UIImage applicationImageNamed:@"manage7.png"] selectedImage:[UIImage applicationImageNamed:@"manage7s.png"]] autorelease] atIndex:3];
- }
}
NSMutableArray *controllers([NSMutableArray array]);
@@ -9982,14 +9948,9 @@ _trace();
- (NSArray *) defaultStartPages {
NSMutableArray *standard = [NSMutableArray array];
[standard addObject:[NSArray arrayWithObject:@"cydia://home"]];
- [standard addObject:[NSArray arrayWithObject:@"cydia://sections"]];
+ [standard addObject:[NSArray arrayWithObject:@"cydia://sources"]];
[standard addObject:[NSArray arrayWithObject:@"cydia://changes"]];
- if (!IsWildcat_) {
- [standard addObject:[NSArray arrayWithObject:@"cydia://manage"]];
- } else {
- [standard addObject:[NSArray arrayWithObject:@"cydia://installed"]];
- [standard addObject:[NSArray arrayWithObject:@"cydia://sources"]];
- }
+ [standard addObject:[NSArray arrayWithObject:@"cydia://installed"]];
[standard addObject:[NSArray arrayWithObject:@"cydia://search"]];
return standard;
}