Merge branch 'master' into fix-popen

This commit is contained in:
Antoine Mercadal
2015-04-23 16:50:56 -07:00
14 changed files with 40 additions and 40 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ var CPComboBoxTextSubview = @"text",
BOOL _usesDataSource;
CGSize _intercellSpacing;
CPArray _items;
id<CPComboBoxDataSource> _dataSource;
id <CPComboBoxDataSource> _dataSource;
CPInteger _implementedDelegateComboBoxMethods;
CPString _selectedStringValue;
float _itemHeight;
+1 -1
View File
@@ -240,7 +240,7 @@ var CPControlBlackColor = [CPColor blackColor];
*/
- (ThemeState)_controlSizeThemeState
{
switch(_controlSize)
switch (_controlSize)
{
case CPSmallControlSize:
return CPThemeStateControlSizeSmall;
+1 -1
View File
@@ -182,7 +182,7 @@ var CPBindingOperationAnd = 0,
allBindings = [bindingsForObject allKeys],
count = [allBindings count];
while(count--)
while (count--)
{
if ([[anObject class] isBindingExclusive:allBindings[count]])
return NO;
+3 -3
View File
@@ -269,9 +269,9 @@ var CPRadioRadioGroupKey = @"CPRadioRadioGroupKey";
- (BOOL)selectRadioWithTag:(int)tag
{
var index = [_radios indexOfObjectPassingTest:function(radio)
{
return [radio tag] === tag;
}];
{
return [radio tag] === tag;
}];
if (index !== CPNotFound)
{
@@ -487,9 +487,9 @@ CPTransformableAttributeType = 1800;
- (id)copy
{
var views = [CPArray array];
var views = [CPArray array],
copy = [[[self class] alloc] init];
var copy = [[[self class] alloc] init];
[copy _setTemplateType:_templateType];
[copy _setOptions:_predicateOptions];
[copy _setModifier:_predicateModifier];
+2 -3
View File
@@ -34,9 +34,8 @@ CPSearchFieldRecentsMenuItemTag = 1001;
CPSearchFieldClearRecentsMenuItemTag = 1002;
CPSearchFieldNoRecentsMenuItemTag = 1003;
var CPAutosavedRecentsChangedNotification = @"CPAutosavedRecentsChangedNotification";
var RECENT_SEARCH_PREFIX = @" ";
var CPAutosavedRecentsChangedNotification = @"CPAutosavedRecentsChangedNotification",
RECENT_SEARCH_PREFIX = @" ";
/*!
@ingroup appkit
+1 -1
View File
@@ -504,7 +504,7 @@ CPSegmentSwitchTrackingMomentary = 2;
*/
- (void)drawSegmentBezel:(int)aSegment highlight:(BOOL)shouldHighlight
{
if(aSegment < _themeStates.length)
if (aSegment < _themeStates.length)
{
if (shouldHighlight)
_themeStates[aSegment] = _themeStates[aSegment].and(CPThemeStateHighlighted);
+2 -2
View File
@@ -68,7 +68,7 @@
_textField = [[_CPImageAndTextView alloc] initWithFrame:
CGRectMake(5.0, 0.0, CGRectGetWidth([self bounds]) - 10.0, CGRectGetHeight([self bounds]))];
[_textField setAutoresizingMask:CPViewWidthSizable|CPViewHeightSizable];
[_textField setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
[_textField setLineBreakMode:CPLineBreakByTruncatingTail];
[_textField setTextColor:[CPColor colorWithRed:51.0 / 255.0 green:51.0 / 255.0 blue:51.0 / 255.0 alpha:1.0]];
@@ -196,7 +196,7 @@
maxX = CGRectGetMaxX(bounds) - 0.5;
CGContextSetLineWidth(context, 1);
CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]);
CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0 / 255.0 alpha:1.0]);
CGContextBeginPath(context);
+15 -15
View File
@@ -2100,26 +2100,26 @@ NOT YET IMPLEMENTED
found = NO,
max_rec = 100;
while (max_rec--)
while (max_rec--)
{
if (!cellView || cellView === contentView)
{
if (!cellView || cellView === contentView)
found = NO;
break;
}
else
{
var superview = [cellView superview];
if ([superview isKindOfClass:[CPTableView class]])
{
found = NO;
found = YES;
break;
}
else
{
var superview = [cellView superview];
if ([superview isKindOfClass:[CPTableView class]])
{
found = YES;
break;
}
cellView = superview;
}
cellView = superview;
}
}
if (found)
{
@@ -5091,7 +5091,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
_editingColumn = column;
_editingRow = row;
[aView addObserver:self forKeyPath:@"objectValue" options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:"editing"];
[aView addObserver:self forKeyPath:@"objectValue" options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:"editing"];
}
return aView;
+3 -2
View File
@@ -2002,7 +2002,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
{
previousContentViewBoundsOrigin = CGPointMakeCopy([[scrollView contentView] boundsOrigin]);
if(![[self superview] scrollRectToVisible:[self frame]])
if (![[self superview] scrollRectToVisible:[self frame]])
previousContentViewBoundsOrigin = nil;
}
@@ -2139,7 +2139,8 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey",
newValue = [self valueForBinding:aBinding],
value = [destination valueForKeyPath:keyPath];
if (CPIsControllerMarker(value) && newValue === nil) return;
if (CPIsControllerMarker(value) && newValue === nil)
return;
newValue = [self reverseTransformValue:newValue withOptions:options];
+4 -4
View File
@@ -63,7 +63,7 @@
@optional
- (BOOL)windowShouldClose:(CPWindow)aWindow;
- (CPSize)windowWillResize:(CPWindow)sender toSize:(CPSize)aSize;
- (CGSize)windowWillResize:(CPWindow)sender toSize:(CGSize)aSize;
- (CPUndoManager)windowWillReturnUndoManager:(CPWindow)window;
- (void)windowDidBecomeKey:(CPNotification)aNotification;
- (void)windowDidBecomeMain:(CPNotification)aNotification;
@@ -80,7 +80,7 @@
@end
var CPWindowDelegate_windowShouldClose_ = 1 << 1
var CPWindowDelegate_windowShouldClose_ = 1 << 1,
CPWindowDelegate_windowWillReturnUndoManager_ = 1 << 2,
CPWindowDelegate_windowWillClose_ = 1 << 3,
CPWindowDelegate_windowWillResize_toSize_ = 1 << 4;
@@ -2780,7 +2780,7 @@ CPTexturedBackgroundWindowMask
[[CPNotificationCenter defaultCenter] removeObserver:self name:CPWindowDidEndSheetNotification object:self];
var sheet = _sheetContext[@"nextSheet"],
modalDelegate =_sheetContext[@"nextModalDelegate"],
modalDelegate = _sheetContext[@"nextModalDelegate"],
endSelector = _sheetContext[@"nextEndSelector"],
contextInfo = _sheetContext[@"nextContextInfo"];
@@ -3521,7 +3521,7 @@ var keyViewComparator = function(lhs, rhs, context)
@ignore
Call the delegate windowWillResize:toSize:
*/
- (CPSize)_sendDelegateWindowWillResizeToSize:(CPSize)aSize
- (CGSize)_sendDelegateWindowWillResizeToSize:(CGSize)aSize
{
if (!(_implementedDelegateMethods & CPWindowDelegate_windowWillResize_toSize_))
return aSize;
+2 -1
View File
@@ -196,7 +196,8 @@ var concat = Array.prototype.concat,
}
else
for (; index < count; ++index) {
for (; index < count; ++index)
{
var receiver = self[index];
receiver == nil ? nil : receiver.isa.objj_msgSend0(receiver, aSelector);
}
+2 -3
View File
@@ -26,9 +26,8 @@
@import "CPString.j"
// The default global behavior class, created lazily
var CPDefaultDcmHandler = nil;
var CPDecimalNumberUIDs = new CFMutableDictionary();
var CPDefaultDcmHandler = nil,
CPDecimalNumberUIDs = new CFMutableDictionary();
/*!
@class CPDecimalNumberHandler
+1 -1
View File
@@ -266,7 +266,7 @@ var abbreviationDictionary,
@"MST" : [@"Mountain Standard Time", @"MST", @"Mountain Daylight Time", @"MDT", @"Mountain Time", @"MT"],
@"PHT" : [@"Philippine Standard Time", @"GMT+08:00", @"Philippine Summer Time", @"GMT+08:00", @"Philippine Standard Time", @"Philippines Time"],
@"WET" : [@"Western European Standard Time", @"GMT", @"Western European Summer Time", @"GMT+01:00", @"Western European Time", @"Portugal Time (Lisbon)"]
};
};
var date = [CPDate date],
abbreviation = String(String(date).split("(")[1]).split(")")[0];