Skip to content

Commit 36825f9

Browse files
committed
Add 2019 MacPro in HardwareDetection
Bring back 10sec mode for location info Sparkle 1.22
1 parent 8f331a9 commit 36825f9

12 files changed

+94
-48
lines changed

Aerial.xcodeproj/project.pbxproj

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
038C584823A9308C00224630 /* InfoContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038C584623A9304800224630 /* InfoContainerView.swift */; };
8888
038C584A23A9394000224630 /* InfoCommonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038C584923A9394000224630 /* InfoCommonView.swift */; };
8989
038C584B23A9394000224630 /* InfoCommonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038C584923A9394000224630 /* InfoCommonView.swift */; };
90+
038D2EBD23AB91C300CD91F7 /* InfoLocationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A596D823AB8F000097EA66 /* InfoLocationView.swift */; };
9091
038EBE9422D0AA3D00C7AD02 /* nl.json in Resources */ = {isa = PBXBuildFile; fileRef = 038EBE9322D0AA3D00C7AD02 /* nl.json */; };
9192
038EBE9522D0AA3D00C7AD02 /* nl.json in Resources */ = {isa = PBXBuildFile; fileRef = 038EBE9322D0AA3D00C7AD02 /* nl.json */; };
9293
0393857A2175D4B80040B850 /* AVPlayerViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 039385792175D4B80040B850 /* AVPlayerViewExtension.swift */; };
@@ -103,6 +104,7 @@
103104
03A596D523AA752F0097EA66 /* InfoClockView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A596D423AA752F0097EA66 /* InfoClockView.swift */; };
104105
03A596D623AA752F0097EA66 /* InfoClockView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A596D423AA752F0097EA66 /* InfoClockView.swift */; };
105106
03A596D723AA75490097EA66 /* InfoMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A596D223AA750F0097EA66 /* InfoMessageView.swift */; };
107+
03A596D923AB8F000097EA66 /* InfoLocationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A596D823AB8F000097EA66 /* InfoLocationView.swift */; };
106108
03AD45FF22981B0C00261325 /* CustomVideoFolders+helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AD45FE22981B0C00261325 /* CustomVideoFolders+helpers.swift */; };
107109
03AD460022981B1C00261325 /* CustomVideoFolders+helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AD45FE22981B0C00261325 /* CustomVideoFolders+helpers.swift */; };
108110
03BF51BA23A24B40008AD373 /* AnimationLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0306336D23A15FA900046A59 /* AnimationLayer.swift */; };
@@ -246,6 +248,7 @@
246248
03A2CB9B216BA9AF0061E8E8 /* VideoManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoManager.swift; sourceTree = "<group>"; };
247249
03A596D223AA750F0097EA66 /* InfoMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoMessageView.swift; sourceTree = "<group>"; };
248250
03A596D423AA752F0097EA66 /* InfoClockView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoClockView.swift; sourceTree = "<group>"; };
251+
03A596D823AB8F000097EA66 /* InfoLocationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoLocationView.swift; sourceTree = "<group>"; };
249252
03AD45FE22981B0C00261325 /* CustomVideoFolders+helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CustomVideoFolders+helpers.swift"; sourceTree = "<group>"; };
250253
03BF51BB23A2643C008AD373 /* LayerManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayerManager.swift; sourceTree = "<group>"; };
251254
03BF51BE23A274CA008AD373 /* MessageLayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageLayer.swift; sourceTree = "<group>"; };
@@ -382,6 +385,7 @@
382385
034F29B623A7A93D004B34D5 /* InfoTableSource.swift */,
383386
038C584623A9304800224630 /* InfoContainerView.swift */,
384387
038C584923A9394000224630 /* InfoCommonView.swift */,
388+
03A596D823AB8F000097EA66 /* InfoLocationView.swift */,
385389
03A596D223AA750F0097EA66 /* InfoMessageView.swift */,
386390
03A596D423AA752F0097EA66 /* InfoClockView.swift */,
387391
);
@@ -1028,6 +1032,7 @@
10281032
FAF450221BE2B45D00C1F98A /* VideoLoader.swift in Sources */,
10291033
0313F9EA2294338300B074BB /* CustomVideoController.swift in Sources */,
10301034
FAC36F5A1BE1756D007F2A20 /* AerialVideo.swift in Sources */,
1035+
038D2EBD23AB91C300CD91F7 /* InfoLocationView.swift in Sources */,
10311036
034F29B823A7A9B3004B34D5 /* InfoTableSource.swift in Sources */,
10321037
0313F9ED2294468600B074BB /* SeededGenerator.swift in Sources */,
10331038
0393857B2175D4B80040B850 /* AVPlayerViewExtension.swift in Sources */,
@@ -1097,6 +1102,7 @@
10971102
FAF450211BE2B45D00C1F98A /* VideoLoader.swift in Sources */,
10981103
03E8731321675FE0002B469B /* TimeManagement.swift in Sources */,
10991104
03D1E78722842FB300D10CF7 /* DisplayView.swift in Sources */,
1105+
03A596D923AB8F000097EA66 /* InfoLocationView.swift in Sources */,
11001106
FAB22A7E1BE17D7D0065C0F5 /* AssetLoaderDelegate.swift in Sources */,
11011107
0306336823A1012200046A59 /* LocationLayer.swift in Sources */,
11021108
03608A2922A56094008F08A2 /* PWC+LogPanel.swift in Sources */,

