mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Change name of property setter: isChecking → checking
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
|
||||
@interface SoftwareUpdatePreferences : PreferencesPane
|
||||
@property (nonatomic, readonly) NSString* lastCheck;
|
||||
@property (nonatomic, readonly) BOOL isChecking;
|
||||
@property (nonatomic, readonly, getter = isChecking) BOOL checking;
|
||||
@end
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// kUserDefaultsLastSoftwareUpdateCheckKey
|
||||
|
||||
@interface SoftwareUpdatePreferences ()
|
||||
@property (nonatomic) BOOL isChecking;
|
||||
@property (nonatomic, readwrite, getter = isChecking) BOOL checking;
|
||||
@property (nonatomic) NSDate* lastPoll;
|
||||
@property (nonatomic) NSString* errorString;
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
@end
|
||||
|
||||
@implementation SoftwareUpdatePreferences
|
||||
+ (NSSet*)keyPathsForValuesAffectingLastCheck { return [NSSet setWithObjects:@"isChecking", @"lastPollString", @"errorString", nil]; }
|
||||
+ (NSSet*)keyPathsForValuesAffectingLastCheck { return [NSSet setWithObjects:@"checking", @"lastPollString", @"errorString", nil]; }
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if(self = [super initWithNibName:@"SoftwareUpdatePreferences" label:@"Software Update" image:[NSImage imageNamed:@"Software Update" inSameBundleAsClass:[self class]]])
|
||||
{
|
||||
[OakStringListTransformer createTransformerWithName:@"OakSoftwareUpdateChannelTransformer" andObjectsArray:@[ kSoftwareUpdateChannelRelease, kSoftwareUpdateChannelBeta ]];
|
||||
[self bind:@"isChecking" toObject:[SoftwareUpdate sharedInstance] withKeyPath:@"isChecking" options:nil];
|
||||
[self bind:@"checking" toObject:[SoftwareUpdate sharedInstance] withKeyPath:@"checking" options:nil];
|
||||
[self bind:@"lastPoll" toObject:[SoftwareUpdate sharedInstance] withKeyPath:@"lastPoll" options:nil];
|
||||
[self bind:@"errorString" toObject:[SoftwareUpdate sharedInstance] withKeyPath:@"errorString" options:nil];
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
- (NSString*)lastCheck
|
||||
{
|
||||
return _isChecking ? @"Checking…" : (_errorString ?: (_lastPollString ?: @"Never"));
|
||||
return _checking ? @"Checking…" : (_errorString ?: (_lastPollString ?: @"Never"));
|
||||
}
|
||||
|
||||
- (void)updateLastPollString:(id)sender
|
||||
|
||||
@@ -13,7 +13,7 @@ PUBLIC extern NSString* const kSoftwareUpdateChannelNightly;
|
||||
PUBLIC @interface SoftwareUpdate : NSObject <DownloadWindowControllerDelegate>
|
||||
@property (nonatomic) NSDictionary* channels;
|
||||
@property (nonatomic, readonly) NSDate* lastPoll;
|
||||
@property (nonatomic, readonly) BOOL isChecking;
|
||||
@property (nonatomic, readonly, getter = isChecking) BOOL checking;
|
||||
@property (nonatomic, readonly) NSString* errorString;
|
||||
|
||||
- (void)setSignee:(key_chain_t::key_t const&)aSignee;
|
||||
|
||||
@@ -43,7 +43,7 @@ typedef std::shared_ptr<shared_state_t> shared_state_ptr;
|
||||
CGFloat secondsLeft;
|
||||
}
|
||||
@property (nonatomic) NSDate* lastPoll;
|
||||
@property (nonatomic) BOOL isChecking;
|
||||
@property (nonatomic, readwrite, getter = isChecking) BOOL checking;
|
||||
@property (nonatomic) NSString* lastVersionDownloaded;
|
||||
@property (nonatomic) NSString* errorString;
|
||||
@property (nonatomic) NSTimer* pollTimer;
|
||||
@@ -134,7 +134,7 @@ typedef std::shared_ptr<shared_state_t> shared_state_ptr;
|
||||
{
|
||||
if(self.isChecking)
|
||||
return;
|
||||
self.isChecking = YES;
|
||||
self.checking = YES;
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
|
||||
std::string error = NULL_STR;
|
||||
@@ -143,7 +143,7 @@ typedef std::shared_ptr<shared_state_t> shared_state_ptr;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.errorString = [NSString stringWithCxxString:error];
|
||||
self.lastPoll = [NSDate date];
|
||||
self.isChecking = NO;
|
||||
self.checking = NO;
|
||||
|
||||
if(self.errorString)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user