Use NSNegateBooleanTransformerName constant instead of string

This commit is contained in:
Allan Odgaard
2014-10-01 15:59:25 +02:00
parent 639f1d282f
commit c080a5d5d3
3 changed files with 4 additions and 4 deletions

View File

@@ -208,7 +208,7 @@ static bool is_installed (oak::uuid_t const& uuid)
{
[installingBundleActivityTextField bind:NSValueBinding toObject:[BundlesManager sharedInstance] withKeyPath:@"activityText" options:nil];
[installingBundleProgressIndicator bind:NSValueBinding toObject:[BundlesManager sharedInstance] withKeyPath:@"progress" options:nil];
[installingBundleProgressIndicator bind:NSIsIndeterminateBinding toObject:[BundlesManager sharedInstance] withKeyPath:@"determinateProgress" options:@{ NSValueTransformerNameBindingOption: @"NSNegateBoolean" }];
[installingBundleProgressIndicator bind:NSIsIndeterminateBinding toObject:[BundlesManager sharedInstance] withKeyPath:@"determinateProgress" options:@{ NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName }];
[installingBundleProgressIndicator startAnimation:self];
OakShowSheetForWindow(installingBundleWindow, aWindow, ^(NSInteger returnCode){ });

View File

@@ -1052,7 +1052,7 @@ NSString* const FFFindWasTriggeredByEnter = @"FFFindWasTriggeredByEnter";
res = button = OakCreateCheckBox(nil);
button.identifier = identifier;
[[button cell] setControlSize:NSSmallControlSize];
[button bind:@"enabled" toObject:self withKeyPath:@"performedReplaceAll" options:@{ NSValueTransformerNameBindingOption: @"NSNegateBoolean" }];
[button bind:@"enabled" toObject:self withKeyPath:@"performedReplaceAll" options:@{ NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName }];
button.action = @selector(toggleExcludedCheckbox:);
button.target = self;
}
@@ -1061,7 +1061,7 @@ NSString* const FFFindWasTriggeredByEnter = @"FFFindWasTriggeredByEnter";
[button unbind:NSValueBinding];
}
[button bind:NSValueBinding toObject:item withKeyPath:@"excluded" options:@{ NSValueTransformerNameBindingOption: @"NSNegateBoolean" }];
[button bind:NSValueBinding toObject:item withKeyPath:@"excluded" options:@{ NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName }];
button.state = item.excluded ? NSOffState : NSOnState;
}
else if([identifier isEqualToString:@"match"])

View File

@@ -301,7 +301,7 @@ static NSButton* OakCreateStopSearchButton ()
[self.regularExpressionCheckBox bind:NSValueBinding toObject:_objectController withKeyPath:@"content.regularExpression" options:nil];
[self.wrapAroundCheckBox bind:NSValueBinding toObject:_objectController withKeyPath:@"content.wrapAround" options:nil];
[self.ignoreWhitespaceCheckBox bind:NSEnabledBinding toObject:_objectController withKeyPath:@"content.canIgnoreWhitespace" options:nil];
[self.replaceAndFindButton bind:NSEnabledBinding toObject:_objectController withKeyPath:@"content.folderSearch" options:@{ NSValueTransformerNameBindingOption: @"NSNegateBoolean" }];
[self.replaceAndFindButton bind:NSEnabledBinding toObject:_objectController withKeyPath:@"content.folderSearch" options:@{ NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName }];
NSView* contentView = self.window.contentView;
for(NSView* view in [self.allViews allValues])