]> git.saurik.com Git - cydia.git/commitdiff
Move private ivars in CyteKit to @implementations.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 15 Feb 2017 10:05:04 +0000 (02:05 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 15 Feb 2017 10:05:04 +0000 (02:05 -0800)
13 files changed:
CyteKit/TabBarController.h
CyteKit/TabBarController.mm
CyteKit/TableViewCell.h
CyteKit/TableViewCell.mm
CyteKit/ViewController.h
CyteKit/ViewController.mm
CyteKit/WebView.h
CyteKit/WebView.mm
CyteKit/WebViewController.h
CyteKit/WebViewController.mm
CyteKit/WebViewTableViewCell.h
CyteKit/WebViewTableViewCell.mm
MobileCydia.mm

index 2849b4b3cb9369526db3ac35719d395d535bdefc..7aee76748fddf15f570f131bb11cdeab7125a71a 100644 (file)
 
 #include <UIKit/UIKit.h>
 
-#include <Menes/ObjectHandle.h>
-
 @interface UITabBarController (Cydia)
 @end
 
-@interface CyteTabBarController : UITabBarController {
-    _transient UIViewController *transient_;
-    _H<UIViewController> remembered_;
-}
+@interface CyteTabBarController : UITabBarController
 
 - (UIViewController *) unselectedViewController;
 - (void) setUnselectedViewController:(UIViewController *)transient;
index 27a8000f0deee6016e14d115ffaa998b553219f7..7a4ead30b30fa1c41b124bbc1e9b5c2320a22f99 100644 (file)
 #include "CyteKit/TabBarController.h"
 
 #include "iPhonePrivate.h"
+#include <Menes/ObjectHandle.h>
 
 @implementation UITabBarController (Cydia)
 
 @end
 
-@implementation CyteTabBarController
+@implementation CyteTabBarController {
+    _transient UIViewController *transient_;
+    _H<UIViewController> remembered_;
+}
 
 - (void) didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
index f97a592e1d17c0bd50c95d1f94ac0ac9a5fd265d..f435f01f4d07fb995aff79356e28d8ee3aeb6d2c 100644 (file)
 
 #include <UIKit/UIKit.h>
 
-#include <Menes/ObjectHandle.h>
-
 @protocol CyteTableViewCellDelegate
 - (void) drawContentRect:(CGRect)rect;
 @end
 
-@interface CyteTableViewCellContentView : UIView {
-    _transient id<CyteTableViewCellDelegate> delegate_;
-}
+@interface CyteTableViewCellContentView : UIView
 
 - (id) delegate;
 - (void) setDelegate:(id<CyteTableViewCellDelegate>)delegate;
 
 @end
 
-@interface CyteTableViewCell : UITableViewCell {
-    _H<CyteTableViewCellContentView, 1> content_;
-    bool highlighted_;
-}
+@interface CyteTableViewCell : UITableViewCell
+
+- (void) setContent:(CyteTableViewCellContentView *)content;
+- (CyteTableViewCellContentView *) content;
+
+- (bool) highlighted;
 
 @end
 
index ce61ad5137c544f14208182398aa312e4ac57139..827440bf988288194539e0daf0b8eeac07281c09 100644 (file)
 #include "CyteKit/TableViewCell.h"
 
 #include "iPhonePrivate.h"
+#include <Menes/ObjectHandle.h>
 
-@implementation CyteTableViewCellContentView
+@implementation CyteTableViewCellContentView {
+    _transient id<CyteTableViewCellDelegate> delegate_;
+}
 
 - (id) initWithFrame:(CGRect)frame {
     if ((self = [super initWithFrame:frame]) != nil) {
 
 @end
 
-@implementation CyteTableViewCell
+@implementation CyteTableViewCell {
+    _H<CyteTableViewCellContentView, 1> content_;
+    bool highlighted_;
+}
 
 - (void) _updateHighlightColorsForView:(UIView *)view highlighted:(BOOL)highlighted {
     if (view == (UIView *) content_)
     [content_ setNeedsDisplay];
 }
 
+- (void) setContent:(CyteTableViewCellContentView *)content {
+    content_ = content;
+}
+
+- (CyteTableViewCellContentView *) content {
+    return content_;
+}
+
+- (bool) highlighted {
+    return highlighted_;
+}
+
 @end
index f724837de8ffbf1e8c18a444e4c9a49d7de37535..3b637f05505844070630b434717c6cc49dfab94b 100644 (file)
@@ -24,8 +24,6 @@
 
 #include <UIKit/UIKit.h>
 
-#include <Menes/ObjectHandle.h>
-
 @interface UIViewController (Cydia)
 - (BOOL) hasLoaded;
 - (void) reloadData;
 - (UIViewController *) parentOrPresentingViewController;
 @end
 
-@interface CyteViewController : UIViewController {
-    _transient id delegate_;
-    BOOL loaded_;
-    _H<UIColor> color_;
-}
+@interface CyteViewController : UIViewController
 
 // The default implementation of this method is essentially a no-op,
 // but calling the superclass implementation is *required*.
@@ -64,6 +58,7 @@
 - (void) releaseSubviews;
 
 - (void) setPageColor:(UIColor *)color;
+- (UIColor *) pageColor;
 
 @end
 
index 3bf9c41bc8853febb4b4b3c47e4db74cc566c00e..52c925d3df3166fc0709237733cf904e0eefd5f0 100644 (file)
@@ -27,6 +27,7 @@
 #include "CyteKit/ViewController.h"
 
 #include "iPhonePrivate.h"
+#include <Menes/ObjectHandle.h>
 
 @implementation UIViewController (Cydia)
 
 
 @end
 
-@implementation CyteViewController
+@implementation CyteViewController {
+    _transient id delegate_;
+    BOOL loaded_;
+    _H<UIColor> color_;
+}
 
 - (void) setDelegate:(id)delegate {
     delegate_ = delegate;
     color_ = color;
 }
 
+- (UIColor *) pageColor {
+    return color_;
+}
+
 #include "InterfaceOrientation.h"
 
 @end
index ddf4391ce601c7079de2cfae7ed04c7508d2a407..20e162a025eb53580119713c13bc59410ceb5132 100644 (file)
@@ -62,8 +62,7 @@ enum CYWebPolicyDecision {
 - (void) webViewUpdateViewSettings:(UIWebView *)view;
 @end
 
-@interface CyteWebView : UIWebView {
-}
+@interface CyteWebView : UIWebView
 
 - (id<CyteWebViewDelegate>) delegate;
 - (void) setDelegate:(id<CyteWebViewDelegate>)delegate;
index 38f6a4f92f548c37b8d9c64be730531bbd5ce480..3711587483856b99d0dc4a300416d1c1d7940f87 100644 (file)
@@ -90,7 +90,8 @@
 @end
 // }}}
 
-@implementation CyteWebView : UIWebView
+@implementation CyteWebView : UIWebView {
+}
 
 #if ShowInternals
 #include "CyteKit/UCInternal.h"
index 20fe47523d925300d100c1445ffc9a2c669dad46..61c4c1af69cb199942635d5d5f61a9bdd4ecb031 100644 (file)
@@ -28,8 +28,6 @@
 #include <UIKit/UIKit.h>
 #include <MessageUI/MessageUI.h>
 
-#include <Menes/ObjectHandle.h>
-
 @class IndirectDelegate;
 
 @protocol CyteWebViewControllerDelegate
     CyteWebViewDelegate,
     MFMailComposeViewControllerDelegate,
     UIWebViewDelegate
-> {
-    _H<CyteWebView, 1> webview_;
-    _transient UIScrollView *scroller_;
-
-    _H<UIActivityIndicatorView> indicator_;
-    _H<IndirectDelegate, 1> indirect_;
-    _H<NSURLAuthenticationChallenge> challenge_;
-
-    bool error_;
-    _H<NSURLRequest> request_;
-    bool ready_;
-
-    _transient NSNumber *sensitive_;
-    _H<NSURL> appstore_;
-
-    _H<NSString> title_;
-    _H<NSMutableSet> loading_;
-
-    _H<NSMutableSet> registered_;
-    _H<NSTimer> timer_;
-
-    // XXX: NSString * or UIImage *
-    _H<NSObject> custom_;
-    _H<NSString> style_;
-
-    _H<WebScriptObject> function_;
-
-    float width_;
-    Class class_;
-
-    _H<UIBarButtonItem> reloaditem_;
-    _H<UIBarButtonItem> loadingitem_;
-
-    bool visible_;
-    bool hidesNavigationBar_;
-    bool allowsNavigationAction_;
-}
+>
 
 + (void) _initialize;
 
 - (CyteWebView *) webView;
+- (CyteWebViewController *) indirect;
 
 - (void) setRequest:(NSURLRequest *)request;
+- (NSURLRequest *) request;
+
 - (void) setURL:(NSURL *)url;
 - (void) setURL:(NSURL *)url withReferrer:(NSString *)referrer;
 
index 7d9bd8083a9f50b3e6305b391a62f12890496ab0..20838bf99ea099d5e0aaddac68dbaa0b881f313e 100644 (file)
@@ -8,6 +8,7 @@
 #include "CyteKit/WebViewController.h"
 
 #include "iPhonePrivate.h"
+#include <Menes/ObjectHandle.h>
 
 //#include <QuartzCore/CALayer.h>
 // XXX: fix the minimum requirement
@@ -115,7 +116,43 @@ float CYScrollViewDecelerationRateNormal;
 @end
 /* }}} */
 
-@implementation CyteWebViewController
+@implementation CyteWebViewController {
+    _H<CyteWebView, 1> webview_;
+    _transient UIScrollView *scroller_;
+
+    _H<UIActivityIndicatorView> indicator_;
+    _H<IndirectDelegate, 1> indirect_;
+    _H<NSURLAuthenticationChallenge> challenge_;
+
+    bool error_;
+    _H<NSURLRequest> request_;
+    bool ready_;
+
+    _transient NSNumber *sensitive_;
+    _H<NSURL> appstore_;
+
+    _H<NSString> title_;
+    _H<NSMutableSet> loading_;
+
+    _H<NSMutableSet> registered_;
+    _H<NSTimer> timer_;
+
+    // XXX: NSString * or UIImage *
+    _H<NSObject> custom_;
+    _H<NSString> style_;
+
+    _H<WebScriptObject> function_;
+
+    float width_;
+    Class class_;
+
+    _H<UIBarButtonItem> reloaditem_;
+    _H<UIBarButtonItem> loadingitem_;
+
+    bool visible_;
+    bool hidesNavigationBar_;
+    bool allowsNavigationAction_;
+}
 
 #if ShowInternals
 #include "CyteKit/UCInternal.h"
@@ -150,7 +187,7 @@ float CYScrollViewDecelerationRateNormal;
         [loading_ removeAllObjects];
 
         if ([self retainsNetworkActivityIndicator])
-            [delegate_ releaseNetworkActivityIndicator];
+            [self.delegate releaseNetworkActivityIndicator];
     }
 }
 
@@ -172,6 +209,10 @@ float CYScrollViewDecelerationRateNormal;
     return (CyteWebView *) [self view];
 }
 
+- (CyteWebViewController *) indirect {
+    return (CyteWebViewController *) (IndirectDelegate *) indirect_;
+}
+
 - (NSURL *) URLWithURL:(NSURL *)url {
     return url;
 }
@@ -193,6 +234,10 @@ float CYScrollViewDecelerationRateNormal;
     request_ = request;
 }
 
