Skip to content

Commit

Permalink
Updated with changes from OmniGroup svn [307082:307964]
Browse files Browse the repository at this point in the history
  • Loading branch information
tjw committed Apr 5, 2018
1 parent 06f894e commit e5f20e5
Show file tree
Hide file tree
Showing 73 changed files with 490 additions and 362 deletions.

This file was deleted.

5 changes: 0 additions & 5 deletions Configurations/Omni-Global-Common-MacAppStorePro.xcconfig

This file was deleted.

2 changes: 1 addition & 1 deletion Configurations/Omni-Global-Settings.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ COPY_PHASE_STRIP = NO
ENABLE_BITCODE = NO
STRIP_BITCODE_FROM_COPIED_FILES = NO

SWIFT_VERSION = 3.0
SWIFT_VERSION = 4.0

GCC_PREFIX_HEADER = $(PROJECT_NAME)_Prefix.h

Expand Down
4 changes: 2 additions & 2 deletions Frameworks/OmniAppKit/OAApplication.m
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ - (void)showHelpURL:(NSString *)helpURLString;
CGFloat startingWidth = [infoDict floatForKey:@"OAHelpWidth" defaultValue:800.0f];
CGFloat startingHeight = [infoDict floatForKey:@"OAHelpHeight" defaultValue:650.0f];
CGFloat minHeight = [infoDict floatForKey:@"OAHelpMinHeight" defaultValue:200.0f];
CGFloat minWidth = [infoDict floatForKey:@"OAHelpMinWidth" defaultValue:startingWidth];
CGFloat maxWidth = [infoDict floatForKey:@"OAHelpMaxWidth" defaultValue:startingWidth];
CGFloat minWidth = [infoDict floatForKey:@"OAHelpMinWidth" defaultValue:(float)startingWidth];
CGFloat maxWidth = [infoDict floatForKey:@"OAHelpMaxWidth" defaultValue:(float)startingWidth];

NSWindow *window = [viewer window];
[window setTitle:title];
Expand Down
14 changes: 14 additions & 0 deletions Frameworks/OmniAppKit/OAImages.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright 2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// <http://www.omnigroup.com/developer/sourcecode/sourcelicense/>.
//
// $Id$

extern NSImage *OAActionImage(void);
extern NSImage *OAGearTemplateImage(void);
extern NSImage *OAInfoTemplateImage(void);
extern NSImage *OAMiniAction(void);
extern NSImage *OAMiniRemove(void);
37 changes: 37 additions & 0 deletions Frameworks/OmniAppKit/OAImages.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copyright 2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// <http://www.omnigroup.com/developer/sourcecode/sourcelicense/>.

#import <OmniAppKit/OAImages.h>

#import <OmniAppKit/NSImage-OAExtensions.h>

RCS_ID("$Id$")

NSImage *OAActionImage(void)
{
return [NSImage imageNamed:@"OAActionImage" inBundle:OMNI_BUNDLE];
}

NSImage *OAGearTemplateImage(void)
{
return [NSImage imageNamed:@"OAGearTemplate" inBundle:OMNI_BUNDLE];
}

NSImage *OAInfoTemplateImage(void)
{
return [NSImage imageNamed:@"OAInfoTemplateImage" inBundle:OMNI_BUNDLE];
}

NSImage *OAMiniAction(void)
{
return [NSImage imageNamed:@"OAMiniAction" inBundle:OMNI_BUNDLE];
}

NSImage *OAMiniRemove(void)
{
return [NSImage imageNamed:@"OAMiniRemove" inBundle:OMNI_BUNDLE];
}
7 changes: 4 additions & 3 deletions Frameworks/OmniAppKit/OAStrings.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016 Omni Development, Inc. All rights reserved.
// Copyright 2016-2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
Expand All @@ -10,5 +10,6 @@
@class NSString;

// Common localized strings
extern NSString *OAOK(void);
extern NSString *OACancel(void);
extern NSString * _Nonnull OAOK(void);
extern NSString * _Nonnull OACancel(void);
extern NSString * _Nonnull OALearnMore(void);
12 changes: 11 additions & 1 deletion Frameworks/OmniAppKit/OAStrings.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2010-2016 Omni Development, Inc. All rights reserved.
// Copyright 2010-2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
Expand Down Expand Up @@ -32,3 +32,13 @@
});
return string;
}

