From 353dda5b4d75a4e33e59e05b3acdd41b1069b196 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 14 May 2012 23:03:35 -0700 Subject: [PATCH] Add delegate getters to match setDelegate setters. --- CyteKit/IndirectDelegate.h | 3 +++ CyteKit/TableViewCell.h | 1 + CyteKit/TableViewCell.mm | 4 ++++ CyteKit/WebViewController.mm | 4 ++++ CyteKit/WebViewTableViewCell.h | 1 + CyteKit/WebViewTableViewCell.mm | 4 ++++ MobileCydia.mm | 6 +++++- 7 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CyteKit/IndirectDelegate.h b/CyteKit/IndirectDelegate.h index 386e4628..e1c0f259 100644 --- a/CyteKit/IndirectDelegate.h +++ b/CyteKit/IndirectDelegate.h @@ -44,8 +44,11 @@ _transient volatile id delegate_; } +- (id) delegate; - (void) setDelegate:(id)delegate; + - (id) initWithDelegate:(id)delegate; + @end #endif//CyteKit_IndirectDelegate_H diff --git a/CyteKit/TableViewCell.h b/CyteKit/TableViewCell.h index d6ac412e..2b391eb9 100644 --- a/CyteKit/TableViewCell.h +++ b/CyteKit/TableViewCell.h @@ -54,6 +54,7 @@ _transient id delegate_; } +- (id) delegate; - (void) setDelegate:(id)delegate; @end diff --git a/CyteKit/TableViewCell.mm b/CyteKit/TableViewCell.mm index fd86848a..dd737e20 100644 --- a/CyteKit/TableViewCell.mm +++ b/CyteKit/TableViewCell.mm @@ -49,6 +49,10 @@ } return self; } +- (id) delegate { + return delegate_; +} + - (void) setDelegate:(id)delegate { delegate_ = delegate; } diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm index cfe01f70..5d152139 100644 --- a/CyteKit/WebViewController.mm +++ b/CyteKit/WebViewController.mm @@ -59,6 +59,10 @@ float CYScrollViewDecelerationRateNormal; /* Indirect Delegate {{{ */ @implementation IndirectDelegate +- (id) delegate { + return delegate_; +} + - (void) setDelegate:(id)delegate { delegate_ = delegate; } diff --git a/CyteKit/WebViewTableViewCell.h b/CyteKit/WebViewTableViewCell.h index 8a15dbba..b3ee82d8 100644 --- a/CyteKit/WebViewTableViewCell.h +++ b/CyteKit/WebViewTableViewCell.h @@ -55,6 +55,7 @@ + (CyteWebViewTableViewCell *) cellWithRequest:(NSURLRequest *)request; - (id) initWithRequest:(NSURLRequest *)request; +- (id) delegate; - (void) setDelegate:(id)delegate; @end diff --git a/CyteKit/WebViewTableViewCell.mm b/CyteKit/WebViewTableViewCell.mm index 164fbf58..6c015bfd 100644 --- a/CyteKit/WebViewTableViewCell.mm +++ b/CyteKit/WebViewTableViewCell.mm @@ -87,6 +87,10 @@ } return self; } +- (id) delegate { + return [webview_ delegate]; +} + - (void) setDelegate:(id)delegate { [webview_ setDelegate:delegate]; } diff --git a/MobileCydia.mm b/MobileCydia.mm index bf8da9a1..2371e26d 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5128,6 +5128,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } return self; } +- (id) delegate { + return delegate_; +} + - (void) setDelegate:(id)delegate { delegate_ = delegate; } @@ -5531,7 +5535,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (NSString *) accessibilityLabel { - return [NSString stringWithFormat:UCLocalize("COLON_DELIMITED"), (id) name_, (id) description_]; + return name_; } - (void) setPackage:(Package *)package asSummary:(bool)summary { -- 2.45.2