+- (NSURLRequest *) request {
+    return request_;
+}
+
 - (void) setURL:(NSURL *)url {
     [self setURL:url withReferrer:nil];
 }
@@ -398,7 +443,7 @@ float CYScrollViewDecelerationRateNormal;
     NSURL *url([request URL]);
 
     // XXX: filter to internal usage?
-    CyteViewController *page([delegate_ pageForURL:url forExternal:NO withReferrer:referrer]);
+    CyteViewController *page([self.delegate pageForURL:url forExternal:NO withReferrer:referrer]);
 
     if (page == nil) {
         CyteWebViewController *browser([[[class_ alloc] init] autorelease]);
@@ -406,8 +451,8 @@ float CYScrollViewDecelerationRateNormal;
         page = browser;
     }
 
-    [page setDelegate:delegate_];
-    [page setPageColor:color_];
+    [page setDelegate:self.delegate];
+    [page setPageColor:self.pageColor];
 
     if (!pop) {
         [[self navigationItem] setTitle:title_];
@@ -416,7 +461,7 @@ float CYScrollViewDecelerationRateNormal;
     } else {
         UINavigationController *navigation([[[UINavigationController alloc] initWithRootViewController:page] autorelease]);
 
-        [navigation setDelegate:delegate_];
+        [navigation setDelegate:self.delegate];
 
         [[page navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc]
             initWithTitle:UCLocalize("CLOSE")
@@ -525,7 +570,7 @@ float CYScrollViewDecelerationRateNormal;
         return;
 
     if ([name isEqualToString:@"_open"])
-        [delegate_ openURL:url];
+        [self.delegate openURL:url];
     else {
         NSString *scheme([[url scheme] lowercaseString]);
         if ([scheme isEqualToString:@"mailto"])
@@ -602,7 +647,7 @@ float CYScrollViewDecelerationRateNormal;
                     }
 
                     [super setPageColor:uic];
-                    [scroller_ setBackgroundColor:color_];
+                    [scroller_ setBackgroundColor:self.pageColor];
                     break;
                 }
     }