Aerial/Source/Controllers/PWC Tabs/PWC+Info.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ extension PreferencesWindowController {
3030

3131
// Then the per-type blocks if any
3232
switch forType {
33+
case .location:
34+
infoContainerView.addSubview(infoLocationView)
35+
infoLocationView.frame.origin.y = infoCommonView.frame.height
36+
infoLocationView.setStates()
3337
case .message:
3438
infoContainerView.addSubview(infoMessageView)
3539
infoMessageView.frame.origin.y = infoCommonView.frame.height
@@ -38,8 +42,6 @@ extension PreferencesWindowController {
3842
infoContainerView.addSubview(infoClockView)
3943
infoClockView.frame.origin.y = infoCommonView.frame.height
4044
infoClockView.setStates()
41-
default:
42-
()
4345
}
4446
}
4547

Aerial/Source/Controllers/PreferencesWindowController.swift

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ final class PreferencesWindowController: NSWindowController, NSOutlineViewDataSo
8787

8888
@IBOutlet var infoCommonView: InfoCommonView!
8989

90+
@IBOutlet var infoLocationView: InfoLocationView!
9091
@IBOutlet var infoClockView: InfoClockView!
9192
@IBOutlet var infoMessageView: InfoMessageView!
9293

Aerial/Source/Models/Hardware/DisplayDetection.swift

+1-15
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ final class DisplayDetection: NSObject {
9090
debugLog("1cm = \(cmInPoints) points")
9191
mainID = currentDisplay
9292
}
93-
94-
// swiftlint:disable:next line_length
95-
//debugLog("pass1: id \(currentDisplay), width: \(CGDisplayPixelsWide(currentDisplay)), height: \(CGDisplayPixelsHigh(currentDisplay)),isMain isMain \(isMain)")
9693
}
9794

9895
// Second pass on NSScreen to grab the retina factor
@@ -328,18 +325,6 @@ final class DisplayDetection: NSObject {
328325
}
329326

330327
// MARK: - Public utility fuctions
331-
/*
332-
func isScreenPrimary(id: CGDirectDisplayID) -> Bool {
333-
let screen = findScreenWith(id: id)
334-
335-
if let scr = screen {
336-
if scr.isMain {
337-
return true
338-
}
339-
}
340-
341-
return false
342-
}*/
343328

