diff --git a/MacPass/DDHotKey+MacPassAdditions.m b/MacPass/DDHotKey+MacPassAdditions.m index 7a656aee..1806df97 100644 --- a/MacPass/DDHotKey+MacPassAdditions.m +++ b/MacPass/DDHotKey+MacPassAdditions.m @@ -86,19 +86,19 @@ NSEventModifierFlags flags = 0; switch(self.keyCode) { case kVK_Command: - flags = NSCommandKeyMask; + flags = NSEventModifierFlagCommand; break; case kVK_Shift: case kVK_RightShift: - flags = NSShiftKeyMask; + flags = NSEventModifierFlagShift; break; case kVK_Option: case kVK_RightOption: - flags = NSAlternateKeyMask; + flags = NSEventModifierFlagOption; break; case kVK_Control: case kVK_RightControl: - flags = NSControlKeyMask; + flags = NSEventModifierFlagControl; break; } BOOL missingModifier = self.modifierFlags == 0; diff --git a/MacPass/DocumentSplitView.xib b/MacPass/DocumentSplitView.xib index aa253f68..d61c3950 100644 --- a/MacPass/DocumentSplitView.xib +++ b/MacPass/DocumentSplitView.xib @@ -1,7 +1,9 @@ - - + + - + + + @@ -13,7 +15,8 @@ - + + diff --git a/MacPass/DocumentWindow.xib b/MacPass/DocumentWindow.xib index 34c4d7bd..909233db 100644 --- a/MacPass/DocumentWindow.xib +++ b/MacPass/DocumentWindow.xib @@ -20,7 +20,7 @@ - + diff --git a/MacPass/MPAutotypeDaemon.m b/MacPass/MPAutotypeDaemon.m index 33ccade9..eb44d267 100644 --- a/MacPass/MPAutotypeDaemon.m +++ b/MacPass/MPAutotypeDaemon.m @@ -364,7 +364,7 @@ static MPAutotypeDaemon *_sharedInstance; if(!self.matchSelectionWindow) { self.matchSelectionWindow = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 100, 100) styleMask:NSWindowStyleMaskNonactivatingPanel|NSWindowStyleMaskTitled - backing:NSBackingStoreRetained + backing:NSBackingStoreBuffered defer:YES]; self.matchSelectionWindow.level = kCGAssistiveTechHighWindowLevel; MPAutotypeCandidateSelectionViewController *vc = [[MPAutotypeCandidateSelectionViewController alloc] init]; diff --git a/MacPass/MPContextButton.m b/MacPass/MPContextButton.m index c09e989f..6c95fa77 100644 --- a/MacPass/MPContextButton.m +++ b/MacPass/MPContextButton.m @@ -102,15 +102,15 @@ NSImageRep *rep = [[self imageForSegment:MPContextButtonSegmentButton] bestRepresentationForRect:NSMakeRect(0, 0, 100, 100) context:nil hints:nil]; CGFloat scale = rep.size.width / rep.size.height; switch (controlSize) { - case NSRegularControlSize: + case NSControlSizeRegular: [self imageForSegment:MPContextButtonSegmentButton].size = NSMakeSize(16 * scale, 16); break; - case NSSmallControlSize: + case NSControlSizeSmall: [self imageForSegment:MPContextButtonSegmentButton].size = NSMakeSize(14 * scale, 14); break; - case NSMiniControlSize: + case NSControlSizeMini: [self imageForSegment:MPContextButtonSegmentButton].size = NSMakeSize(8 * scale, 8); default: diff --git a/MacPass/MPLockDaemon.m b/MacPass/MPLockDaemon.m index 8851198c..29f9d613 100644 --- a/MacPass/MPLockDaemon.m +++ b/MacPass/MPLockDaemon.m @@ -165,7 +165,7 @@ static MPLockDaemon *_sharedInstance; } /* Create event handler if necessary */ if(!self.localEventHandler) { - self.localEventHandler = [NSEvent addLocalMonitorForEventsMatchingMask:NSAnyEventMask handler:^NSEvent *(NSEvent *theEvent) { + self.localEventHandler = [NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskAny handler:^NSEvent *(NSEvent *theEvent) { self.lastLocalEventTime = NSDate.timeIntervalSinceReferenceDate; return theEvent; }]; diff --git a/MacPass/MPOverlayWindowController.m b/MacPass/MPOverlayWindowController.m index 87397121..cc84925f 100644 --- a/MacPass/MPOverlayWindowController.m +++ b/MacPass/MPOverlayWindowController.m @@ -56,7 +56,7 @@ - (void)windowDidLoad { [super windowDidLoad]; - self.window.styleMask = NSBorderlessWindowMask; + self.window.styleMask = NSWindowStyleMaskBorderless; self.window.alphaValue = 0; self.window.opaque = NO; self.window.hasShadow = YES; diff --git a/MacPass/MPPasswordCreatorViewController.m b/MacPass/MPPasswordCreatorViewController.m index 8c73ea27..cc844cca 100644 --- a/MacPass/MPPasswordCreatorViewController.m +++ b/MacPass/MPPasswordCreatorViewController.m @@ -161,7 +161,7 @@ typedef NS_ENUM(NSUInteger, MPPasswordRating) { if(!self.allowsEntryDefaults || (nil == [self _currentEntryDefaults])) { return; // We aren't using entry so just leave; } - BOOL deleteEntryDefaults = MPIsFlagSetInOptions(NSAlternateKeyMask, [NSEvent modifierFlags]); + BOOL deleteEntryDefaults = MPIsFlagSetInOptions(NSEventModifierFlagOption, NSEvent.modifierFlags); [self _updateSetDefaultsButton:deleteEntryDefaults]; } diff --git a/MacPass/MPPasswordEditWindowController.m b/MacPass/MPPasswordEditWindowController.m index 56cfb2bd..b3ea1926 100644 --- a/MacPass/MPPasswordEditWindowController.m +++ b/MacPass/MPPasswordEditWindowController.m @@ -138,7 +138,7 @@ savePanel.canCreateDirectories = YES; savePanel.title = NSLocalizedString(@"SAVE_KEYFILE", "Button title to save the generated key file"); [savePanel beginWithCompletionHandler:^(NSInteger result) { - if(result == NSFileHandlingPanelOKButton) { + if(result == NSModalResponseOK) { NSURL *keyURL = [savePanel URL]; NSError *error; BOOL saveOk = [data writeToURL:keyURL options:NSDataWritingAtomic error:&error]; diff --git a/MacPass/MPTreeDelegate.m b/MacPass/MPTreeDelegate.m index d35b640d..e7fbac9c 100644 --- a/MacPass/MPTreeDelegate.m +++ b/MacPass/MPTreeDelegate.m @@ -88,7 +88,7 @@ NSPanel *panel = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 100, 100) styleMask:NSWindowStyleMaskNonactivatingPanel|NSWindowStyleMaskTitled|NSWindowStyleMaskResizable - backing:NSBackingStoreRetained + backing:NSBackingStoreBuffered defer:YES]; panel.level = NSScreenSaverWindowLevel; panel.contentViewController = pickFieldViewController; @@ -112,7 +112,7 @@ NSPanel *panel = [[NSPanel alloc] initWithContentRect:NSMakeRect(0, 0, 100, 100) styleMask:NSWindowStyleMaskNonactivatingPanel|NSWindowStyleMaskTitled|NSWindowStyleMaskResizable - backing:NSBackingStoreRetained + backing:NSBackingStoreBuffered defer:YES]; panel.level = NSScreenSaverWindowLevel; panel.contentViewController = pickCharViewController; diff --git a/MacPass/MPWorkflowPreferencesController.m b/MacPass/MPWorkflowPreferencesController.m index 09d13302..a63478b2 100644 --- a/MacPass/MPWorkflowPreferencesController.m +++ b/MacPass/MPWorkflowPreferencesController.m @@ -86,7 +86,7 @@ openPanel.allowedFileTypes = @[@"app"]; [openPanel beginSheetModalForWindow:self.view.window completionHandler:^(NSInteger result) { - if(result == NSFileHandlingPanelOKButton) { + if(result == NSModalResponseOK) { // TODO: Autorelease pool? NSMenuItem *customBrowser = [[NSMenuItem alloc] init]; customBrowser.representedObject = [NSBundle bundleWithPath:openPanel.URL.path].bundleIdentifier;