@@ -763,7 +808,7 @@ float CYScrollViewDecelerationRateNormal;
     } else if ([context isEqualToString:@"itmsappss"]) {
         if (button == [alert cancelButtonIndex]) {
         } else if (button == [alert firstOtherButtonIndex]) {
-            [delegate_ openURL:appstore_];
+            [self.delegate openURL:appstore_];
         }
 
         [alert dismissWithClickedButtonIndex:-1 animated:YES];
@@ -862,7 +907,7 @@ float CYScrollViewDecelerationRateNormal;
         return;
 
     if ([self retainsNetworkActivityIndicator])
-        [delegate_ retainNetworkActivityIndicator];
+        [self.delegate retainNetworkActivityIndicator];
 
     [self didStartLoading];
 }
@@ -879,7 +924,7 @@ float CYScrollViewDecelerationRateNormal;
     [[self navigationItem] setTitle:title_];
 
     if ([self retainsNetworkActivityIndicator])
-        [delegate_ releaseNetworkActivityIndicator];
+        [self.delegate releaseNetworkActivityIndicator];
 
     [self didFinishLoading];
 }
@@ -1015,7 +1060,7 @@ float CYScrollViewDecelerationRateNormal;
     [webview_ setBackgroundColor:nil];
 
     [scroller_ setFixedBackgroundPattern:YES];
