Skip to content

Commit dd3d026

Browse files
authored
Add Advanced Preferences panel (MonitorControl#97)
- Removed whitelist which caused some issues for some people MonitorControl#105 - Added `hide OSD` option to `AdvancedPrefsViewController` - Added `Longer Delay` option to `AdvancedPrefsViewController` - Added `PollingMode` and `PollingCount` to `AdvancedPrefsViewController` (should help MonitorControl#37) - Added option to reset all preferences to `AdvancedPrefsViewController` See the wiki for more info: https://github.com/the0neyouseek/MonitorControl/wiki/Advanced-Preferences
1 parent 98d9952 commit dd3d026

23 files changed

Lines changed: 888 additions & 102 deletions

.swiftlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ excluded:
77
- Carthage
88
type_body_length: 500
99
file_length: 500
10+
cyclomatic_complexity:
11+
ignores_case_statements: true

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github "reitermarkus/DDC.swift" "5c03666e17a1a850892c08a5db6f4a208f762f26"
2-
github "rnine/AMCoreAudio" "3.3"
1+
github "reitermarkus/DDC.swift" "f8e7dc7f2fea41ec4e27672fdbc7051be218ad02"
2+
github "rnine/AMCoreAudio" "3.3.1"
33
github "shpakovski/MASPreferences" "1.3"
44
github "the0neyouseek/MediaKeyTap" "3.1.0"

MonitorControl.xcodeproj/project.pbxproj

Lines changed: 69 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@
2626
28D1DE15227FD006004CB494 /* DDC.framework.dSYM in [Carthage] Copy Framework Debug Symbols */ = {isa = PBXBuildFile; fileRef = 28D1DE11227FD006004CB494 /* DDC.framework.dSYM */; };
2727
56754EAF1D9A4016007BCDC5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56754EAE1D9A4016007BCDC5 /* AppDelegate.swift */; };
2828
56754EB11D9A4016007BCDC5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 56754EB01D9A4016007BCDC5 /* Assets.xcassets */; };
29-
8C0E20562296ABBA000CBF15 /* NSNotification+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C0E20552296ABBA000CBF15 /* NSNotification+Extension.swift */; };
30-
F01B067922822141008E64DB /* Display+Whitelist.swift in Sources */ = {isa = PBXBuildFile; fileRef = F01B067822822141008E64DB /* Display+Whitelist.swift */; };
29+
6C0CCB26228F4F720037D2C5 /* AdvancedPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C0CCB25228F4F720037D2C5 /* AdvancedPrefsViewController.swift */; };
30+
6C20466C23153E4F00859767 /* Display+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C20466B23153E4F00859767 /* Display+Extension.swift */; };
31+
6C2EA1CD228F644B00060E3F /* OnlyIntegerValueFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C2EA1CC228F644B00060E3F /* OnlyIntegerValueFormatter.swift */; };
32+
6C2EA1CF228F7DFB00060E3F /* PollingMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C2EA1CE228F7DFB00060E3F /* PollingMode.swift */; };
33+
6C85EFDA22C941B000227EA1 /* DisplayManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C85EFD922C941B000227EA1 /* DisplayManager.swift */; };
34+
6C85EFDD22CBAA8F00227EA1 /* PollingModeCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C85EFDC22CBAA8F00227EA1 /* PollingModeCellView.swift */; };
35+
6C85EFDF22CBB54100227EA1 /* PollingCountCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C85EFDE22CBB54100227EA1 /* PollingCountCellView.swift */; };
36+
6C85EFE122CC00AD00227EA1 /* NSNotification+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C85EFE022CC00AD00227EA1 /* NSNotification+Extension.swift */; };
37+
6CCB278622D5315200619B05 /* HideOsdCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCB278522D5315200619B05 /* HideOsdCellView.swift */; };
38+
6CD444C322D4FBB8005BFD3D /* LongerDelayCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CD444C222D4FBB8005BFD3D /* LongerDelayCellView.swift */; };
3139
F01B0699228221B7008E64DB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F01B0680228221B6008E64DB /* Localizable.strings */; };
3240
F01B069A228221B7008E64DB /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = F01B0683228221B6008E64DB /* Utils.swift */; };
3341
F01B069E228221B7008E64DB /* ButtonCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F01B068E228221B6008E64DB /* ButtonCellView.swift */; };
@@ -106,8 +114,16 @@
106114
56754EAB1D9A4016007BCDC5 /* MonitorControl.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MonitorControl.app; sourceTree = BUILT_PRODUCTS_DIR; };
107115
56754EAE1D9A4016007BCDC5 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppDelegate.swift; sourceTree = "<group>"; };
108116
56754EB01D9A4016007BCDC5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
109-
8C0E20552296ABBA000CBF15 /* NSNotification+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSNotification+Extension.swift"; sourceTree = "<group>"; };
110-
F01B067822822141008E64DB /* Display+Whitelist.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Display+Whitelist.swift"; sourceTree = "<group>"; };
117+
6C0CCB25228F4F720037D2C5 /* AdvancedPrefsViewController.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = AdvancedPrefsViewController.swift; sourceTree = "<group>"; tabWidth = 4; };
118+
6C20466B23153E4F00859767 /* Display+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Display+Extension.swift"; sourceTree = "<group>"; };
119+
6C2EA1CC228F644B00060E3F /* OnlyIntegerValueFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnlyIntegerValueFormatter.swift; sourceTree = "<group>"; };
120+
6C2EA1CE228F7DFB00060E3F /* PollingMode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollingMode.swift; sourceTree = "<group>"; };
121+
6C85EFD922C941B000227EA1 /* DisplayManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DisplayManager.swift; sourceTree = "<group>"; };
122+
6C85EFDC22CBAA8F00227EA1 /* PollingModeCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollingModeCellView.swift; sourceTree = "<group>"; };
123+
6C85EFDE22CBB54100227EA1 /* PollingCountCellView.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = PollingCountCellView.swift; sourceTree = "<group>"; tabWidth = 4; };
124+
6C85EFE022CC00AD00227EA1 /* NSNotification+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSNotification+Extension.swift"; sourceTree = "<group>"; };
125+
6CCB278522D5315200619B05 /* HideOsdCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HideOsdCellView.swift; sourceTree = "<group>"; };
126+
6CD444C222D4FBB8005BFD3D /* LongerDelayCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LongerDelayCellView.swift; sourceTree = "<group>"; };
111127
F01B0681228221B6008E64DB /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
112128
F01B0682228221B6008E64DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
113129
F01B0683228221B6008E64DB /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
@@ -179,10 +195,10 @@
179195
isa = PBXGroup;
180196
children = (
181197
2894D9B72280B30500DF58DA /* CGDirectDisplayID+Extension.swift */,
182-
F01B067822822141008E64DB /* Display+Whitelist.swift */,
183198
28D1DDEC227FB8F2004CB494 /* EDID+Extension.swift */,
184199
28D1DDF1227FBE71004CB494 /* NSScreen+Extension.swift */,
185-
8C0E20552296ABBA000CBF15 /* NSNotification+Extension.swift */,
200+
6C85EFE022CC00AD00227EA1 /* NSNotification+Extension.swift */,
201+
6C20466B23153E4F00859767 /* Display+Extension.swift */,
186202
);
187203
path = Extensions;
188204
sourceTree = "<group>";
@@ -210,6 +226,8 @@
210226
56754EAD1D9A4016007BCDC5 /* MonitorControl */ = {
211227
isa = PBXGroup;
212228
children = (
229+
F01B0686228221B6008E64DB /* Info.plist */,
230+
6C85EFD622C74B0E00227EA1 /* Manager */,
213231
56754EAE1D9A4016007BCDC5 /* AppDelegate.swift */,
214232
56754EB01D9A4016007BCDC5 /* Assets.xcassets */,
215233
F03A8DF11FFBAA6F0034DC27 /* Display.swift */,
@@ -221,22 +239,43 @@
221239
path = MonitorControl;
222240
sourceTree = "<group>";
223241
};
242+
6C85EFD622C74B0E00227EA1 /* Manager */ = {
243+
isa = PBXGroup;
244+
children = (
245+
6C85EFD922C941B000227EA1 /* DisplayManager.swift */,
246+
);
247+
path = Manager;
248+
sourceTree = "<group>";
249+
};
250+
6C85EFDB22CBA77600227EA1 /* Cells */ = {
251+
isa = PBXGroup;
252+
children = (
253+
F03FE4BF228DF62A001F59A4 /* FriendlyNameCellView.swift */,
254+
F01B068E228221B6008E64DB /* ButtonCellView.swift */,
255+
6C85EFDC22CBAA8F00227EA1 /* PollingModeCellView.swift */,
256+
6C85EFDE22CBB54100227EA1 /* PollingCountCellView.swift */,
257+
6CD444C222D4FBB8005BFD3D /* LongerDelayCellView.swift */,
258+
6CCB278522D5315200619B05 /* HideOsdCellView.swift */,
259+
);
260+
path = Cells;
261+
sourceTree = "<group>";
262+
};
224263
F01B067F228221B6008E64DB /* Support */ = {
225264
isa = PBXGroup;
226265
children = (
227266
F01B0685228221B6008E64DB /* Bridging-Header.h */,
228-
F01B0686228221B6008E64DB /* Info.plist */,
229267
F01B0680228221B6008E64DB /* Localizable.strings */,
230268
F01B0683228221B6008E64DB /* Utils.swift */,
269+
6C2EA1CC228F644B00060E3F /* OnlyIntegerValueFormatter.swift */,
270+
6C2EA1CE228F7DFB00060E3F /* PollingMode.swift */,
231271
);
232272
path = Support;
233273
sourceTree = "<group>";
234274
};
235275
F01B0687228221B6008E64DB /* UI */ = {
236276
isa = PBXGroup;
237277
children = (
238-
F03FE4BF228DF62A001F59A4 /* FriendlyNameCellView.swift */,
239-
F01B068E228221B6008E64DB /* ButtonCellView.swift */,
278+
6C85EFDB22CBA77600227EA1 /* Cells */,
240279
F01B0690228221B7008E64DB /* Main.storyboard */,
241280
F01B0692228221B7008E64DB /* MainMenu.xib */,
242281
F01B068F228221B7008E64DB /* SliderHandler.swift */,
@@ -250,6 +289,7 @@
250289
F0445D3F200259C10025AE82 /* DisplayPrefsViewController.swift */,
251290
F0445D3B200254FA0025AE82 /* KeysPrefsViewController.swift */,
252291
F0445D3720023E710025AE82 /* MainPrefsViewController.swift */,
292+
6C0CCB25228F4F720037D2C5 /* AdvancedPrefsViewController.swift */,
253293
);
254294
path = "View Controllers";
255295
sourceTree = "<group>";
@@ -320,13 +360,13 @@
320360
TargetAttributes = {
321361
56754EAA1D9A4016007BCDC5 = {
322362
CreatedOnToolsVersion = 8.0;
323-
DevelopmentTeam = KGY56RWR9A;
363+
DevelopmentTeam = CYC8C8R4K9;
324364
LastSwiftMigration = 1020;
325365
ProvisioningStyle = Automatic;
326366
};
327367
F06792E6200A73460066C438 = {
328368
CreatedOnToolsVersion = 9.2;
329-
DevelopmentTeam = KGY56RWR9A;
369+
DevelopmentTeam = CYC8C8R4K9;
330370
LastSwiftMigration = 1020;
331371
ProvisioningStyle = Automatic;
332372
};
@@ -454,18 +494,26 @@
454494
buildActionMask = 2147483647;
455495
files = (
456496
56754EAF1D9A4016007BCDC5 /* AppDelegate.swift in Sources */,
497+
6C85EFE122CC00AD00227EA1 /* NSNotification+Extension.swift in Sources */,
498+
6C85EFDF22CBB54100227EA1 /* PollingCountCellView.swift in Sources */,
499+
6C0CCB26228F4F720037D2C5 /* AdvancedPrefsViewController.swift in Sources */,
457500
F01B069E228221B7008E64DB /* ButtonCellView.swift in Sources */,
501+
6C2EA1CD228F644B00060E3F /* OnlyIntegerValueFormatter.swift in Sources */,
458502
2894D9B82280B30500DF58DA /* CGDirectDisplayID+Extension.swift in Sources */,
503+
6CCB278622D5315200619B05 /* HideOsdCellView.swift in Sources */,
504+
6CD444C322D4FBB8005BFD3D /* LongerDelayCellView.swift in Sources */,
459505
F03FE4C0228DF62B001F59A4 /* FriendlyNameCellView.swift in Sources */,
460-
F01B067922822141008E64DB /* Display+Whitelist.swift in Sources */,
506+
6C2EA1CF228F7DFB00060E3F /* PollingMode.swift in Sources */,
461507
F03A8DF21FFBAA6F0034DC27 /* Display.swift in Sources */,
462508
F0445D40200259C10025AE82 /* DisplayPrefsViewController.swift in Sources */,
463-
8C0E20562296ABBA000CBF15 /* NSNotification+Extension.swift in Sources */,
464509
28D1DDF0227FBD99004CB494 /* EDID+Extension.swift in Sources */,
510+
6C85EFDD22CBAA8F00227EA1 /* PollingModeCellView.swift in Sources */,
465511
F0445D3D200254FA0025AE82 /* KeysPrefsViewController.swift in Sources */,
512+
6C20466C23153E4F00859767 /* Display+Extension.swift in Sources */,
466513
F0445D3820023E710025AE82 /* MainPrefsViewController.swift in Sources */,
467514
28D1DDF2227FBE71004CB494 /* NSScreen+Extension.swift in Sources */,
468515
F01B069F228221B7008E64DB /* SliderHandler.swift in Sources */,
516+
6C85EFDA22C941B000227EA1 /* DisplayManager.swift in Sources */,
469517
F01B069A228221B7008E64DB /* Utils.swift in Sources */,
470518
);
471519
runOnlyForDeploymentPostprocessing = 0;
@@ -641,8 +689,8 @@
641689
CODE_SIGN_IDENTITY = "Mac Developer";
642690
CODE_SIGN_STYLE = Automatic;
643691
COMBINE_HIDPI_IMAGES = YES;
644-
CURRENT_PROJECT_VERSION = 560;
645-
DEVELOPMENT_TEAM = KGY56RWR9A;
692+
CURRENT_PROJECT_VERSION = 570;
693+
DEVELOPMENT_TEAM = CYC8C8R4K9;
646694
ENABLE_HARDENED_RUNTIME = YES;
647695
FRAMEWORK_SEARCH_PATHS = (
648696
"$(inherited)",
@@ -668,8 +716,8 @@
668716
CODE_SIGN_IDENTITY = "Mac Developer";
669717
CODE_SIGN_STYLE = Automatic;
670718
COMBINE_HIDPI_IMAGES = YES;
671-
CURRENT_PROJECT_VERSION = 560;
672-
DEVELOPMENT_TEAM = KGY56RWR9A;
719+
CURRENT_PROJECT_VERSION = 570;
720+
DEVELOPMENT_TEAM = CYC8C8R4K9;
673721
ENABLE_HARDENED_RUNTIME = YES;
674722
FRAMEWORK_SEARCH_PATHS = (
675723
"$(inherited)",
@@ -699,8 +747,8 @@
699747
CODE_SIGN_IDENTITY = "Mac Developer";
700748
CODE_SIGN_STYLE = Automatic;
701749
COMBINE_HIDPI_IMAGES = YES;
702-
CURRENT_PROJECT_VERSION = 560;
703-
DEVELOPMENT_TEAM = KGY56RWR9A;
750+
CURRENT_PROJECT_VERSION = 570;
751+
DEVELOPMENT_TEAM = CYC8C8R4K9;
704752
ENABLE_HARDENED_RUNTIME = YES;
705753
GCC_C_LANGUAGE_STANDARD = gnu11;
706754
INFOPLIST_FILE = MonitorControlHelper/Info.plist;
@@ -724,8 +772,8 @@
724772
CODE_SIGN_IDENTITY = "Mac Developer";
725773
CODE_SIGN_STYLE = Automatic;
726774
COMBINE_HIDPI_IMAGES = YES;
727-
CURRENT_PROJECT_VERSION = 560;
728-
DEVELOPMENT_TEAM = KGY56RWR9A;
775+
CURRENT_PROJECT_VERSION = 570;
776+
DEVELOPMENT_TEAM = CYC8C8R4K9;
729777
ENABLE_HARDENED_RUNTIME = YES;
730778
GCC_C_LANGUAGE_STANDARD = gnu11;
731779
INFOPLIST_FILE = MonitorControlHelper/Info.plist;

0 commit comments

Comments
 (0)