NSString *OALearnMore(void)
{
static NSString *string;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
string = NSLocalizedStringFromTableInBundle(@"Learn More", @"OmniAppKit", OMNI_BUNDLE, @"button title");
});
return string;
}
3 changes: 2 additions & 1 deletion Frameworks/OmniAppKit/OmniAppKit.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 1997-2017 Omni Development, Inc. All rights reserved.
// Copyright 1997-2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
Expand Down Expand Up @@ -116,6 +116,7 @@
#import <OmniAppKit/OAGradientTableView.h>
#import <OmniAppKit/OAGridView.h>
#import <OmniAppKit/OAHierarchicalPopUpController.h>
#import <OmniAppKit/OAImages.h>
#import <OmniAppKit/OAInternetConfig.h>
#import <OmniAppKit/OALabelField.h>
#import <OmniAppKit/OAMouseTipWindow.h>
Expand Down
15 changes: 11 additions & 4 deletions Frameworks/OmniAppKit/OmniAppKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@
E235B46515CC771600E162D6 /* OATrackingLoop.m in Sources */ = {isa = PBXBuildFile; fileRef = E235B46315CC771600E162D6 /* OATrackingLoop.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
E235B69F15CC836000E162D6 /* OAToolbarButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E235B69D15CC836000E162D6 /* OAToolbarButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
E235B6A015CC836000E162D6 /* OAToolbarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E235B69E15CC836000E162D6 /* OAToolbarButton.m */; };
E25C440C2075359300660AE6 /* OAImages.m in Sources */ = {isa = PBXBuildFile; fileRef = E25C440B2075359300660AE6 /* OAImages.m */; };
E25C4435207535C800660AE6 /* OAImages.h in Headers */ = {isa = PBXBuildFile; fileRef = E25C4434207535C800660AE6 /* OAImages.h */; settings = {ATTRIBUTES = (Public, ); }; };
E2A61BDF1D41574900416AB5 /* OAAutosizingSegmentedControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E2A61BDD1D41574900416AB5 /* OAAutosizingSegmentedControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
E2A61BE01D41574900416AB5 /* OAAutosizingSegmentedControl.m in Sources */ = {isa = PBXBuildFile; fileRef = E2A61BDE1D41574900416AB5 /* OAAutosizingSegmentedControl.m */; };
E2B8A8D815BE016E00B5F26B /* OAPreferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = E2B8A8D615BE016E00B5F26B /* OAPreferences.xib */; };
Expand Down Expand Up @@ -1256,12 +1258,10 @@
34C12B06194FF90F005CB70B /* OAUnitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OAUnitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
34C12B1B194FF926005CB70B /* Omni-Application-Common-AppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Application-Common-AppStore.xcconfig"; sourceTree = "<group>"; };
34C12B1C194FF926005CB70B /* Omni-Application-Common-MacAppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Application-Common-MacAppStore.xcconfig"; sourceTree = "<group>"; };
34C12B1D194FF926005CB70B /* Omni-Application-Common-MacAppStorePro.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Application-Common-MacAppStorePro.xcconfig"; sourceTree = "<group>"; };
34C12B1E194FF926005CB70B /* Omni-Application-Common-OmniStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Application-Common-OmniStore.xcconfig"; sourceTree = "<group>"; };
34C12B1F194FF926005CB70B /* Omni-Application-Common-AppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Application-Common-AppStore.xcconfig"; sourceTree = "<group>"; };
34C12B20194FF926005CB70B /* Omni-Global-Common-AppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Global-Common-AppStore.xcconfig"; sourceTree = "<group>"; };
34C12B21194FF926005CB70B /* Omni-Global-Common-MacAppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Global-Common-MacAppStore.xcconfig"; sourceTree = "<group>"; };
34C12B22194FF926005CB70B /* Omni-Global-Common-MacAppStorePro.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Global-Common-MacAppStorePro.xcconfig"; sourceTree = "<group>"; };
34C12B23194FF926005CB70B /* Omni-Global-Common-OmniStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Global-Common-OmniStore.xcconfig"; sourceTree = "<group>"; };
34C12B24194FF926005CB70B /* Omni-Global-Common-AppStore.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Omni-Global-Common-AppStore.xcconfig"; sourceTree = "<group>"; };
34C12B25194FF926005CB70B /* Touch-Bundle-Common.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Touch-Bundle-Common.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1495,6 +1495,8 @@
E235B46315CC771600E162D6 /* OATrackingLoop.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OATrackingLoop.m; sourceTree = "<group>"; };
E235B69D15CC836000E162D6 /* OAToolbarButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAToolbarButton.h; sourceTree = "<group>"; };
E235B69E15CC836000E162D6 /* OAToolbarButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OAToolbarButton.m; sourceTree = "<group>"; };
E25C440B2075359300660AE6 /* OAImages.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OAImages.m; sourceTree = "<group>"; };
E25C4434207535C800660AE6 /* OAImages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAImages.h; sourceTree = "<group>"; };
E274EDCB056D99550097A12E /* OAGradientTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAGradientTableView.h; sourceTree = "<group>"; };
E274EDCC056D99550097A12E /* OAGradientTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OAGradientTableView.m; sourceTree = "<group>"; };
E2A61BDD1D41574900416AB5 /* OAAutosizingSegmentedControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OAAutosizingSegmentedControl.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2667,6 +2669,8 @@
34D04A38110E0270007399B9 /* OAUtilities.m */,
3435EF861DEE4CFE002CB3F9 /* OAStrings.h */,
3435EF871DEE4CFE002CB3F9 /* OAStrings.m */,
E25C4434207535C800660AE6 /* OAImages.h */,
E25C440B2075359300660AE6 /* OAImages.m */,
34DAF8660556CA0D0097A113 /* OAVersion.h */,
34275D1C13981621003F28F5 /* OAFeatures.h */,
34A1594805642A810097A113 /* OmniAppKit.order */,
Expand Down Expand Up @@ -2696,7 +2700,6 @@
children = (
34C12B1B194FF926005CB70B /* Omni-Application-Common-AppStore.xcconfig */,
34C12B1C194FF926005CB70B /* Omni-Application-Common-MacAppStore.xcconfig */,
34C12B1D194FF926005CB70B /* Omni-Application-Common-MacAppStorePro.xcconfig */,
34C12B1E194FF926005CB70B /* Omni-Application-Common-OmniStore.xcconfig */,
A207C22F0AA3BC7F00C3A5EF /* Omni-Application-Common.xcconfig */,
4AA1EBCE08AA772700E2FF6B /* Omni-Application-Debug.xcconfig */,
Expand All @@ -2709,7 +2712,6 @@
4AA1EBD208AA772700E2FF6B /* Omni-Framework-Release.xcconfig */,
34C12B20194FF926005CB70B /* Omni-Global-Common-AppStore.xcconfig */,
34C12B21194FF926005CB70B /* Omni-Global-Common-MacAppStore.xcconfig */,
34C12B22194FF926005CB70B /* Omni-Global-Common-MacAppStorePro.xcconfig */,
34C12B23194FF926005CB70B /* Omni-Global-Common-OmniStore.xcconfig */,
A207C2340AA3BC7F00C3A5EF /* Omni-Global-Common.xcconfig */,
4AB8F09C08AD0A0600DBB061 /* Omni-Global-Debug.xcconfig */,
Expand Down Expand Up @@ -3046,6 +3048,7 @@
4AA1E67C08AA764600E2FF6B /* OAInternetConfig.h in Headers */,
4AA1E67E08AA764600E2FF6B /* NSColor-ColorSyncExtensions.h in Headers */,
3EF5F1BF19104DEF0072ED90 /* OAWebPageViewerDelegate.h in Headers */,
E25C4435207535C800660AE6 /* OAImages.h in Headers */,
4AA1E67F08AA764600E2FF6B /* NSImage-ColorSyncExtensions.h in Headers */,
4AA1E68008AA764600E2FF6B /* OAColorProfile.h in Headers */,
4268E9CC0DBE6B03002F30B1 /* OAColorProfile-Deprecated.h in Headers */,
Expand Down Expand Up @@ -3379,6 +3382,9 @@
DevelopmentTeamName = "The Omni Group";
TestTargetID = 34C12AFB194FF90F005CB70B;
};
4AA1E67A08AA764600E2FF6B = {
LastSwiftMigration = "";
};
4AA1E7FA08AA764600E2FF6B = {
TestTargetID = 4AA1E67A08AA764600E2FF6B;
};
Expand Down Expand Up @@ -4169,6 +4175,7 @@
346A98A315903B0F00CA3359 /* NSAnimationContext-OAExtensions.m in Sources */,
27AC122E15BA295400B726A7 /* NSView-OALayerBackedFix.m in Sources */,
E235B46515CC771600E162D6 /* OATrackingLoop.m in Sources */,
E25C440C2075359300660AE6 /* OAImages.m in Sources */,
E235B6A015CC836000E162D6 /* OAToolbarButton.m in Sources */,
49EF503E15F6EAD000254849 /* OALabelField.m in Sources */,
3E80E9F81614EFC20078A123 /* OAGradientBoxSeparator.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ + (NSString *)xmlElementName;
static void _xmlComponentAdder(id container, NSString *key, double component)
{
OBPRECONDITION([container isKindOfClass:[OFXMLDocument class]]);
[container setAttribute:key real:component];
[container setAttribute:key real:(float)component];
}

static void _xmlStringAdder(id container, NSString *key, NSString *string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ - (void)applyToViewTree:(void (^)(NSView *view))applier;

// Debugging

unsigned int NSViewMaxDebugDepth = 10;
static unsigned int ViewMaxDebugDepth = 10;

- (NSMutableDictionary *)debugDictionary;
{
Expand All @@ -1049,7 +1049,7 @@ - (NSMutableDictionary *)debugDictionary;

- (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level;
{
if (level < NSViewMaxDebugDepth)
if (level < ViewMaxDebugDepth)
return [[self debugDictionary] descriptionWithLocale:locale indent:level];
else
return [self shortDescription];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 1997-2017 Omni Development, Inc. All rights reserved.
// Copyright 1997-2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
Expand Down Expand Up @@ -568,7 +568,7 @@ - (void)withTabbingMode:(NSWindowTabbingMode)tabbingMode performBlock:(void (^)(
#pragma mark -

NSNotificationName const OAWindowUserTabbingPreferenceDidChange = @"OAWindowUserTabbingPreferenceDidChange";
void *OAWindowUserTabbingPreferenceDidChangeObservationContext = &OAWindowUserTabbingPreferenceDidChangeObservationContext;
static void *OAWindowUserTabbingPreferenceDidChangeObservationContext = &OAWindowUserTabbingPreferenceDidChangeObservationContext;

@interface OAWinderUserTabbingPreferenceObserver : NSObject {
@private
Expand Down
16 changes: 16 additions & 0 deletions Frameworks/OmniAppKit/Tests/UnitTests/OAGeometryTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,22 @@ - (void)testCurveCurveIntersections3
(expect){Pt( 0.09791,-0.08374), intersectionEntryRight});
}

#ifdef DEBUG_wiml
- (void)testCurveCurveIntersectionsRegressions
{
// This tests the case from bug #156724
NSPoint ovalish[4] = {
Pt(393.80251542775778, 250.42792372513134), Pt(373.99478693587287, 240.52400875828957), Pt(342.00521306412713, 240.52400875828957), Pt(322.19748457224222, 250.42792372513134)
};
NSPoint lineish[4] = {
Pt(358, 147), Pt(358, 147), Pt(358, 269), Pt(358, 269)
};

checkCurveCurve(ovalish, lineish, 1,
(expect){Pt(358, 240), intersectionEntryBogus});
}
#endif

- (void)testCurveCurveGrazing
{
NSPoint bulge1[4] = { Pt(0,0), Pt(-8,5), Pt(32, 5), Pt(24, 0) };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2006-2016 Omni Development, Inc. All rights reserved.
// Copyright 2006-2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
Expand All @@ -15,7 +15,7 @@

RCS_ID("$Id$");

void * _OAConstructionTimeViewTabbedWindowsObservationContext = &_OAConstructionTimeViewTabbedWindowsObservationContext;
static void * _OAConstructionTimeViewTabbedWindowsObservationContext = &_OAConstructionTimeViewTabbedWindowsObservationContext;

@interface _OAConstructionTimeView : NSView

Expand Down
8 changes: 4 additions & 4 deletions Frameworks/OmniAppKit/Widgets.subproj/OAThumbnailView.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 1997-2017 Omni Development, Inc. All rights reserved.
// Copyright 1997-2018 Omni Development, Inc. All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
Expand Down Expand Up @@ -69,7 +69,7 @@ - (void)setFrameSize:(NSSize)_newSize
cellSize.height += LABEL_FONT_SIZE + LABEL_PADDING
- LABEL_OVERLAP_WITH_BOTTOM_PADDING;

columnCount = MAX(superBounds.size.width / cellSize.width, 1);
columnCount = (NSUInteger)MAX(superBounds.size.width / cellSize.width, 1);
rowCount = [provider thumbnailCount] / columnCount
+ (([provider thumbnailCount] % columnCount) ? 1 : 0);
rowCount = MAX(1U, rowCount);
Expand All @@ -89,8 +89,8 @@ - (void)drawRect:(NSRect)dirtyRect

NSUInteger thumbnailCount = [provider thumbnailCount];

NSUInteger startRow = NSMinY(dirtyRect) / cellSize.height;
NSUInteger endRow = MIN(NSMaxY(dirtyRect) / cellSize.height, rowCount);
NSUInteger startRow = (NSUInteger)NSMinY(dirtyRect) / cellSize.height;
NSUInteger endRow = (NSUInteger)MIN(NSMaxY(dirtyRect) / cellSize.height, rowCount);

for (NSUInteger row = startRow; row <= endRow; row++) {
CGFloat y = cellSize.height * row;
Expand Down
Loading

0 comments on commit e5f20e5

Please sign in to comment.