-    [scroller_ setBackgroundColor:color_];
+    [scroller_ setBackgroundColor:self.pageColor];
     [scroller_ setClipsSubviews:YES];
 
     [scroller_ setBounces:YES];
index 83a33116ef6bd1f0d11ca18bbdde649b320513e6..1af78354e52b719a63b4361a0b16685ac73d1828 100644 (file)
 
 #include <UIKit/UIKit.h>
 
-#include "Menes/ObjectHandle.h"
 #include "CyteKit/WebView.h"
 
 @interface CyteWebViewTableViewCell : UITableViewCell <
     CyteWebViewDelegate
-> {
-    // XXX: I'm not really the delegate here: fix this!
-    _H<CyteWebView, 1> webview_;
-}
+>
 
 + (CyteWebViewTableViewCell *) cellWithRequest:(NSURLRequest *)request;
 - (id) initWithRequest:(NSURLRequest *)request;
index 3756a0f5960be5141e4b8dadff46b3f99f9c5ab2..7515b472a6a909cff8f29160f100446564cffb3d 100644 (file)
 #include "CyteKit/WebViewTableViewCell.h"
 
 #include "iPhonePrivate.h"
+#include <Menes/ObjectHandle.h>
 
-@implementation CyteWebViewTableViewCell
+@implementation CyteWebViewTableViewCell {
+    // XXX: I'm not really the delegate here: fix this!
+    _H<CyteWebView, 1> webview_;
+}
 
 + (CyteWebViewTableViewCell *) cellWithRequest:(NSURLRequest *)request {
     CyteWebViewTableViewCell *cell([[[self alloc] initWithRequest:request] autorelease]);
index a1c06d76ed7345b02e75c12295943f0aa62738f0..3ed9cbd78bb987d4994b80ece0c6d15d5b192a39 100644 (file)
@@ -112,7 +112,6 @@ extern "C" {
 #include "Substrate.hpp"
 #include "Menes/Menes.h"
 
-#include "CyteKit/IndirectDelegate.h"
 #include "CyteKit/RegEx.hpp"
 #include "CyteKit/TableViewCell.h"
 #include "CyteKit/TabBarController.h"
@@ -4337,7 +4336,7 @@ static _H<NSMutableSet> Diversions_;
     _transient id delegate_;
 }
 
-- (id) initWithDelegate:(IndirectDelegate *)indirect;
+- (id) initWithDelegate:(CyteWebViewController *)indirect;
 
 @end
 
@@ -4357,9 +4356,9 @@ static _H<NSMutableSet> Diversions_;
 /* Web Scripting {{{ */
 @implementation CydiaObject
 
-- (id) initWithDelegate:(IndirectDelegate *)indirect {
+- (id) initWithDelegate:(CyteWebViewController *)indirect {
     if ((self = [super init]) != nil) {
-        indirect_ = (CyteWebViewController *) indirect;
+        indirect_ = indirect;
     } return self;
 }
 
@@ -4978,7 +4977,10 @@ static _H<NSMutableSet> Diversions_;
 @implementation CydiaWebViewController
 
 - (NSURL *) navigationURL {
-    return request_ == nil ? nil : [NSURL URLWithString:[NSString stringWithFormat:@"cydia://url/%@", [[request_ URL] absoluteString]]];
+    if (NSURLRequest *request = self.request)
+        return [NSURL URLWithString:[NSString stringWithFormat:@"cydia://url/%@", [[request URL] absoluteString]]];
+    else
+        return nil;
 }
 
 + (void) _initialize {
@@ -5081,7 +5083,7 @@ static _H<NSMutableSet> Diversions_;
 
 - (id) init {
     if ((self = [super initWithWidth:0 ofClass:[CydiaWebViewController class]]) != nil) {
-        cydia_ = [[[CydiaObject alloc] initWithDelegate:indirect_] autorelease];
+        cydia_ = [[[CydiaObject alloc] initWithDelegate:self.indirect] autorelease];
     } return self;
 }
 
@@ -5184,7 +5186,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 - (void) complete {
     if (substrate_)
         RestartSubstrate_ = true;
-    [delegate_ confirmWithNavigationController:[self navigationController]];
+    [self.delegate confirmWithNavigationController:[self navigationController]];
 }
 
 - (void) alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)button {
@@ -5207,7 +5209,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) _doContinue {
-    [delegate_ cancelAndClear:NO];
+    [self.delegate cancelAndClear:NO];
     [self dismissModalViewControllerAnimated:YES];
 }
 
@@ -5430,7 +5432,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 #endif
 
 - (void) cancelButtonClicked {
-    [delegate_ cancelAndClear:YES];
+    [self.delegate cancelAndClear:YES];
     [self dismissModalViewControllerAnimated:YES];
 }
 
@@ -5614,7 +5616,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 - (id) initWithDatabase:(Database *)database delegate:(id)delegate {
     if ((self = [super init]) != nil) {
         database_ = database;
-        delegate_ = delegate;
+        self.delegate = delegate;
 
         [database_ setProgressDelegate:self];
 
@@ -5649,19 +5651,19 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     UpdateExternalStatus(0);
 
     if (Finish_ > 1)
-        [delegate_ saveState];
+        [self.delegate saveState];
 
     switch (Finish_) {
         case 0:
-            [delegate_ returnToCydia];
+            [self.delegate returnToCydia];
         break;
 
         case 1:
-            [delegate_ terminateWithSuccess];
-            /*if ([delegate_ respondsToSelector:@selector(suspendWithAnimation:)])
-                [delegate_ suspendWithAnimation:YES];
+            [self.delegate terminateWithSuccess];
+            /*if ([self.delegate respondsToSelector:@selector(suspendWithAnimation:)])
+                [self.delegate suspendWithAnimation:YES];
             else
-                [delegate_ suspend];*/
+                [self.delegate suspend];*/
         break;
 
         case 2:
@@ -5673,9 +5675,9 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
             goto reload;
 
         reload: {
-            UIProgressHUD *hud([delegate_ addProgressHUD]);
+            UIProgressHUD *hud([self.delegate addProgressHUD]);
             [hud setText:UCLocalize("LOADING")];
-            [delegate_ performSelector:@selector(reloadSpringBoard) withObject:nil afterDelay:0.5];
+            [self.delegate performSelector:@selector(reloadSpringBoard) withObject:nil afterDelay:0.5];
             return;
         }
 
@@ -5873,12 +5875,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         UIView *content([self contentView]);
         CGRect bounds([content bounds]);
 
-        content_ = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
-        [content_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
-        [content addSubview:content_];
+        self.content = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
+        [self.content setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+        [content addSubview:self.content];
 
-        [content_ setDelegate:self];
-        [content_ setOpaque:YES];
+        [self.content setDelegate:self];
+        [self.content setOpaque:YES];
     } return self;
 }
 
@@ -5897,7 +5899,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     placard_ = nil;
 
     if (package == nil)
-        [content_ setBackgroundColor:[UIColor whiteColor]];
+        [self.content setBackgroundColor:[UIColor whiteColor]];
     else {
         [package parse];
 
@@ -5957,18 +5959,18 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
                 placard = nil;
         }
 
-        [content_ setBackgroundColor:color];
+        [self.content setBackgroundColor:color];
 
         if (placard != nil)
             placard_ = [UIImage imageAtPath:[NSString stringWithFormat:@"%@/%@.png", App_, placard]];
     }
 
     [self setNeedsDisplay];
-    [content_ setNeedsDisplay];
+    [self.content setNeedsDisplay];
 }
 
 - (void) drawSummaryContentRect:(CGRect)rect {
-    bool highlighted(highlighted_);
+    bool highlighted(self.highlighted);
     float width([self bounds].size.width);
 
     if (icon_ != nil) {
@@ -6011,7 +6013,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) drawNormalContentRect:(CGRect)rect {
-    bool highlighted(highlighted_);
+    bool highlighted(self.highlighted);
     float width([self bounds].size.width);
 
     if (icon_ != nil) {
@@ -6096,12 +6098,12 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         UIView *content([self contentView]);
         CGRect bounds([content bounds]);
 
-        content_ = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
-        [content_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
-        [content addSubview:content_];
-        [content_ setBackgroundColor:[UIColor whiteColor]];
+        self.content = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
+        [self.content setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+        [content addSubview:self.content];
+        [self.content setBackgroundColor:[UIColor whiteColor]];
 
-        [content_ setDelegate:self];
+        [self.content setDelegate:self];
     } return self;
 }
 
@@ -6146,7 +6148,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [self setAccessoryType:editing ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator];
     [self setSelectionStyle:editing ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleBlue];
 
-    [content_ setNeedsDisplay];
+    [self.content setNeedsDisplay];
 }
 
 - (void) setFrame:(CGRect)frame {
@@ -6161,7 +6163,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) drawContentRect:(CGRect)rect {
-    bool highlighted(highlighted_ && !editing_);
+    bool highlighted(self.highlighted && !editing_);
 
     [icon_ drawInRect:CGRectMake(7, 7, 32, 32)];
 
@@ -6332,14 +6334,14 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (void) _clickButtonWithPackage:(Package *)package {
-    [delegate_ installPackage:package];
+    [self.delegate installPackage:package];
 }
 
 - (void) _clickButtonWithName:(NSString *)name {
     if ([name isEqualToString:@"CLEAR"])
-        return [delegate_ clearPackage:package_];
+        return [self.delegate clearPackage:package_];
     else if ([name isEqualToString:@"REMOVE"])
-        return [delegate_ removePackage:package_];
+        return [self.delegate removePackage:package_];
     else if ([name isEqualToString:@"DOWNGRADE"]) {
         sheet_ = [[[UIActionSheet alloc]
             initWithTitle:nil
@@ -6353,7 +6355,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
             [sheet_ addButtonWithTitle:[version latest]];
         [sheet_ setContext:@"version"];
 
-        [delegate_ showActionSheet:sheet_ fromItem:[[self navigationItem] rightBarButtonItem]];
+        [self.delegate showActionSheet:sheet_ fromItem:[[self navigationItem] rightBarButtonItem]];
         return;
     }
 
@@ -6362,7 +6364,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     else if ([name isEqualToString:@"UPGRADE"]);
     else _assert(false);
 
-    [delegate_ installPackage:package_];
+    [self.delegate installPackage:package_];
 }
 
 - (void) actionSheet:(UIActionSheet *)sheet clickedButtonAtIndex:(NSInteger)button {
@@ -6424,7 +6426,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
             [sheet_ addButtonWithTitle:button];
         [sheet_ setContext:@"modify"];
 
-        [delegate_ showActionSheet:sheet_ fromItem:[[self navigationItem] rightBarButtonItem]];
+        [self.delegate showActionSheet:sheet_ fromItem:[[self navigationItem] rightBarButtonItem]];
     }
 }
 
@@ -6521,7 +6523,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 }
 
 - (id) initWithDatabase:(Database *)database title:(NSString *)title;
-- (void) setDelegate:(id)delegate;
 - (void) resetCursor;
 - (void) clearData;
 
@@ -6634,7 +6635,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 
 - (void) didSelectPackage:(Package *)package {
     CYPackageController *view([[[CYPackageController alloc] initWithDatabase:database_ forPackage:[package id] withReferrer:[[self referrerURL] absoluteString]] autorelease]);
-    [view setDelegate:delegate_];
+    [view setDelegate:self.delegate];
     [[self navigationController] pushViewController:view animated:YES];
 }
 
@@ -6732,10 +6733,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [super releaseSubviews];
 }
 
-- (void) setDelegate:(id)delegate {
-    delegate_ = delegate;
-}
-
 - (bool) shouldYield {
     return false;
 }
@@ -6768,7 +6765,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
             if (![self shouldBlock])
                 hud = nil;
             else {
-                hud = [delegate_ addProgressHUD];
+                hud = [self.delegate addProgressHUD];
                 [hud setText:UCLocalize("LOADING")];
             }
 
@@ -6776,7 +6773,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
             packages = [self yieldToSelector:@selector(_reloadPackages)];
 
             if (hud != nil)
-                [delegate_ removeProgressHUD:hud];
+                [self.delegate removeProgressHUD:hud];
         } while (reloading_ == 2);
     } else {
         packages = [self _reloadPackages];
@@ -7443,7 +7440,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     if (editing)
         [list_ reloadData];
     else
-        [delegate_ updateData];
+        [self.delegate updateData];
 
     [self updateNavigationItem];
 }
@@ -7505,7 +7502,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
         source:[self source]
         section:[section name]
     ] autorelease];
-    [controller setDelegate:delegate_];
+    [controller setDelegate:self.delegate];
 
     [[self navigationController] pushViewController:controller animated:YES];
 }
