Skip to content

Commit 5fc6da7

Browse files
committed
Replaced more deprecated method calls and constants.
1 parent afb2a06 commit 5fc6da7

4 files changed

+9
-7
lines changed

SSButton.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
2727

2828
if ([self color] != nil) {
2929
[[[self color] colorWithAlphaComponent:0.9] set];
30-
NSRectFillUsingOperation(cellFrame, NSCompositePlusDarker);
30+
NSRectFillUsingOperation(cellFrame, NSCompositingOperationPlusDarker);
3131
}
3232
}
3333

@@ -150,7 +150,7 @@ - (BOOL)performKeyEquivalent:(NSEvent *)event {
150150
modifierFlags:[event modifierFlags] & ~NSEventModifierFlagOption
151151
timestamp:[event timestamp]
152152
windowNumber:[event windowNumber]
153-
context:[event context]
153+
context:nil
154154
characters:[event characters]
155155
charactersIgnoringModifiers:[event charactersIgnoringModifiers]
156156
isARepeat:[event isARepeat]

SSYAboutPanelController.m

+4-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ - (NSAttributedString *) textToScroll
8989
// Suck the contents of the rich text file into a mutable “attributed string”.
9090
NSMutableAttributedString* theText ;
9191
if (path) {
92-
theText = [[NSMutableAttributedString alloc] initWithPath: path
93-
documentAttributes: NULL] ;
92+
theText = [[NSMutableAttributedString alloc] initWithURL:[NSURL fileURLWithPath:path]
93+
options:@{}
94+
documentAttributes:NULL
95+
error:NULL];
9496
// Make up one newline
9597
NSAttributedString* newline = [[[NSAttributedString alloc] initWithString: @"\n"] autorelease];
9698

SSYLabelledList.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ - (id) initWithLabel:(NSString*)label
207207
NSView* allOrNoneView_ = [[NSView alloc] initWithFrame:NSZeroRect] ;
208208
NSButton* allButton = [[NSButton alloc] initWithFrame:NSZeroRect] ;
209209
[allButton setFont:[NSFont systemFontOfSize:13]] ;
210-
[allButton setBezelStyle:NSSmallSquareBezelStyle] ;
210+
[allButton setBezelStyle:NSBezelStyleSmallSquare] ;
211211
[allButton setTitle:NSLocalizedString(@"All", nil)] ;
212212
[allButton sizeToFit] ;
213213
[allButton setTarget:tableView_] ;
@@ -217,7 +217,7 @@ - (id) initWithLabel:(NSString*)label
217217
if (allowsEmptySelection) {
218218
NSButton* noneButton = [[NSButton alloc] initWithFrame:NSZeroRect] ; ;
219219
[noneButton setFont:[NSFont systemFontOfSize:13]] ;
220-
[noneButton setBezelStyle:NSSmallSquareBezelStyle] ;
220+
[noneButton setBezelStyle:NSBezelStyleSmallSquare] ;
221221
[noneButton setTitle:NSLocalizedString(@"None", nil)] ;
222222
[noneButton sizeToFit] ;
223223
[noneButton setTarget:tableView_] ;

SSYThreadConfinedCoreDataStack.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ - (NSManagedObjectContext *)managedObjectContext {
6363
if (!m_managedObjectContext) {
6464
NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator];
6565
if (coordinator) {
66-
m_managedObjectContext = [[NSManagedObjectContext alloc] init] ;
66+
m_managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType] ;
6767
[m_managedObjectContext setPersistentStoreCoordinator:coordinator] ;
6868
[m_managedObjectContext setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy] ;
6969
}

0 commit comments

Comments
 (0)