344329
func isScreenActive(id: CGDirectDisplayID) -> Bool {
345330
let preferences = Preferences.sharedInstance
@@ -445,6 +430,7 @@ final class DisplayDetection: NSObject {
445430

446431
return nil
447432
}
433+
448434
var advancedMargins: AdvancedMargin {
449435
get {
450436
let preferences = Preferences.sharedInstance

Aerial/Source/Models/Hardware/HardwareDetection.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ final class HardwareDetection: NSObject {
6666
// MacMini 8+
6767
return getHEVCMain10Support(macModel: macModel, macSubmodel: "Macmini", partial: 8.0, full: 8.0)
6868
} else if macModel.starts(with: "MacPro") {
69-
// Right now no support on these
70-
return .notsupported
69+
// Tentative, I *think* 7+ (2019 MacPro) should always support independant of GPU ?
70+
return getHEVCMain10Support(macModel: macModel, macSubmodel: "MacPro", partial: 7.0, full: 7.0)
7171
}
7272
// Older stuff (power/etc) should not even run this so list should be complete
7373
// Hackintosh/new SKUs will fail this test, this is indicative in any case so that's fine

Aerial/Source/Models/Prefs/PrefsInfo.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ enum InfoType: String, Codable {
2121
case location, message, clock
2222
}
2323

24+
enum InfoTime: Int, Codable {
25+
case always, tenSeconds
26+
}
27+
2428
struct PrefsInfo {
2529

2630
struct Location: Codable {
@@ -29,6 +33,7 @@ struct PrefsInfo {
2933
var fontSize: Double
3034
var corner: InfoCorner
3135
var displays: InfoDisplays
36+
var time: InfoTime
3237
}
3338

3439
struct Message: Codable {
@@ -57,7 +62,8 @@ struct PrefsInfo {
5762
fontName: "Helvetica Neue Medium",
5863
fontSize: 28,
5964
corner: .random,
60-
displays: .allDisplays))
65+
displays: .allDisplays,
66+
time: .tenSeconds))
6167
static var location: Location
6268

6369
// Custom string message

Aerial/Source/Views/Layers/LocationLayer.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class LocationLayer: AnimationLayer {
139139
let preferences = Preferences.sharedInstance
140140

141141
// We may only show for 10s
142-
if preferences.showDescriptionsMode == Preferences.DescriptionMode.fade10seconds.rawValue {
142+
if PrefsInfo.location.time == .tenSeconds {
143143
return 10
144144
} else {
145145
if let idx = times.firstIndex(of: current) {

Aerial/Source/Views/PrefPanel/InfoClockView.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class InfoClockView: NSView {
1919
@IBAction func secondsClick(_ sender: NSButton) {
2020
let onState = sender.state == .on
2121
PrefsInfo.clock.showSeconds = onState
22-
2322
}
23+
2424
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// InfoLocationView.swift
3+
// Aerial
4+
//
5+
// Created by Guillaume Louel on 19/12/2019.
6+
// Copyright © 2019 Guillaume Louel. All rights reserved.
7+
//
8+
9+
import Cocoa
10+
11+
class InfoLocationView: NSView {
12+
13+
@IBOutlet var showTimePopup: NSPopUpButton!
14+
15+
// Init(ish)
16+
func setStates() {
17+
showTimePopup.selectItem(at: PrefsInfo.location.time.rawValue)
18+
}
19+
20+
@IBAction func showTimeChange(_ sender: NSPopUpButton) {
21+
PrefsInfo.location.time = InfoTime(rawValue: sender.indexOfSelectedItem)!
22+
}
23+
24+
}

Aerial/Source/Views/PrefPanel/InfoMessageView.swift

+1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ class InfoMessageView: NSView {
2323
@IBAction func messageExtraClick(_ sender: Any) {
2424
// TODO
2525
}
26+
2627
}

Podfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- Sparkle (1.21.3)
2+
- Sparkle (1.22.0)
33

44
DEPENDENCIES:
55
- Sparkle
66

77
SPEC REPOS:
8-
https://github.com/CocoaPods/Specs.git:
8+
https://github.com/cocoapods/specs.git:
99
- Sparkle
1010

1111
SPEC CHECKSUMS:
12-
Sparkle: 3f75576db8b0265adef36c43249d747f22d0b708
12+
Sparkle: 593ac2e677c07bcb6c3b22d621240e7cbedaab57
1313

1414
PODFILE CHECKSUM: cef6129b8fe1532c7846b332f1dc0ce6d29a71bb
1515

16-
COCOAPODS: 1.8.4
16+
COCOAPODS: 1.7.1

0 commit comments

Comments
 (0)