@@ -7650,7 +7647,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 }
 
 - (void) setLeftBarButtonItem {
-    if ([delegate_ updating])
+    if ([self.delegate updating])
         [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc]
             initWithTitle:UCLocalize("CANCEL")
             style:UIBarButtonItemStyleDone
@@ -7667,16 +7664,16 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 }
 
 - (void) refreshButtonClicked {
-    if ([delegate_ requestUpdate])
+    if ([self.delegate requestUpdate])
         [self setLeftBarButtonItem];
 }
 
 - (void) cancelButtonClicked {
-    [delegate_ cancelUpdate];
+    [self.delegate cancelUpdate];
 }
 
 - (void) upgradeButtonClicked {
-    [delegate_ distUpgrade];
+    [self.delegate distUpgrade];
     [[self navigationItem] setRightBarButtonItem:nil animated:YES];
 }
 
@@ -8021,7 +8018,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     if (package_ == nil)
         return;
     if ([package_ setSubscribed:value])
-        [delegate_ updateData];
+        [self.delegate updateData];
 }
 
 - (void) _updateIgnored {
@@ -8044,7 +8041,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     [invocation setTarget:self];
     [invocation setSelector:@selector(_updateIgnored)];
 
-    [delegate_ reloadDataWithInvocation:invocation];
+    [self.delegate reloadDataWithInvocation:invocation];
 }
 
 - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -8235,7 +8232,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 
 #if !AlwaysReload
 - (void) queueButtonClicked {
-    [delegate_ queue];
+    [self.delegate queue];
 }
 #endif
 
