From 9e98e0200604fe2c01511162ce6be0adb1de4c07 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 24 Feb 2008 01:43:54 +0000 Subject: Adding Pamphlet for Brian. --- Cydia.app/reload.png | Bin 976 -> 982 bytes Cydia.mm | 25 ++++++++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Cydia.app/reload.png b/Cydia.app/reload.png index 71dc424..8d06eb4 100644 Binary files a/Cydia.app/reload.png and b/Cydia.app/reload.png differ diff --git a/Cydia.mm b/Cydia.mm index a8474b1..04c0dbe 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -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; -- cgit v1.2.3