diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2008-02-24 01:43:54 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2008-02-24 01:43:54 +0000 |
commit | 9e98e0200604fe2c01511162ce6be0adb1de4c07 (patch) | |
tree | 787fa8e612c3fc3197ce077cefda2cf4f35ed98f /Cydia.mm | |
parent | 06aa974d197d4fa545111221cb274aa5ba7a9e38 (diff) |
Adding Pamphlet for Brian.
Diffstat (limited to 'Cydia.mm')
-rw-r--r-- | Cydia.mm | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -501,6 +501,7 @@ inline float interpolate(float begin, float end, float fraction) { - (void) dealloc; - (void) navigationBar:(UINavigationBar *)navbar poppedItem:(UINavigationItem *)item; +- (void) alertSheet:(UIAlertSheet *)sheet buttonClicked:(int)button; - (id) initWithFrame:(CGRect)frame; - (void) setDelegate:(id)delegate; @@ -537,6 +538,10 @@ inline float interpolate(float begin, float end, float fraction) { } } +- (void) alertSheet:(UIAlertSheet *)sheet buttonClicked:(int)button { + [sheet dismiss]; +} + - (id) initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame]) != nil) { views_ = [[NSMutableArray arrayWithCapacity:4] retain]; @@ -579,6 +584,16 @@ inline float interpolate(float begin, float end, float fraction) { } - (void) configurePushed { + UIAlertSheet *sheet = [[[UIAlertSheet alloc] + initWithTitle:@"Sources Unimplemented" + buttons:[NSArray arrayWithObjects:@"Okay", nil] + defaultButtonIndex:0 + delegate:self + context:self + ] autorelease]; + + [sheet setBodyText:@"This feature will be implemented soon. In the mean time, you may add sources by adding .list files to '/etc/apt/sources.list.d' or modifying '/etc/apt/sources.list'."]; + [sheet popupAlertAnimated:YES]; } - (void) reloadPushed { @@ -1135,7 +1150,7 @@ NSString *Scour(const char *field, const char *begin, const char *end) { } - (NSComparisonResult) compareBySectionAndName:(Package *)package { - NSComparisonResult result = [[self section] caseInsensitiveCompare:[package section]]; + NSComparisonResult result = [[self section] compare:[package section]]; if (result != NSOrderedSame) return result; return [self compareByName:package]; @@ -3180,11 +3195,13 @@ NSString *Scour(const char *field, const char *begin, const char *end) { if (size_t count = [changes_ count]) { NSString *badge([[NSNumber numberWithInt:count] stringValue]); [buttonbar_ setBadgeValue:badge forButton:3]; - [buttonbar_ setBadgeAnimated:YES forButton:3]; + if ([buttonbar_ respondsToSelector:@selector(setBadgeAnimated:forButton:)]) + [buttonbar_ setBadgeAnimated:YES forButton:3]; [self setApplicationBadge:badge]; } else { [buttonbar_ setBadgeValue:nil forButton:3]; - [buttonbar_ setBadgeAnimated:NO forButton:3]; + if ([buttonbar_ respondsToSelector:@selector(setBadgeAnimated:forButton:)]) + [buttonbar_ setBadgeAnimated:NO forButton:3]; [self removeApplicationBadge]; } @@ -3658,6 +3675,8 @@ int main(int argc, char *argv[]) { else Packages_ = [Metadata_ objectForKey:@"Packages"]; + system("dpkg --configure -a"); + UIApplicationMain(argc, argv, [Cydia class]); [pool release]; return 0; |