@@ -8285,7 +8282,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 - (void) _setImage:(NSArray *)data {
     if ([url_ isEqual:[data objectAtIndex:0]]) {
         icon_ = [data objectAtIndex:1];
-        [content_ setNeedsDisplay];
+        [self.content setNeedsDisplay];
     }
 }
 
@@ -8319,7 +8316,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     origin_ = [source name];
     label_ = [source rooturi];
 
-    [content_ setNeedsDisplay];
+    [self.content setNeedsDisplay];
 
     url_ = [source iconURL];
     [NSThread detachNewThreadSelector:@selector(_setSource:) toTarget:self withObject:url_];
@@ -8332,7 +8329,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     icon_ = [UIImage imageNamed:@"folder.png"];
     origin_ = UCLocalize("ALL_SOURCES");
     label_ = UCLocalize("ALL_SOURCES_EX");
-    [content_ setNeedsDisplay];
+    [self.content setNeedsDisplay];
 }
 
 - (SourceCell *) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
@@ -8340,19 +8337,19 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
         UIView *content([self contentView]);
         CGRect bounds([content bounds]);
 
-        content_ = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
-        [content_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
-        [content_ setBackgroundColor:[UIColor whiteColor]];
-        [content addSubview:content_];
+        self.content = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
+        [self.content setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+        [self.content setBackgroundColor:[UIColor whiteColor]];
+        [content addSubview:self.content];
 
-        [content_ setDelegate:self];
-        [content_ setOpaque:YES];
+        [self.content setDelegate:self];
+        [self.content setOpaque:YES];
 
         indicator_ = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGraySmall] autorelease];
         [indicator_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin];// | UIViewAutoresizingFlexibleBottomMargin];
         [content addSubview:indicator_];
 
