Bumping MACOSX_DEPLOYMENT_TARGET to 11.0 (#6911)

* Bumping MACOSX_DEPLOYMENT_TARGET to 11.0

* removing obsolete code and resources

* Add a build action for Transmission.xcodeproj

* removing obsolete code
This commit is contained in:
Cœur
2024-08-22 22:07:17 +02:00
committed by GitHub
parent 173c19eb5a
commit d9d87eddd8
85 changed files with 83 additions and 692 deletions

View File

@@ -228,7 +228,6 @@ set_source_files_properties(
set(IMAGESETS
ActionHover
Bandwidth
CleanupTemplate
CompleteCheck
CreateLarge
@@ -236,17 +235,7 @@ set(IMAGESETS
DownArrowTemplate
DownloadBadge
EllipsisTemplate
FavIcon
GearshapeTemplate
Globe
Groups
InfoActivity
InfoFiles
InfoGeneral
InfoOptions
InfoPeers
InfoTracker
Lock
Magnet
PauseHover
PauseOff
@@ -258,7 +247,6 @@ set(IMAGESETS
PriorityHighTemplate
PriorityLowTemplate
PriorityNormalTemplate
Remote
ResumeHover
ResumeNoWaitHover
ResumeNoWaitOff
@@ -268,18 +256,7 @@ set(IMAGESETS
RevealHover
RevealOff
RevealOn
ToolbarCreateTemplate
ToolbarFilterTemplate
ToolbarInfoTemplate
ToolbarOpenTemplate
ToolbarOpenWebTemplate
ToolbarPauseAllTemplate
ToolbarPauseSelectedTemplate
ToolbarRemoveTemplate
ToolbarResumeAllTemplate
ToolbarResumeSelectedTemplate
TortoiseTemplate
Transfers
UpArrowGroupTemplate
UpArrowTemplate
UploadBadge

View File

@@ -6,38 +6,7 @@
NS_ASSUME_NONNULL_BEGIN
// Compatibility declarations to build `@available(macOS 11.0, *)` code with older Xcode 11.3.1 (the last 32-bit OS compatible Xcode)
#ifndef __MAC_11_0
typedef NS_ENUM(NSInteger, NSImageSymbolScale) {
NSImageSymbolScaleLarge = 3,
} API_AVAILABLE(macos(11.0));
@interface NSImage ()
+ (nullable instancetype)imageWithSystemSymbolName:(NSString*)symbolName
accessibilityDescription:(nullable NSString*)description API_AVAILABLE(macos(11.0));
@end
typedef NS_ENUM(NSInteger, NSWindowToolbarStyle) {
NSWindowToolbarStylePreference = 2,
NSWindowToolbarStyleUnified = 3,
} API_AVAILABLE(macos(11.0));
@interface NSWindow ()
@property NSWindowToolbarStyle toolbarStyle API_AVAILABLE(macos(11.0));
@end
typedef NS_ENUM(NSInteger, NSTableViewStyle) {
NSTableViewStyleFullWidth = 1,
} API_AVAILABLE(macos(11.0));
@interface NSTableView ()
@property NSTableViewStyle style API_AVAILABLE(macos(11.0));
@end
#endif
// Compatibility declarations to build `@available(macOS 13.0, *)` code with older Xcode 11.3.1 (the last 32-bit OS compatible Xcode)
// Compatibility declarations to build `@available(macOS 13.0, *)` code with older Xcode 12.5.1 (the last macOS 11.0 compatible Xcode)
#ifndef __MAC_13_0
typedef NS_ENUM(NSInteger, NSColorWellStyle) {

View File

@@ -632,11 +632,8 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
toolbar.displayMode = NSToolbarDisplayModeIconOnly;
self.fWindow.toolbar = toolbar;
if (@available(macOS 11.0, *))
{
self.fWindow.toolbarStyle = NSWindowToolbarStyleUnified;
self.fWindow.titleVisibility = NSWindowTitleHidden;
}
self.fWindow.toolbarStyle = NSWindowToolbarStyleUnified;
self.fWindow.titleVisibility = NSWindowTitleHidden;
self.fWindow.delegate = self; //do manually to avoid placement issue
@@ -4207,17 +4204,6 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
item.view = button;
if (@available(macOS 11.0, *))
{
//standard button sizes
}
else
{
NSSize const buttonSize = NSMakeSize(36.0, 25.0);
item.minSize = buttonSize;
item.maxSize = buttonSize;
}
return item;
}
@@ -4230,7 +4216,7 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
item.label = NSLocalizedString(@"Create", "Create toolbar item -> label");
item.paletteLabel = NSLocalizedString(@"Create Torrent File", "Create toolbar item -> palette label");
item.toolTip = NSLocalizedString(@"Create torrent file", "Create toolbar item -> tooltip");
item.image = [NSImage systemSymbol:@"doc.badge.plus" withFallback:@"ToolbarCreateTemplate"];
item.image = [NSImage imageWithSystemSymbolName:@"doc.badge.plus" accessibilityDescription:nil];
item.target = self;
item.action = @selector(createFile:);
item.autovalidates = NO;
@@ -4244,7 +4230,7 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
item.label = NSLocalizedString(@"Open", "Open toolbar item -> label");
item.paletteLabel = NSLocalizedString(@"Open Torrent Files", "Open toolbar item -> palette label");
item.toolTip = NSLocalizedString(@"Open torrent files", "Open toolbar item -> tooltip");
item.image = [NSImage systemSymbol:@"folder" withFallback:@"ToolbarOpenTemplate"];
item.image = [NSImage imageWithSystemSymbolName:@"folder" accessibilityDescription:nil];
item.target = self;
item.action = @selector(openShowSheet:);
item.autovalidates = NO;
@@ -4258,7 +4244,7 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
item.label = NSLocalizedString(@"Open Address", "Open address toolbar item -> label");
item.paletteLabel = NSLocalizedString(@"Open Torrent Address", "Open address toolbar item -> palette label");
item.toolTip = NSLocalizedString(@"Open torrent web address", "Open address toolbar item -> tooltip");
item.image = [NSImage systemSymbol:@"globe" withFallback:@"ToolbarOpenWebTemplate"];
item.image = [NSImage imageWithSystemSymbolName:@"globe" accessibilityDescription:nil];
item.target = self;
item.action = @selector(openURLShowSheet:);
item.autovalidates = NO;
@@ -4272,7 +4258,7 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
item.label = NSLocalizedString(@"Remove", "Remove toolbar item -> label");
item.paletteLabel = NSLocalizedString(@"Remove Selected", "Remove toolbar item -> palette label");
item.toolTip = NSLocalizedString(@"Remove selected transfers", "Remove toolbar item -> tooltip");
item.image = [NSImage systemSymbol:@"nosign" withFallback:@"ToolbarRemoveTemplate"];
item.image = [NSImage imageWithSystemSymbolName:@"nosign" accessibilityDescription:nil];
item.target = self;
item.action = @selector(removeNoDelete:);
item.visibilityPriority = NSToolbarItemVisibilityPriorityHigh;
@@ -4287,7 +4273,7 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
item.label = NSLocalizedString(@"Inspector", "Inspector toolbar item -> label");
item.paletteLabel = NSLocalizedString(@"Toggle Inspector", "Inspector toolbar item -> palette label");
item.toolTip = NSLocalizedString(@"Toggle the torrent inspector", "Inspector toolbar item -> tooltip");
item.image = [NSImage systemSymbol:@"info.circle" withFallback:@"ToolbarInfoTemplate"];
item.image = [NSImage imageWithSystemSymbolName:@"info.circle" accessibilityDescription:nil];
item.target = self;
item.action = @selector(showInfo:);
@@ -4306,13 +4292,13 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
segmentedControl.segmentCount = 2;
[segmentedControl setTag:ToolbarGroupTagPause forSegment:ToolbarGroupTagPause];
[segmentedControl setImage:[NSImage systemSymbol:@"pause.circle.fill" withFallback:@"ToolbarPauseAllTemplate"]
[segmentedControl setImage:[NSImage imageWithSystemSymbolName:@"pause.circle.fill" accessibilityDescription:nil]
forSegment:ToolbarGroupTagPause];
[segmentedControl setToolTip:NSLocalizedString(@"Pause all transfers", "All toolbar item -> tooltip")
forSegment:ToolbarGroupTagPause];
[segmentedControl setTag:ToolbarGroupTagResume forSegment:ToolbarGroupTagResume];
[segmentedControl setImage:[NSImage systemSymbol:@"arrow.clockwise.circle.fill" withFallback:@"ToolbarResumeAllTemplate"]
[segmentedControl setImage:[NSImage imageWithSystemSymbolName:@"arrow.clockwise.circle.fill" accessibilityDescription:nil]
forSegment:ToolbarGroupTagResume];
[segmentedControl setToolTip:NSLocalizedString(@"Resume all transfers", "All toolbar item -> tooltip")
forSegment:ToolbarGroupTagResume];
@@ -4331,17 +4317,6 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
groupItem.target = self;
groupItem.action = @selector(allToolbarClicked:);
if (@available(macOS 11.0, *))
{
//standard segment size
}
else
{
NSSize const groupSize = NSMakeSize(72.0, 25.0);
groupItem.minSize = groupSize;
groupItem.maxSize = groupSize;
}
[groupItem createMenu:@[
NSLocalizedString(@"Pause All", "All toolbar item -> label"),
NSLocalizedString(@"Resume All", "All toolbar item -> label")
@@ -4362,13 +4337,13 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
segmentedControl.segmentCount = 2;
[segmentedControl setTag:ToolbarGroupTagPause forSegment:ToolbarGroupTagPause];
[segmentedControl setImage:[NSImage systemSymbol:@"pause" withFallback:@"ToolbarPauseSelectedTemplate"]
[segmentedControl setImage:[NSImage imageWithSystemSymbolName:@"pause" accessibilityDescription:nil]
forSegment:ToolbarGroupTagPause];
[segmentedControl setToolTip:NSLocalizedString(@"Pause selected transfers", "Selected toolbar item -> tooltip")
forSegment:ToolbarGroupTagPause];
[segmentedControl setTag:ToolbarGroupTagResume forSegment:ToolbarGroupTagResume];
[segmentedControl setImage:[NSImage systemSymbol:@"arrow.clockwise" withFallback:@"ToolbarResumeSelectedTemplate"]
[segmentedControl setImage:[NSImage imageWithSystemSymbolName:@"arrow.clockwise" accessibilityDescription:nil]
forSegment:ToolbarGroupTagResume];
[segmentedControl setToolTip:NSLocalizedString(@"Resume selected transfers", "Selected toolbar item -> tooltip")
forSegment:ToolbarGroupTagResume];
@@ -4387,17 +4362,6 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
groupItem.target = self;
groupItem.action = @selector(selectedToolbarClicked:);
if (@available(macOS 11.0, *))
{
//standard segment size
}
else
{
NSSize const groupSize = NSMakeSize(72.0, 25.0);
groupItem.minSize = groupSize;
groupItem.maxSize = groupSize;
}
[groupItem createMenu:@[
NSLocalizedString(@"Pause Selected", "Selected toolbar item -> label"),
NSLocalizedString(@"Resume Selected", "Selected toolbar item -> label")
@@ -4413,7 +4377,7 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
item.label = NSLocalizedString(@"Filter", "Filter toolbar item -> label");
item.paletteLabel = NSLocalizedString(@"Toggle Filter", "Filter toolbar item -> palette label");
item.toolTip = NSLocalizedString(@"Toggle the filter bar", "Filter toolbar item -> tooltip");
item.image = [NSImage systemSymbol:@"magnifyingglass" withFallback:@"ToolbarFilterTemplate"];
item.image = [NSImage imageWithSystemSymbolName:@"magnifyingglass" accessibilityDescription:nil];
item.target = self;
item.action = @selector(toggleFilterBar:);
@@ -5263,16 +5227,9 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
//Hacky way of fixing an issue with showing the Toolbar
if (!self.isFullScreen)
{
//macOS Big Sur shows the unified toolbar by default
//macOS shows the unified toolbar by default
//and we only need to "fix" the layout when showing the toolbar
if (@available(macOS 11.0, *))
{
if (!self.fWindow.toolbar.isVisible)
{
[self removeStackViewHeightConstraints];
}
}
else
if (!self.fWindow.toolbar.isVisible)
{
[self removeStackViewHeightConstraints];
}
@@ -5289,12 +5246,9 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
- (void)hideToolBarBezels:(BOOL)hide
{
if (@available(macOS 11.0, *))
for (NSToolbarItem* item in self.fWindow.toolbar.items)
{
for (NSToolbarItem* item in self.fWindow.toolbar.items)
{
item.view.hidden = hide;
}
item.view.hidden = hide;
}
}

View File

@@ -120,34 +120,18 @@ UTType* GetTorrentFileType(void) API_AVAILABLE(macos(11.0))
- (BOOL)isDefaultForMagnetURLs
{
if (@available(macOS 12, *))
NSURL* schemeUrl = [NSURL URLWithString:[kMagnetURLScheme stringByAppendingString:@":"]];
NSURL* appUrl = [NSWorkspace.sharedWorkspace URLForApplicationToOpenURL:schemeUrl];
if (!appUrl)
{
NSURL* schemeUrl = [NSURL URLWithString:[kMagnetURLScheme stringByAppendingString:@":"]];
NSURL* appUrl = [NSWorkspace.sharedWorkspace URLForApplicationToOpenURL:schemeUrl];
if (!appUrl)
{
return NO;
}
NSString* bundleId = [NSBundle bundleWithURL:appUrl].bundleIdentifier;
if ([self.bundleIdentifier isEqualToString:bundleId])
{
return YES;
}
return NO;
}
else
{
NSString* bundleId = (__bridge_transfer NSString*)LSCopyDefaultHandlerForURLScheme((__bridge CFStringRef)kMagnetURLScheme);
if (!bundleId)
{
return NO;
}
if ([self.bundleIdentifier isEqualToString:bundleId])
{
return YES;
}
NSString* bundleId = [NSBundle bundleWithURL:appUrl].bundleIdentifier;
if ([self.bundleIdentifier isEqualToString:bundleId])
{
return YES;
}
return NO;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "Bandwidth.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "Bandwidth@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "FavIcon.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "FavIcon@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"filename" : "GearshapeTemplate.png",
"idiom" : "mac",
"scale" : "1x"
},
{
"filename" : "GearshapeTemplate@2x.png",
"idiom" : "mac",
"scale" : "2x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "Groups.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "Groups@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "InfoActivity.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "InfoActivity@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "InfoFiles.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "InfoFiles@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "InfoGeneral.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "InfoGeneral@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "InfoOptions.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "InfoOptions@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "InfoPeers.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "InfoPeers@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 755 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "InfoTracker.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "InfoTracker@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 970 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "Lock.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "Lock@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 811 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "Remote.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "Remote@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarCreateTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarCreateTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarFilterTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarFilterTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarInfoTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarInfoTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarOpenTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarOpenTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarOpenWebTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarOpenWebTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 543 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarPauseAllTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarPauseAllTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarPauseSelectedTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarPauseSelectedTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarRemoveTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarRemoveTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarResumeAllTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarResumeAllTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "ToolbarResumeSelectedTemplate.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "ToolbarResumeSelectedTemplate@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

View File

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "mac",
"filename" : "Transfers.png",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "Transfers@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 B

View File

@@ -353,7 +353,7 @@ static NSString* const kWebSeedAnimationId = @"webSeed";
if ([ident isEqualToString:@"Encryption"])
{
return [peer[@"Encryption"] boolValue] ? [NSImage systemSymbol:@"lock.fill" withFallback:@"Lock"] : nil;
return [peer[@"Encryption"] boolValue] ? [NSImage imageWithSystemSymbolName:@"lock.fill" accessibilityDescription:nil] : nil;
}
else if ([ident isEqualToString:@"Client"])
{

View File

@@ -102,21 +102,27 @@ typedef NS_ENUM(NSUInteger, TabTag) {
[self.fTabs.cell setToolTip:toolTip forSegment:segment];
};
setImageAndToolTipForSegment(
[NSImage systemSymbol:@"info.circle" withFallback:@"InfoGeneral"],
[NSImage imageWithSystemSymbolName:@"info.circle" accessibilityDescription:nil],
NSLocalizedString(@"General Info", "Inspector -> tab"),
TabTagGeneral);
setImageAndToolTipForSegment(
[NSImage systemSymbol:@"square.grid.3x3.fill.square" withFallback:@"InfoActivity"],
[NSImage imageWithSystemSymbolName:@"square.grid.3x3.fill.square" accessibilityDescription:nil],
NSLocalizedString(@"Activity", "Inspector -> tab"),
TabTagActivity);
setImageAndToolTipForSegment(
[NSImage systemSymbol:@"antenna.radiowaves.left.and.right" withFallback:@"InfoTracker"],
[NSImage imageWithSystemSymbolName:@"antenna.radiowaves.left.and.right" accessibilityDescription:nil],
NSLocalizedString(@"Trackers", "Inspector -> tab"),
TabTagTrackers);
setImageAndToolTipForSegment([NSImage systemSymbol:@"person.2" withFallback:@"InfoPeers"], NSLocalizedString(@"Peers", "Inspector -> tab"), TabTagPeers);
setImageAndToolTipForSegment([NSImage systemSymbol:@"doc.on.doc" withFallback:@"InfoFiles"], NSLocalizedString(@"Files", "Inspector -> tab"), TabTagFile);
setImageAndToolTipForSegment(
[NSImage systemSymbol:@"gearshape" withFallback:@"InfoOptions"],
[NSImage imageWithSystemSymbolName:@"person.2" accessibilityDescription:nil],
NSLocalizedString(@"Peers", "Inspector -> tab"),
TabTagPeers);
setImageAndToolTipForSegment(
[NSImage imageWithSystemSymbolName:@"doc.on.doc" accessibilityDescription:nil],
NSLocalizedString(@"Files", "Inspector -> tab"),
TabTagFile);
setImageAndToolTipForSegment(
[NSImage imageWithSystemSymbolName:@"gearshape" accessibilityDescription:nil],
NSLocalizedString(@"Options", "Inspector -> tab"),
TabTagOptions);

View File

@@ -9,8 +9,4 @@
+ (NSImage*)discIconWithColor:(NSColor*)color insetFactor:(CGFloat)insetFactor;
- (NSImage*)imageWithColor:(NSColor*)color;
/* macOS < 11 compatibility */
+ (NSImage*)systemSymbol:(NSString*)symbolName withFallback:(NSString*)fallbackName;
+ (NSImage*)largeSystemSymbol:(NSString*)symbolName withFallback:(NSString*)fallbackName;
@end

View File

@@ -50,27 +50,4 @@ static CGFloat const kBorderWidth = 1.25;
return coloredImage;
}
+ (NSImage*)systemSymbol:(NSString*)symbolName withFallback:(NSString*)fallbackName
{
if (@available(macOS 11.0, *))
{
return [NSImage imageWithSystemSymbolName:symbolName accessibilityDescription:nil];
}
return [NSImage imageNamed:fallbackName];
}
+ (NSImage*)largeSystemSymbol:(NSString*)symbolName withFallback:(NSString*)fallbackName
{
#ifdef __MAC_11_0
if (@available(macOS 11.0, *))
{
return [[NSImage imageWithSystemSymbolName:symbolName accessibilityDescription:nil]
imageWithSymbolConfiguration:[NSImageSymbolConfiguration configurationWithScale:NSImageSymbolScaleLarge]];
}
#endif
return [NSImage imageNamed:fallbackName];
}
@end

View File

@@ -302,7 +302,7 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
if ([ident isEqualToString:ToolbarTabGeneral])
{
item.label = NSLocalizedString(@"General", "Preferences -> toolbar item title");
item.image = [NSImage systemSymbol:@"gearshape" withFallback:NSImageNamePreferencesGeneral];
item.image = [NSImage imageWithSystemSymbolName:@"gearshape" accessibilityDescription:nil];
item.target = self;
item.action = @selector(setPrefView:);
item.autovalidates = NO;
@@ -310,7 +310,7 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
else if ([ident isEqualToString:ToolbarTabTransfers])
{
item.label = NSLocalizedString(@"Transfers", "Preferences -> toolbar item title");
item.image = [NSImage systemSymbol:@"arrow.up.arrow.down" withFallback:@"Transfers"];
item.image = [NSImage imageWithSystemSymbolName:@"arrow.up.arrow.down" accessibilityDescription:nil];
item.target = self;
item.action = @selector(setPrefView:);
item.autovalidates = NO;
@@ -318,7 +318,7 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
else if ([ident isEqualToString:ToolbarTabGroups])
{
item.label = NSLocalizedString(@"Groups", "Preferences -> toolbar item title");
item.image = [NSImage systemSymbol:@"pin" withFallback:@"Groups"];
item.image = [NSImage imageWithSystemSymbolName:@"pin" accessibilityDescription:nil];
item.target = self;
item.action = @selector(setPrefView:);
item.autovalidates = NO;
@@ -326,7 +326,7 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
else if ([ident isEqualToString:ToolbarTabBandwidth])
{
item.label = NSLocalizedString(@"Bandwidth", "Preferences -> toolbar item title");
item.image = [NSImage systemSymbol:@"speedometer" withFallback:@"Bandwidth"];
item.image = [NSImage imageWithSystemSymbolName:@"speedometer" accessibilityDescription:nil];
item.target = self;
item.action = @selector(setPrefView:);
item.autovalidates = NO;
@@ -334,7 +334,7 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
else if ([ident isEqualToString:ToolbarTabPeers])
{
item.label = NSLocalizedString(@"Peers", "Preferences -> toolbar item title");
item.image = [NSImage systemSymbol:@"person.2" withFallback:NSImageNameUserGroup];
item.image = [NSImage imageWithSystemSymbolName:@"person.2" accessibilityDescription:nil];
item.target = self;
item.action = @selector(setPrefView:);
item.autovalidates = NO;
@@ -342,7 +342,7 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
else if ([ident isEqualToString:ToolbarTabNetwork])
{
item.label = NSLocalizedString(@"Network", "Preferences -> toolbar item title");
item.image = [NSImage systemSymbol:@"network" withFallback:NSImageNameNetwork];
item.image = [NSImage imageWithSystemSymbolName:@"network" accessibilityDescription:nil];
item.target = self;
item.action = @selector(setPrefView:);
item.autovalidates = NO;
@@ -350,7 +350,7 @@ static NSString* const kWebUIURLFormat = @"http://localhost:%ld/";
else if ([ident isEqualToString:ToolbarTabRemote])
{
item.label = NSLocalizedString(@"Remote", "Preferences -> toolbar item title");
item.image = [NSImage systemSymbol:@"antenna.radiowaves.left.and.right" withFallback:@"Remote"];
item.image = [NSImage imageWithSystemSymbolName:@"antenna.radiowaves.left.and.right" accessibilityDescription:nil];
item.target = self;
item.action = @selector(setPrefView:);
item.autovalidates = NO;

View File

@@ -12,10 +12,7 @@
{
[super awakeFromNib];
if (@available(macOS 11.0, *))
{
self.toolbarStyle = NSWindowToolbarStylePreference;
}
self.toolbarStyle = NSWindowToolbarStylePreference;
}
- (void)keyDown:(NSEvent*)event

View File

@@ -82,10 +82,7 @@ static NSTimeInterval const kToggleProgressSeconds = 0.175;
_piecesBarPercent = [_fDefaults boolForKey:@"PiecesBar"] ? 1.0 : 0.0;
if (@available(macOS 11.0, *))
{
self.style = NSTableViewStyleFullWidth;
}
self.style = NSTableViewStyleFullWidth;
}
return self;

View File

@@ -183,18 +183,13 @@ static NSMutableSet* fTrackerIconLoading;
return icon;
}
if (@available(macOS 11.0, *))
{
NSImage* result = [NSImage imageWithSystemSymbolName:@"globe" accessibilityDescription:nil];
[result lockFocus];
[NSColor.textColor set];
NSRect imageRect = { NSZeroPoint, result.size };
NSRectFillUsingOperation(imageRect, NSCompositingOperationSourceIn);
[result unlockFocus];
return result;
}
return [NSImage imageNamed:@"FavIcon"];
NSImage* result = [NSImage imageWithSystemSymbolName:@"globe" accessibilityDescription:nil];
[result lockFocus];
[NSColor.textColor set];
NSRect imageRect = { NSZeroPoint, result.size };
NSRectFillUsingOperation(imageRect, NSCompositingOperationSourceIn);
[result unlockFocus];
return result;
}
- (void)loadTrackerIcon:(NSString*)baseAddress