From f99f86e24e844ab573ab88d3100da00b7772ae36 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 4 Oct 2010 03:37:09 -0700 Subject: [PATCH] Removed tabs and trailing space characters from codebase. --- Cydia.app/confirm.js | 4 +- Cydia.app/package.html | 4 +- Cydia.mm | 134 +++++++++++++++++++------------------- UICaboodle/BrowserView.h | 2 +- UICaboodle/BrowserView.mm | 116 ++++++++++++++++----------------- UICaboodle/RVBook.h | 2 +- UICaboodle/RVBook.mm | 8 +-- UICaboodle/RVPage.h | 2 +- UICaboodle/RVPage.mm | 4 +- UICaboodle/UCString.h | 2 +- 10 files changed, 139 insertions(+), 139 deletions(-) diff --git a/Cydia.app/confirm.js b/Cydia.app/confirm.js index cc00bf47..efffdc4a 100644 --- a/Cydia.app/confirm.js +++ b/Cydia.app/confirm.js @@ -7,7 +7,7 @@ $(function () { $(".downloading").remove(); else $("#downloading").html($.xml(downloading)); - + var resuming = sizes[1]; if (resuming == "0.0 B") $(".resuming").remove(); @@ -15,7 +15,7 @@ $(function () { $("#resuming").html($.xml(resuming)); } else for (var i = 0; i != issues.length; ++i) { document.title = cydia.localize("CANNOT_COMPLY"); - + $(".queue").remove(); $("._issues").remove(); diff --git a/Cydia.app/package.html b/Cydia.app/package.html index aacd6b7c..c91b52ce 100644 --- a/Cydia.app/package.html +++ b/Cydia.app/package.html @@ -42,13 +42,13 @@ -webkit-transition-property: transform; } - .fade-out { + .fade-out { opacity: 0; -webkit-transition-property: opacity; -webkit-transition-duration: 2s; } - .fade-in { + .fade-in { opacity: 1; -webkit-transition-property: opacity; -webkit-transition-duration: 2s; diff --git a/Cydia.mm b/Cydia.mm index 9e12518f..c28f93d9 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -711,7 +711,7 @@ NSUInteger DOMNodeList$countByEnumeratingWithState$objects$count$(DOMNodeList *s - (NSString *) stringByAddingPercentEscapesIncludingReserved { return [(id)CFURLCreateStringByAddingPercentEscapes( - kCFAllocatorDefault, + kCFAllocatorDefault, (CFStringRef) self, NULL, CFSTR(";/?:@&=+$,"), @@ -4013,7 +4013,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (id) invokeDefaultMethodWithArguments:(NSArray *)args { [self dismissModalViewControllerAnimated:YES]; [delegate_ cancelAndClear:NO]; - + return nil; } @@ -4135,7 +4135,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if (issues_ == nil && ![self isLoading]) [[self navigationItem] setRightBarButtonItem:rightItem]; else [super applyRightButton]; #else - [[self navigationItem] setRightBarButtonItem:nil]; + [[self navigationItem] setRightBarButtonItem:nil]; #endif [rightItem release]; } @@ -4296,7 +4296,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { (bounds.size.width - prgsize.width) / 2, bounds.size.height - prgsize.height - 64 }, prgsize}; - + float closewidth = bounds.size.width - 20; if (closewidth > 300) closewidth = 300; @@ -4325,7 +4325,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [super viewDidAppear:animated]; [[self navigationItem] setHidesBackButton:YES]; [[[self navigationController] navigationBar] setBarStyle:UIBarStyleBlack]; - + [self positionViews]; } @@ -4975,7 +4975,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) drawContentRect:(CGRect)rect { BOOL selected = [self isSelected]; - + [icon_ drawInRect:CGRectMake(8, 7, 32, 32)]; if (selected) @@ -5174,7 +5174,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { NSString *buttonName = [buttons_ objectAtIndex:button]; [self _clickButtonWithName:buttonName]; } - + [sheet dismissWithClickedButtonIndex:-1 animated:YES]; } } @@ -5218,13 +5218,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [sheet setCancelButtonIndex:[sheet numberOfButtons] - 1]; } [sheet setContext:@"modify"]; - + [delegate_ showActionSheet:sheet fromItem:[[self navigationItem] rightBarButtonItem]]; } } - (void) actionButtonClicked { - // Wait until it's done loading. + // Wait until it's done loading. if (![self isLoading]) [self _actionButtonClicked]; } @@ -5312,7 +5312,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { action:@selector(actionButtonClicked) ]; if (![self isLoading]) [[self navigationItem] setRightBarButtonItem:actionItem]; - else [super applyRightButton]; + else [super applyRightButton]; [actionItem release]; } @@ -5591,13 +5591,13 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (id) initWithDatabase:(Database *)database title:(NSString *)title filter:(SEL)filter with:(id)object; @end - + @implementation FilteredPackageController - (void) dealloc { [packages_ release]; [title_ release]; - + [super dealloc]; } @@ -5645,7 +5645,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } @end - + /* }}} */ /* Add Source Controller {{{ */ @@ -5698,7 +5698,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) setSource:(Source *)source { [self clearSource]; - + if (icon_ == nil) icon_ = [UIImage applicationImageNamed:[NSString stringWithFormat:@"Sources/%@.png", [source host]]]; if (icon_ == nil) @@ -5871,7 +5871,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { SourceCell *cell = (SourceCell *) [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; if(cell == nil) cell = [[[SourceCell alloc] initWithFrame:CGRectZero reuseIdentifier:cellIdentifier] autorelease]; [cell setSource:[self sourceAtIndexPath:indexPath]]; - + return cell; } @@ -6112,7 +6112,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { if ((self = [super init]) != nil) { [[self navigationItem] setTitle:UCLocalize("SOURCES")]; [self updateButtonsForEditingStatus:NO animated:NO]; - + database_ = database; sources_ = [[NSMutableArray arrayWithCapacity:16] retain]; @@ -6198,7 +6198,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { ]; [[self navigationItem] setRightBarButtonItem:rightItem animated:animated]; [rightItem release]; - + if (IsWildcat_ && !editing) { UIBarButtonItem *settingsItem = [[UIBarButtonItem alloc] initWithTitle:UCLocalize("SETTINGS") @@ -6217,7 +6217,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void) editButtonClicked { [list_ setEditing:![list_ isEditing] animated:YES]; - + [self updateButtonsForEditingStatus:[list_ isEditing] animated:YES]; } @@ -6373,7 +6373,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (id) init { if ((self = [super init]) != nil) { [[self navigationItem] setTitle:UCLocalize("MANAGE")]; - + UIBarButtonItem *settingsItem = [[UIBarButtonItem alloc] initWithTitle:UCLocalize("SETTINGS") style:UIBarButtonItemStylePlain @@ -6382,7 +6382,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { ]; [[self navigationItem] setLeftBarButtonItem:settingsItem]; [settingsItem release]; - + [self queueStatusDidChange]; } return self; } @@ -6415,7 +6415,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { action:@selector(queueButtonClicked) ]; [[self navigationItem] setRightBarButtonItem:queueItem]; - + [queueItem release]; } else { [[self navigationItem] setRightBarButtonItem:nil]; @@ -6447,19 +6447,19 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { frame.origin.x = [self frame].size.width - frame.size.width - 5; frame.origin.y = ([self frame].size.height - frame.size.height) / 2; [cancel_ setFrame:frame]; - + CGSize prgsize = {75, 100}; CGRect prgrect = {{ [self frame].size.width - prgsize.width - 10, ([self frame].size.height - prgsize.height) / 2 } , prgsize}; [progress_ setFrame:prgrect]; - + CGSize indsize([UIProgressIndicator defaultSizeForStyle:[indicator_ activityIndicatorViewStyle]]); unsigned indoffset = ([self frame].size.height - indsize.height) / 2; CGRect indrect = {{indoffset, indoffset}, indsize}; [indicator_ setFrame:indrect]; - + CGSize prmsize = {215, indsize.height + 4}; CGRect prmrect = {{ indoffset * 2 + indsize.width, @@ -6470,7 +6470,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (void)setFrame:(CGRect)frame { [super setFrame:frame]; - + [self positionViews]; } @@ -6503,12 +6503,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [progress_ setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleLeftMargin]; [progress_ setStyle:0]; [self addSubview:progress_]; - + cancel_ = [[UINavigationButton alloc] initWithTitle:UCLocalize("CANCEL") style:UINavigationButtonStyleHighlighted]; [cancel_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin]; [cancel_ addTarget:delegate action:@selector(cancelPressed) forControlEvents:UIControlEventTouchUpInside]; [cancel_ setBarStyle:barstyle]; - + [self positionViews]; } return self; } @@ -6545,7 +6545,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { Database *database_; } -@end +@end @implementation CYTabBarController @@ -6939,7 +6939,7 @@ freeing the view controllers on tab change */ [list_ reloadData]; else [delegate_ updateData]; - + [[self navigationItem] setTitle:editing_ ? UCLocalize("SECTION_VISIBILITY") : UCLocalize("SECTIONS")]; [[[self navigationItem] rightBarButtonItem] setTitle:[sections_ count] == 0 ? nil : editing_ ? UCLocalize("DONE") : UCLocalize("EDIT")]; [[[self navigationItem] rightBarButtonItem] setStyle:editing_ ? UIBarButtonItemStyleDone : UIBarButtonItemStylePlain]; @@ -7218,8 +7218,8 @@ freeing the view controllers on tab change */ } - (void)viewDidAppear:(BOOL)animated { - [super viewDidAppear:animated]; - if (!search_) { + [super viewDidAppear:animated]; + if (!search_) { search_ = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, [[self view] bounds].size.width, 44.0f)]; [search_ layoutSubviews]; [search_ setPlaceholder:UCLocalize("SEARCH_EX")]; @@ -7279,7 +7279,7 @@ freeing the view controllers on tab change */ [ignoredSwitch_ release]; [subscribedCell_ release]; [ignoredCell_ release]; - + [super dealloc]; } @@ -7335,7 +7335,7 @@ freeing the view controllers on tab change */ switch ([indexPath row]) { case 0: return subscribedCell_; case 1: return ignoredCell_; - + _nodefault } @@ -7452,7 +7452,7 @@ freeing the view controllers on tab change */ [table_ release]; [segment_ release]; [container_ release]; - + [super dealloc]; } @@ -7460,18 +7460,18 @@ freeing the view controllers on tab change */ if ((self = [super init])) { database_ = database; roledelegate_ = delegate; - + [[self navigationItem] setTitle:UCLocalize("WHO_ARE_YOU")]; - + NSArray *items = [NSArray arrayWithObjects: - UCLocalize("USER"), + UCLocalize("USER"), UCLocalize("HACKER"), UCLocalize("DEVELOPER"), nil]; segment_ = [[UISegmentedControl alloc] initWithItems:items]; container_ = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [[self view] frame].size.width, 44.0f)]; [container_ addSubview:segment_]; - + int index = -1; if ([Role_ isEqualToString:@"User"]) index = 0; if ([Role_ isEqualToString:@"Hacker"]) index = 1; @@ -7480,10 +7480,10 @@ freeing the view controllers on tab change */ [segment_ setSelectedSegmentIndex:index]; [self showDoneButton]; } - + [segment_ addTarget:self action:@selector(segmentChanged:) forControlEvents:UIControlEventValueChanged]; [self resizeSegmentedControl]; - + table_ = [[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStyleGrouped]; [table_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth]; [table_ setDelegate:self]; @@ -7500,7 +7500,7 @@ freeing the view controllers on tab change */ - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - + [self resizeSegmentedControl]; } @@ -7514,7 +7514,7 @@ freeing the view controllers on tab change */ - (void) save { NSString *role = nil; - + switch ([segment_ selectedSegmentIndex]) { case 0: role = @"User"; break; case 1: role = @"Hacker"; break; @@ -7525,7 +7525,7 @@ freeing the view controllers on tab change */ if (![role isEqualToString:Role_]) { Role_ = role; - + Settings_ = [NSMutableDictionary dictionaryWithObjectsAndKeys: Role_, @"Role", nil]; @@ -7533,7 +7533,7 @@ freeing the view controllers on tab change */ [Metadata_ setObject:Settings_ forKey:@"Settings"]; Changed_ = true; - + [roledelegate_ updateData]; } } @@ -7572,13 +7572,13 @@ freeing the view controllers on tab change */ } - (NSString *) tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section { - if (section == 1) + if (section == 1) return UCLocalize("ROLE_EX"); - if (section == 4) + if (section == 4) return [NSString stringWithFormat: @"%@: %@\n%@: %@\n%@: %@", - UCLocalize("USER"), UCLocalize("USER_EX"), - UCLocalize("HACKER"), UCLocalize("HACKER_EX"), + UCLocalize("USER"), UCLocalize("USER_EX"), + UCLocalize("HACKER"), UCLocalize("HACKER_EX"), UCLocalize("DEVELOPER"), UCLocalize("DEVELOPER_EX") ]; else return nil; @@ -7657,9 +7657,9 @@ freeing the view controllers on tab change */ - (void) beginUpdate { [self dropBar:YES]; [refreshbar_ start]; - + updating_ = true; - + [NSThread detachNewThreadSelector:@selector(performUpdate) toTarget:self @@ -7681,7 +7681,7 @@ freeing the view controllers on tab change */ - (void) completeUpdate { updating_ = false; - + [self raiseBar:YES]; [refreshbar_ stop]; [updatedelegate_ performSelector:@selector(reloadData) withObject:nil afterDelay:0]; @@ -7800,7 +7800,7 @@ freeing the view controllers on tab change */ [self raiseBar:NO]; [self dropBar:NO]; } - + // XXX: fix Apple's layout bug [[root_ selectedViewController] _updateLayoutForStatusBarAndInterfaceOrientation]; } @@ -7960,16 +7960,16 @@ static _finline void _setHomePage(Cydia *self) { if ([[controller tabBarItem] tag] == tag) return i; i += 1; } - + return -1; } - (void) _refreshIfPossible { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - + Reachability* reachability = [Reachability reachabilityWithHostName:@"cydia.saurik.com"]; NetworkStatus remoteHostStatus = [reachability currentReachabilityStatus]; - + if (loaded_ || ManualRefresh || remoteHostStatus == NotReachable) loaded: [self performSelectorOnMainThread:@selector(_loaded) withObject:nil waitUntilDone:NO]; else { @@ -8024,7 +8024,7 @@ static _finline void _setHomePage(Cydia *self) { NSString *badge([[NSNumber numberWithInt:changes] stringValue]); [[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kChangesTag]] tabBarItem] setBadgeValue:badge]; [[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kChangesTag]] tabBarItem] setAnimatedBadge:YES]; - + if ([self respondsToSelector:@selector(setApplicationBadge:)]) [self setApplicationBadge:badge]; else @@ -8032,7 +8032,7 @@ static _finline void _setHomePage(Cydia *self) { } else { [[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kChangesTag]] tabBarItem] setBadgeValue:nil]; [[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kChangesTag]] tabBarItem] setAnimatedBadge:NO]; - + if ([self respondsToSelector:@selector(removeApplicationBadge)]) [self removeApplicationBadge]; else // XXX: maybe use setApplicationBadgeString also? @@ -8172,7 +8172,7 @@ static _finline void _setHomePage(Cydia *self) { - (void) confirmWithNavigationController:(UINavigationController *)navigation { ProgressController *progress = [[[ProgressController alloc] initWithDatabase:database_ delegate:self] autorelease]; - + if (navigation != nil) { [navigation pushViewController:progress animated:YES]; } else { @@ -8180,7 +8180,7 @@ static _finline void _setHomePage(Cydia *self) { if (IsWildcat_) [navigation setModalPresentationStyle:UIModalPresentationFormSheet]; [container_ presentModalViewController:navigation animated:YES]; } - + [progress detachNewThreadSelector:@selector(perform) toTarget:database_ @@ -8252,7 +8252,7 @@ static _finline void _setHomePage(Cydia *self) { return installed_; } -- (void) tabBarController:(id)tabBarController didSelectViewController:(UIViewController *)viewController { +- (void) tabBarController:(id)tabBarController didSelectViewController:(UIViewController *)viewController { int tag = [[viewController tabBarItem] tag]; if (tag == tag_) { [(CYNavigationController *)[tabbar_ selectedViewController] popToRootViewControllerAnimated:YES]; @@ -8330,7 +8330,7 @@ static _finline void _setHomePage(Cydia *self) { } [self updateData]; - + Queuing_ = false; [[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kManageTag] != -1 ? [self indexOfTabWithTag:kManageTag] : [self indexOfTabWithTag:kInstalledTag]] tabBarItem] setBadgeValue:nil]; [queueDelegate_ queueStatusDidChange];*/ @@ -8340,7 +8340,7 @@ static _finline void _setHomePage(Cydia *self) { [[[[tabbar_ viewControllers] objectAtIndex:[self indexOfTabWithTag:kManageTag] != -1 ? [self indexOfTabWithTag:kManageTag] : [self indexOfTabWithTag:kInstalledTag]] tabBarItem] setBadgeValue:UCLocalize("Q_D")]; [(CYNavigationController *)[tabbar_ selectedViewController] reloadData]; - + [queueDelegate_ queueStatusDidChange]; } } @@ -8348,7 +8348,7 @@ static _finline void _setHomePage(Cydia *self) { - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button { NSString *context([alert context]); - + if ([context isEqualToString:@"fixhalf"]) { if (button == [alert firstOtherButtonIndex]) { @synchronized (self) { @@ -8503,10 +8503,10 @@ static _finline void _setHomePage(Cydia *self) { } } -- (void) applicationWillResignActive:(UIApplication *)application { +- (void) applicationWillResignActive:(UIApplication *)application { // Stop refreshing if you get a phone call or lock the device. if ([container_ updating]) [container_ cancelUpdate]; - + if ([[self superclass] instancesRespondToSelector:@selector(applicationWillResignActive:)]) [super applicationWillResignActive:application]; } @@ -8588,14 +8588,14 @@ static _finline void _setHomePage(Cydia *self) { [[[UITabBarItem alloc] initWithTitle:UCLocalize("SEARCH") image:[UIImage applicationImageNamed:@"search.png"] tag:kSearchTag] autorelease], nil ]; - + if (IsWildcat_) { [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("SOURCES") image:[UIImage applicationImageNamed:@"source.png"] tag:kSourcesTag] autorelease] atIndex:3]; [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("INSTALLED") image:[UIImage applicationImageNamed:@"manage.png"] tag:kInstalledTag] autorelease] atIndex:3]; } else { [items insertObject:[[[UITabBarItem alloc] initWithTitle:UCLocalize("MANAGE") image:[UIImage applicationImageNamed:@"manage.png"] tag:kManageTag] autorelease] atIndex:3]; } - + for (size_t i(0); i != [items count]; i++) [[controllers objectAtIndex:i] setTabBarItem:[items objectAtIndex:i]]; diff --git a/UICaboodle/BrowserView.h b/UICaboodle/BrowserView.h index 2f77f841..f2b0db87 100644 --- a/UICaboodle/BrowserView.h +++ b/UICaboodle/BrowserView.h @@ -65,7 +65,7 @@ bool editing_; Class class_; - + id reloaditem_; id loadingitem_; } diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index 8dd2afa0..ee8563f0 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -310,7 +310,7 @@ static Class $UIWebBrowserView; [reloaditem_ release]; if (loadingitem_ != nil) [loadingitem_ release]; - + [super dealloc]; } @@ -364,7 +364,7 @@ static Class $UIWebBrowserView; /* XXX: WebThreadLock? */ - (void) _fixScroller:(CGRect)bounds { - float extra; + float extra; if (!editing_ || $UIFormAssistant == nil) extra = 0; @@ -430,8 +430,8 @@ static Class $UIWebBrowserView; - (void) swapPage:(UCViewController *)page { [page setDelegate:delegate_]; if (pushed_) [[self navigationController] popViewControllerAnimated:NO]; - - [[self navigationController] pushViewController:page animated:NO]; + + [[self navigationController] pushViewController:page animated:NO]; } - (BOOL) getSpecial:(NSURL *)url swap:(BOOL)swap { @@ -576,7 +576,7 @@ static Class $UIWebBrowserView; [function_ autorelease]; function_ = function == nil ? nil : [function retain]; - [self applyRightButton]; + [self applyRightButton]; } - (void) setButtonTitle:(NSString *)button withStyle:(NSString *)style toFunction:(id)function { @@ -592,7 +592,7 @@ static Class $UIWebBrowserView; [function_ autorelease]; function_ = function == nil ? nil : [function retain]; - [self applyRightButton]; + [self applyRightButton]; } - (void) setFinishHook:(id)function { @@ -625,7 +625,7 @@ static Class $UIWebBrowserView; } - (void) webViewClose:(WebView *)sender { - [self close]; + [self close]; } - (void) close { @@ -675,15 +675,15 @@ static Class $UIWebBrowserView; [page setDelegate:delegate_]; [navigation setViewControllers:[NSArray arrayWithObject:page]]; - UIBarButtonItem *closeItem = [[UIBarButtonItem alloc] - initWithTitle:UCLocalize("CLOSE") - style:UIBarButtonItemStylePlain - target:page - action:@selector(close) - ]; - [[page navigationItem] setLeftBarButtonItem:closeItem]; - [closeItem release]; - + UIBarButtonItem *closeItem = [[UIBarButtonItem alloc] + initWithTitle:UCLocalize("CLOSE") + style:UIBarButtonItemStylePlain + target:page + action:@selector(close) + ]; + [[page navigationItem] setLeftBarButtonItem:closeItem]; + [closeItem release]; + [[self navigationController] presentModalViewController:navigation animated:YES]; } } else goto unknown; @@ -944,15 +944,15 @@ static Class $UIWebBrowserView; [browser loadRequest:request]; [navigation setViewControllers:[NSArray arrayWithObject:browser]]; - UIBarButtonItem *closeItem = [[UIBarButtonItem alloc] - initWithTitle:UCLocalize("CLOSE") - style:UIBarButtonItemStylePlain - target:browser - action:@selector(close) - ]; - [[browser navigationItem] setLeftBarButtonItem:closeItem]; - [closeItem release]; - + UIBarButtonItem *closeItem = [[UIBarButtonItem alloc] + initWithTitle:UCLocalize("CLOSE") + style:UIBarButtonItemStylePlain + target:browser + action:@selector(close) + ]; + [[browser navigationItem] setLeftBarButtonItem:closeItem]; + [closeItem release]; + [[self navigationController] presentModalViewController:navigation animated:YES]; } /*else if (request == nil) { [[self navigationItem] setTitle:title_]; @@ -1051,7 +1051,7 @@ static Class $UIWebBrowserView; } } - [self _startLoading]; + [self _startLoading]; } - (UIBarButtonItemStyle) rightButtonStyle { @@ -1066,12 +1066,12 @@ static Class $UIWebBrowserView; - (UIBarButtonItem *) customButton { UIBarButtonItem *customItem = [[UIBarButtonItem alloc] - initWithTitle:button_ - style:[self rightButtonStyle] - target:self - action:@selector(customButtonClicked) - ]; - + initWithTitle:button_ + style:[self rightButtonStyle] + target:self + action:@selector(customButtonClicked) + ]; + return [customItem autorelease]; } @@ -1080,15 +1080,15 @@ static Class $UIWebBrowserView; } - (void) applyRightButton { - if ([self isLoading]) { - [[self navigationItem] setRightBarButtonItem:loadingitem_ animated:YES]; - [[loadingitem_ view] addSubview:indicator_]; + if ([self isLoading]) { + [[self navigationItem] setRightBarButtonItem:loadingitem_ animated:YES]; + [[loadingitem_ view] addSubview:indicator_]; [self applyLoadingTitle]; } else if (button_) { [[self navigationItem] setRightBarButtonItem:[self customButton] animated:YES]; } else { [[self navigationItem] setRightBarButtonItem:reloaditem_ animated:YES]; - } + } } - (void) _startLoading { @@ -1104,8 +1104,8 @@ static Class $UIWebBrowserView; if (finish_ != nil) [self callFunction:finish_]; - [self applyRightButton]; - if (![self isLoading]) [[self navigationItem] setTitle:title_]; + [self applyRightButton]; + if (![self isLoading]) [[self navigationItem] setTitle:title_]; } - (bool) isLoading { @@ -1344,7 +1344,7 @@ static Class $UIWebBrowserView; BrowserView *actualView = [[BrowserView alloc] initWithFrame:CGRectZero]; [self setView:actualView]; - + struct CGRect bounds = [[self view] bounds]; scroller_ = [[objc_getClass(Wildcat_ ? "UIScrollView" : "UIScroller") alloc] initWithFrame:bounds]; @@ -1464,7 +1464,7 @@ static Class $UIWebBrowserView; else [preferences _setLayoutInterval:0]; } - + actualView.documentView = document_; [actualView release]; @@ -1497,22 +1497,22 @@ static Class $UIWebBrowserView; CGSize indsize = [UIProgressIndicator defaultSizeForStyle:UIProgressIndicatorStyleMediumWhite]; indicator_ = [[UIProgressIndicator alloc] initWithFrame:CGRectMake(15, 5, indsize.width, indsize.height)]; [indicator_ setStyle:UIProgressIndicatorStyleMediumWhite]; - [indicator_ startAnimation]; - - reloaditem_ = [[UIBarButtonItem alloc] - initWithTitle:UCLocalize("RELOAD") - style:[self rightButtonStyle] - target:self - action:@selector(reloadButtonClicked) - ]; - - loadingitem_ = [[UIBarButtonItem alloc] - initWithTitle:@" " - style:UIBarButtonItemStylePlain - target:self - action:@selector(reloadButtonClicked) - ]; - [[loadingitem_ view] addSubview:indicator_]; + [indicator_ startAnimation]; + + reloaditem_ = [[UIBarButtonItem alloc] + initWithTitle:UCLocalize("RELOAD") + style:[self rightButtonStyle] + target:self + action:@selector(reloadButtonClicked) + ]; + + loadingitem_ = [[UIBarButtonItem alloc] + initWithTitle:@" " + style:UIBarButtonItemStylePlain + target:self + action:@selector(reloadButtonClicked) + ]; + [[loadingitem_ view] addSubview:indicator_]; [scroller_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)]; [indicator_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin]; @@ -1594,14 +1594,14 @@ static Class $UIWebBrowserView; [self callFunction:function_]; else #endif - [self reloadButtonClicked]; + [self reloadButtonClicked]; } - (void) setPageActive:(BOOL)active { if (!active) [indicator_ removeFromSuperview]; else - [[[[self navigationItem] rightBarButtonItem] view] addSubview:indicator_]; + [[[[self navigationItem] rightBarButtonItem] view] addSubview:indicator_]; } - (void) resetViewAnimated:(BOOL)animated { diff --git a/UICaboodle/RVBook.h b/UICaboodle/RVBook.h index 09b1baf5..8994cbfa 100644 --- a/UICaboodle/RVBook.h +++ b/UICaboodle/RVBook.h @@ -7,7 +7,7 @@ @end @interface UCNavigationController : UINavigationController { - id hook_; + id hook_; } - (void) setHook:(id)hook; @end diff --git a/UICaboodle/RVBook.mm b/UICaboodle/RVBook.mm index ba201aef..beff51c9 100644 --- a/UICaboodle/RVBook.mm +++ b/UICaboodle/RVBook.mm @@ -15,13 +15,13 @@ @implementation UCNavigationController - (void) setHook:(id)hook { - hook_ = hook; + hook_ = hook; } - (void) dismissModalViewControllerAnimated:(BOOL)animated { - [super dismissModalViewControllerAnimated:YES]; + [super dismissModalViewControllerAnimated:YES]; - if (hook_ != nil) - [hook_ didDismissModalViewController]; + if (hook_ != nil) + [hook_ didDismissModalViewController]; } @end diff --git a/UICaboodle/RVPage.h b/UICaboodle/RVPage.h index d2f84fa5..3f16bc15 100644 --- a/UICaboodle/RVPage.h +++ b/UICaboodle/RVPage.h @@ -3,7 +3,7 @@ #import @interface UCViewController : UIViewController { - id delegate_; + id delegate_; } - (void)setDelegate:(id)delegate; - (void) reloadData; diff --git a/UICaboodle/RVPage.mm b/UICaboodle/RVPage.mm index aecf0d3b..b2253330 100644 --- a/UICaboodle/RVPage.mm +++ b/UICaboodle/RVPage.mm @@ -5,9 +5,9 @@ #import "RVBook.h" -@implementation UCViewController +@implementation UCViewController - (void)setDelegate:(id)delegate { - delegate_ = delegate; + delegate_ = delegate; } - (void) reloadData { } diff --git a/UICaboodle/UCString.h b/UICaboodle/UCString.h index d776728a..13bb51f3 100644 --- a/UICaboodle/UCString.h +++ b/UICaboodle/UCString.h @@ -29,7 +29,7 @@ - (NSString *) stringByAddingPercentEscapesIncludingReserved { return [(id)CFURLCreateStringByAddingPercentEscapes( - kCFAllocatorDefault, + kCFAllocatorDefault, (CFStringRef) self, NULL, CFSTR(";/?:@&=+$,"), -- 2.45.2