[macOS] Apply ObjC modernizations once again. (#3358)

This doesn't include designated initializers refactoring.
This commit is contained in:
Dzmitry Neviadomski
2022-06-29 07:20:42 +03:00
committed by GitHub
parent 88a3149ce4
commit 37f7f83d4d
18 changed files with 59 additions and 58 deletions

View File

@@ -107,7 +107,7 @@
self.fNameField.toolTip = name;
//disable fullscreen support
[self.window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenNone];
self.window.collectionBehavior = NSWindowCollectionBehaviorFullScreenNone;
self.fIconView.image = self.torrent.icon;
@@ -233,7 +233,7 @@
[alert addButtonWithTitle:NSLocalizedString(@"Add", "Add torrent -> same name -> button")];
alert.showsSuppressionButton = YES;
[alert beginSheetModalForWindow:[self window] completionHandler:^(NSModalResponse returnCode) {
[alert beginSheetModalForWindow:self.window completionHandler:^(NSModalResponse returnCode) {
if (alert.suppressionButton.state == NSControlStateValueOn)
{
[NSUserDefaults.standardUserDefaults setBool:NO forKey:@"WarningFolderDataSameName"];