-        [[content_ layer] setContentsGravity:kCAGravityTopLeft];
+        [[self.content layer] setContentsGravity:kCAGravityTopLeft];
     } return self;
 }
 
@@ -8376,7 +8373,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 }
 
 - (void) drawContentRect:(CGRect)rect {
-    bool highlighted(highlighted_);
+    bool highlighted(self.highlighted);
     float width(rect.size.width);
 
     if (icon_ != nil) {
@@ -8520,7 +8517,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
         source:[self sourceAtIndexPath:indexPath]
     ] autorelease]);
 
-    [controller setDelegate:delegate_];
+    [controller setDelegate:self.delegate];
     [[self navigationController] pushViewController:controller animated:YES];
 }
 
@@ -8539,7 +8536,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 
         [Sources_ removeObjectForKey:[source key]];
 
-        [delegate_ syncData];
+        [self.delegate syncData];
     }
 }
 
@@ -8548,10 +8545,10 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 }
 
 - (void) complete {
-    [delegate_ addTrivialSource:href_];
+    [self.delegate addTrivialSource:href_];
     href_ = nil;
 
-    [delegate_ syncData];
+    [self.delegate syncData];
 }
 
 - (NSString *) getWarning {
@@ -8590,9 +8587,9 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     ) {
         NSString *warning(cydia_ ? [self yieldToSelector:@selector(getWarning)] : nil);
 
-        [delegate_ releaseNetworkActivityIndicator];
+        [self.delegate releaseNetworkActivityIndicator];
 
-        [delegate_ removeProgressHUD:hud_];
+        [self.delegate removeProgressHUD:hud_];
         hud_ = nil;
 
         if (cydia_) {
@@ -8709,9 +8706,9 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
                 cydia_ = false;
 
                 // XXX: this is stupid
-                hud_ = [delegate_ addProgressHUD];
+                hud_ = [self.delegate addProgressHUD];
                 [hud_ setText:UCLocalize("VERIFYING_URL")];
-                [delegate_ retainNetworkActivityIndicator];
+                [self.delegate retainNetworkActivityIndicator];
             } break;
 
             case 0:
@@ -8751,7 +8748,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
             target:self
             action:@selector(addButtonClicked)
         ] autorelease] animated:animated];
-    else if ([delegate_ updating])
+    else if ([self.delegate updating])
         [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc]
             initWithTitle:UCLocalize("CANCEL")
             style:UIBarButtonItemStyleDone
@@ -8866,12 +8863,12 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
 }
 
 - (void) refreshButtonClicked {
-    if ([delegate_ requestUpdate])
+    if ([self.delegate requestUpdate])
         [self updateButtonsForEditingStatusAnimated:YES];
 }
 
 - (void) cancelButtonClicked {
-    [delegate_ cancelUpdate];
+    [self.delegate cancelUpdate];
 }
 
 - (void) editButtonClicked {