feat: consolidate settings (closes #1732)
This commit is contained in:
1 parent
5f87336f3f
commit
219098d6a3
19 files changed
+134
-151
No files matched your search
@@ -209,7 +209,6 @@
|
||||
D04BA004884A273D4D2D3EF1 /* HelperExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BAD91161791D42FEC4A60 /* HelperExtensions.swift */; };
|
||||
D04BA0182F4734A5C8BB63DC /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA5461DAEE9B5350C3020 /* Localizable.strings */; };
|
||||
D04BA03B560B681AF96E4610 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA88ED495C54CFE0B7B87 /* InfoPlist.strings */; };
|
||||
D04BA0482478C20934FD5D27 /* acknowledgments@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA4A0A748AAA68299BA4A /* acknowledgments@2x.png */; };
|
||||
D04BA084CD1236EC78D90A01 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BACCBE5F97BE9B6CA645B /* Localizable.strings */; };
|
||||
D04BA0AE9865276FF8EF5DEB /* UserDefaultsEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA5D9B4EBEB9E4333AE39 /* UserDefaultsEvents.swift */; };
|
||||
D04BA0DD6819010987B578D1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA07BBF2237CC6C72D264 /* Localizable.strings */; };
|
||||
@@ -256,12 +255,10 @@
|
||||
D04BA7B9421871EDBD58F4E3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BABA255CD25D8724A06CD /* Localizable.strings */; };
|
||||
D04BA7BE7F3DD24D58ACE942 /* AppearanceTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA64F1F344007EA13BA05 /* AppearanceTab.swift */; };
|
||||
D04BA7E39FA539DD8316447A /* PermissionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA0726EABD146753B9EF8 /* PermissionView.swift */; };
|
||||
D04BA8092885B40CE3527370 /* PoliciesTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BAD60C97E609A759E721E /* PoliciesTab.swift */; };
|
||||
D04BA83AF2B1C3C5166C119F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BAD58DF3FA085A45BEB50 /* InfoPlist.strings */; };
|
||||
D04BA8480A8FF466CA89DA5B /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA70746DEEC3D30B43F81 /* main.swift */; };
|
||||
D04BA867733CC32975EEDA7B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA64436BF69C58372968C /* InfoPlist.strings */; };
|
||||
D04BA8757C9F20F25EB50785 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA5BD11C365C19461458C /* TextField.swift */; };
|
||||
D04BA892CB4324F514EDF172 /* policies@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA9357769516A81C50EE7 /* policies@2x.png */; };
|
||||
D04BA8C8016BD6E2FDE80430 /* controls@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA3FF376BC2757D25A2AD /* controls@2x.png */; };
|
||||
D04BA8D6055F6F2E42C976EA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA5DE6536C4A6558FD80C /* InfoPlist.strings */; };
|
||||
D04BA9557A6C9E192D228150 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA2C08725A5F2C34EB809 /* InfoPlist.strings */; };
|
||||
@@ -271,7 +268,7 @@
|
||||
D04BAAAF5CFA991D3B078DB8 /* KeyboardEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA4A621A8A15660F973C1 /* KeyboardEvents.swift */; };
|
||||
D04BAAB5C4E78AE375EA7D3C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BAA56B4EEAF17F767C7FD /* Localizable.strings */; };
|
||||
D04BAABE804F3769CE22BEB6 /* HyperlinkLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA49E45BFFF3D9FC60E43 /* HyperlinkLabel.swift */; };
|
||||
D04BAAD77232701929AC3D74 /* blacklists@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BAAA1835480F9B3CCF170 /* blacklists@2x.png */; };
|
||||
D04BAAD77232701929AC3D74 /* exceptions@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BAAA1835480F9B3CCF170 /* exceptions@2x.png */; };
|
||||
D04BAAF7ACC3B361FBBF52AA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BAED4D420C506DAF539F1 /* Localizable.strings */; };
|
||||
D04BAB048DE698E013577C51 /* TilesPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA653BD073CB58E2CFC93 /* TilesPanel.swift */; };
|
||||
D04BAB4EB890853B5B9B2C61 /* BoldLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BACEE8D430B8CAAD8C4CD /* BoldLabel.swift */; };
|
||||
@@ -289,7 +286,6 @@
|
||||
D04BACA938C98E0A83C9ED6F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA02BBED13DEB284CC634 /* InfoPlist.strings */; };
|
||||
D04BAD1BE9DC22C48C53D195 /* AboutTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA4A26987F67DD94C827F /* AboutTab.swift */; };
|
||||
D04BAD2A7F2E8BF64EE982E9 /* TextArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA7C836A8CE8C0B8D128B /* TextArea.swift */; };
|
||||
D04BAD395C7146A49734E0A5 /* about@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D04BA4FC0DEB8B44FF460F90 /* about@2x.png */; };
|
||||
D04BAD451966B43720120D2E /* Menubar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BAD905546AA93E5117B0A /* Menubar.swift */; };
|
||||
D04BADA3F2DAB820D6FC6E75 /* AppCenterApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = D04BA48BC82D3060C3A1AB11 /* AppCenterApplication.m */; };
|
||||
D04BADCDA9F9A6C3D6499877 /* SystemPermissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA7C6F2519091717F4B4E /* SystemPermissions.swift */; };
|
||||
@@ -303,7 +299,7 @@
|
||||
D04BAFBC862BA5FE0294EA7A /* AXUIElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA6F823BC0EDA9AA4B80A /* AXUIElement.swift */; };
|
||||
D04BAFC1A1B2C3D4E5F60002 /* TileOverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BAFC0A1B2C3D4E5F60001 /* TileOverView.swift */; };
|
||||
D04BAFC3A1B2C3D4E5F60004 /* TileUnderLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BAFC2A1B2C3D4E5F60003 /* TileUnderLayer.swift */; };
|
||||
D04BAFF30A98CF287F85DA1E /* BlacklistsTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA27695D9A5824720BD7B /* BlacklistsTab.swift */; };
|
||||
D04BAFF30A98CF287F85DA1E /* ExceptionsTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA27695D9A5824720BD7B /* ExceptionsTab.swift */; };
|
||||
F00DCAFE0000000000001002 /* Search.swift in Sources */ = {isa = PBXBuildFile; fileRef = F00DCAFE0000000000000002 /* Search.swift */; };
|
||||
F00DCAFE0000000000001003 /* SearchTestable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F00DCAFE0000000000000003 /* SearchTestable.swift */; };
|
||||
F00DCAFE0000000000001103 /* SearchTestable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F00DCAFE0000000000000003 /* SearchTestable.swift */; };
|
||||
@@ -603,7 +599,7 @@
|
||||
D04BA2526DC6726E0F7ACF7C /* LabelAndControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LabelAndControl.swift; sourceTree = "<group>"; };
|
||||
D04BA258B56193958D60978A /* TileView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TileView.swift; sourceTree = "<group>"; };
|
||||
D04BA26C75F76C277653C932 /* FeedbackWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackWindow.swift; sourceTree = "<group>"; };
|
||||
D04BA27695D9A5824720BD7B /* BlacklistsTab.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BlacklistsTab.swift; sourceTree = "<group>"; };
|
||||
D04BA27695D9A5824720BD7B /* ExceptionsTab.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExceptionsTab.swift; sourceTree = "<group>"; };
|
||||
D04BA282BB16C1554595A968 /* Applications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Applications.swift; sourceTree = "<group>"; };
|
||||
D04BA2A68FFD585C3A64434A /* zh-CN */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "zh-CN"; path = InfoPlist.strings; sourceTree = "<group>"; };
|
||||
D04BA2C7B51F68651B3C60E2 /* 6 windows - 1 line.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "6 windows - 1 line.jpg"; sourceTree = "<group>"; };
|
||||
@@ -623,14 +619,12 @@
|
||||
D04BA484B11FEF4DBF08350A /* pt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = pt; path = Localizable.strings; sourceTree = "<group>"; };
|
||||
D04BA48BC82D3060C3A1AB11 /* AppCenterApplication.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppCenterApplication.m; sourceTree = "<group>"; };
|
||||
D04BA49E45BFFF3D9FC60E43 /* HyperlinkLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HyperlinkLabel.swift; sourceTree = "<group>"; };
|
||||
D04BA4A0A748AAA68299BA4A /* acknowledgments@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "acknowledgments@2x.png"; sourceTree = "<group>"; };
|
||||
D04BA4A26987F67DD94C827F /* AboutTab.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutTab.swift; sourceTree = "<group>"; };
|
||||
D04BA4A621A8A15660F973C1 /* KeyboardEvents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyboardEvents.swift; sourceTree = "<group>"; };
|
||||
D04BA4A82888205AAE818E53 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = Localizable.strings; sourceTree = "<group>"; };
|
||||
D04BA4B5292629AA6B560216 /* package_and_notarize_release.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = package_and_notarize_release.sh; sourceTree = "<group>"; };
|
||||
D04BA4D5DF349429527824A2 /* determine_next_version.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = determine_next_version.sh; sourceTree = "<group>"; };
|
||||
D04BA4F23325560BC0BCDDB7 /* 7 windows - 2 lines - tall window.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "7 windows - 2 lines - tall window.jpg"; sourceTree = "<group>"; };
|
||||
D04BA4FC0DEB8B44FF460F90 /* about@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "about@2x.png"; sourceTree = "<group>"; };
|
||||
D04BA514F1C4B475B3CA6EB6 /* Bash.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bash.swift; sourceTree = "<group>"; };
|
||||
D04BA51D43775E57CE91154A /* 3 windows - 1 line - wide window.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "3 windows - 1 line - wide window.jpg"; sourceTree = "<group>"; };
|
||||
D04BA538C059434921F2A4C2 /* pt-BR */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = InfoPlist.strings; sourceTree = "<group>"; };
|
||||
@@ -677,7 +671,6 @@
|
||||
D04BA8AC77465E1B2BC947CF /* StackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StackView.swift; sourceTree = "<group>"; };
|
||||
D04BA8DB8AA7E5570DAC568A /* Sysctl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sysctl.swift; sourceTree = "<group>"; };
|
||||
D04BA8FDCF137D892114F5F3 /* AccessibilityEvents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccessibilityEvents.swift; sourceTree = "<group>"; };
|
||||
D04BA9357769516A81C50EE7 /* policies@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "policies@2x.png"; sourceTree = "<group>"; };
|
||||
D04BA93F02C9B26B05032B7A /* ja */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ja; path = Localizable.strings; sourceTree = "<group>"; };
|
||||
D04BA94A1695D4FF5337C84B /* import_certificate_into_main_keychain.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = import_certificate_into_main_keychain.sh; sourceTree = "<group>"; };
|
||||
D04BA954319227829B646315 /* android-chrome-192x192.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "android-chrome-192x192.png"; sourceTree = "<group>"; };
|
||||
@@ -691,7 +684,7 @@
|
||||
D04BAA6E43F1E6EB81F953AF /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = InfoPlist.strings; sourceTree = "<group>"; };
|
||||
D04BAA998119CAA8B70A2B67 /* TilesView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TilesView.swift; sourceTree = "<group>"; };
|
||||
D04BAA9E0539EE620D08F63F /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = InfoPlist.strings; sourceTree = "<group>"; };
|
||||
D04BAAA1835480F9B3CCF170 /* blacklists@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "blacklists@2x.png"; sourceTree = "<group>"; };
|
||||
D04BAAA1835480F9B3CCF170 /* exceptions@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "exceptions@2x.png"; sourceTree = "<group>"; };
|
||||
D04BAAB92261FC04854FDDE9 /* App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = App.swift; sourceTree = "<group>"; };
|
||||
D04BAADF01EB8FF8A15AECC6 /* Acknowledgments.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = Acknowledgments.md; sourceTree = "<group>"; };
|
||||
D04BAAE6E6823304D66B74F8 /* update_website.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = update_website.sh; sourceTree = "<group>"; };
|
||||
@@ -723,7 +716,6 @@
|
||||
D04BAD241A6928F45355B315 /* es */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = es; path = Localizable.strings; sourceTree = "<group>"; };
|
||||
D04BAD2A5EFA477F1BC436B4 /* import_certificate_into_new_keychain.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = import_certificate_into_new_keychain.sh; sourceTree = "<group>"; };
|
||||
D04BAD40CE2D3A8AAC3819D0 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = file.gitignore; path = .gitignore; sourceTree = "<group>"; };
|
||||
D04BAD60C97E609A759E721E /* PoliciesTab.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PoliciesTab.swift; sourceTree = "<group>"; };
|
||||
D04BAD65AA870A49D2F89DBC /* ensure_generated_files_are_up_to_date.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = ensure_generated_files_are_up_to_date.sh; sourceTree = "<group>"; };
|
||||
D04BAD7008ED1D9CBC147A75 /* pull_request_template.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = pull_request_template.md; sourceTree = "<group>"; };
|
||||
D04BAD82F652C4ED5D8BF7AE /* 3 windows - 1 line - tall window.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "3 windows - 1 line - tall window.jpg"; sourceTree = "<group>"; };
|
||||
@@ -1567,9 +1559,8 @@
|
||||
5F21C9DD2C6E93E60091F72F /* controls */,
|
||||
D04BA4A26987F67DD94C827F /* AboutTab.swift */,
|
||||
D04BACE22DC907F03D193075 /* GeneralTab.swift */,
|
||||
D04BAD60C97E609A759E721E /* PoliciesTab.swift */,
|
||||
D04BA788228BA86D9EFBD1ED /* AcknowledgmentsTab.swift */,
|
||||
D04BA27695D9A5824720BD7B /* BlacklistsTab.swift */,
|
||||
D04BA27695D9A5824720BD7B /* ExceptionsTab.swift */,
|
||||
);
|
||||
path = tabs;
|
||||
sourceTree = "<group>";
|
||||
@@ -2002,13 +1993,10 @@
|
||||
D04BACB1ACA7FCB074440059 /* tabs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D04BA4FC0DEB8B44FF460F90 /* about@2x.png */,
|
||||
D04BA4A0A748AAA68299BA4A /* acknowledgments@2x.png */,
|
||||
D04BAB74B7F9A08087D302F3 /* appearance@2x.png */,
|
||||
D04BAAA1835480F9B3CCF170 /* blacklists@2x.png */,
|
||||
D04BAAA1835480F9B3CCF170 /* exceptions@2x.png */,
|
||||
D04BA3FF376BC2757D25A2AD /* controls@2x.png */,
|
||||
D04BAF6E2AB002763931645A /* general@2x.png */,
|
||||
D04BA9357769516A81C50EE7 /* policies@2x.png */,
|
||||
);
|
||||
path = tabs;
|
||||
sourceTree = "<group>";
|
||||
@@ -2224,13 +2212,10 @@
|
||||
D04BA530F00E5989D66C6A1F /* Contributors.md in Resources */,
|
||||
D04BAFB217F9F8E58C3B09AD /* InfoPlist.strings in Resources */,
|
||||
D04BA6840A558A00A66CE135 /* Localizable.strings in Resources */,
|
||||
D04BAD395C7146A49734E0A5 /* about@2x.png in Resources */,
|
||||
D04BA0482478C20934FD5D27 /* acknowledgments@2x.png in Resources */,
|
||||
D04BAC51848224047F6EFB81 /* appearance@2x.png in Resources */,
|
||||
D04BAAD77232701929AC3D74 /* blacklists@2x.png in Resources */,
|
||||
D04BAAD77232701929AC3D74 /* exceptions@2x.png in Resources */,
|
||||
D04BA8C8016BD6E2FDE80430 /* controls@2x.png in Resources */,
|
||||
D04BA72B336C7175871B281C /* general@2x.png in Resources */,
|
||||
D04BA892CB4324F514EDF172 /* policies@2x.png in Resources */,
|
||||
D04BAC23045A0A119B527DEB /* InfoPlist.strings in Resources */,
|
||||
D04BA328F7C85DD1A6C1C7ED /* Localizable.strings in Resources */,
|
||||
BF0C852D28E458CDD6FA3E44 /* app.icns in Resources */,
|
||||
@@ -2528,7 +2513,6 @@
|
||||
D04BA7BE7F3DD24D58ACE942 /* AppearanceTab.swift in Sources */,
|
||||
D04BAD1BE9DC22C48C53D195 /* AboutTab.swift in Sources */,
|
||||
D04BA15A1B0C4871EA7CB899 /* GeneralTab.swift in Sources */,
|
||||
D04BA8092885B40CE3527370 /* PoliciesTab.swift in Sources */,
|
||||
D04BAD451966B43720120D2E /* Menubar.swift in Sources */,
|
||||
D04BA2E64C59D96F6EB27D9D /* FeedbackWindow.swift in Sources */,
|
||||
D04BA2F0A1B2C3D4E5F60003 /* DebugWindow.swift in Sources */,
|
||||
@@ -2560,7 +2544,7 @@
|
||||
D04BAFB90E00AA5D662EAF24 /* PermissionsWindow.swift in Sources */,
|
||||
D04BA7E39FA539DD8316447A /* PermissionView.swift in Sources */,
|
||||
D04BA446D702C5E252AF2319 /* TitleLabel.swift in Sources */,
|
||||
D04BAFF30A98CF287F85DA1E /* BlacklistsTab.swift in Sources */,
|
||||
D04BAFF30A98CF287F85DA1E /* ExceptionsTab.swift in Sources */,
|
||||
D04BA56789A2AF52557A9BFF /* AppCenterCrashes.swift in Sources */,
|
||||
D04BADA3F2DAB820D6FC6E75 /* AppCenterApplication.m in Sources */,
|
||||
D04BAA16F21AC41A23DDA63D /* ControlsTab.swift in Sources */,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
File renamed without changes.
Binary file not shown.
|
Before Width: | Height: | Size: 984 B |
@@ -133,9 +133,6 @@
|
||||
/* No comment provided by engineer. */
|
||||
"Auto-install updates periodically" = "Auto-install updates periodically";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Blacklists" = "Blacklists";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Cancel" = "Cancel";
|
||||
|
||||
@@ -200,7 +197,10 @@
|
||||
"End" = "End";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Export…" = "Export…";
|
||||
"Exceptions" = "Exceptions";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Export settings…" = "Export settings…";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Fade in animation of Preview" = "Fade in animation of Preview";
|
||||
@@ -257,7 +257,7 @@
|
||||
"Ignore shortcuts when active" = "Ignore shortcuts when active";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Import…" = "Import…";
|
||||
"Import settings…" = "Import settings…";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Keep open" = "Keep open";
|
||||
@@ -346,9 +346,6 @@
|
||||
/* No comment provided by engineer. */
|
||||
"Please fill in the form" = "Please fill in the form";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Policies" = "Policies";
|
||||
|
||||
/* No comment provided by engineer. */
|
||||
"Preview selected window" = "Preview selected window";
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class AppCenterCrash: NSObject {
|
||||
alert.accessoryView = checkbox
|
||||
let userChoice = alert.runModal()
|
||||
let id = crashButtonIdToUpdate(userChoice, checkbox)
|
||||
if let buttons = PoliciesTab.crashPolicyDropdown, buttons.numberOfItems > id {
|
||||
if let buttons = GeneralTab.crashPolicyDropdown, buttons.numberOfItems > id {
|
||||
buttons.selectItem(at: id)
|
||||
}
|
||||
Preferences.set("crashPolicy", String(id))
|
||||
|
||||
@@ -525,7 +525,7 @@ enum CrashPolicyPreference: CaseIterable, MacroPreference {
|
||||
}
|
||||
}
|
||||
|
||||
enum BlacklistHidePreference: String/* required for jsonEncode */, CaseIterable, MacroPreference, Codable {
|
||||
enum ExceptionHidePreference: String/* required for jsonEncode */, CaseIterable, MacroPreference, Codable {
|
||||
case none = "0"
|
||||
case always = "1"
|
||||
case whenNoOpenWindow = "2"
|
||||
@@ -541,7 +541,7 @@ enum BlacklistHidePreference: String/* required for jsonEncode */, CaseIterable,
|
||||
}
|
||||
}
|
||||
|
||||
enum BlacklistIgnorePreference: String/* required for jsonEncode */, CaseIterable, MacroPreference, Codable {
|
||||
enum ExceptionIgnorePreference: String/* required for jsonEncode */, CaseIterable, MacroPreference, Codable {
|
||||
case none = "0"
|
||||
case always = "1"
|
||||
case whenFullscreen = "2"
|
||||
|
||||
+10
-10
@@ -62,7 +62,7 @@ class Preferences {
|
||||
"menubarIcon": MenubarIconPreference.outlined.indexAsString,
|
||||
"menubarIconShown": "true",
|
||||
"language": LanguagePreference.systemDefault.indexAsString,
|
||||
"blacklist": defaultBlacklist(),
|
||||
"exceptions": defaultExceptions(),
|
||||
"updatePolicy": UpdatePolicyPreference.autoCheck.indexAsString,
|
||||
"crashPolicy": CrashPolicyPreference.ask.indexAsString,
|
||||
"shortcutStyle": ShortcutStylePreference.focusOnRelease.indexAsString,
|
||||
@@ -126,7 +126,7 @@ class Preferences {
|
||||
static var hideAppBadges: Bool { CachedUserDefaults.bool("hideAppBadges") }
|
||||
// periphery:ignore
|
||||
static var startAtLogin: Bool { CachedUserDefaults.bool("startAtLogin") }
|
||||
static var blacklist: [BlacklistEntry] { CachedUserDefaults.json("blacklist", [BlacklistEntry].self) }
|
||||
static var exceptions: [ExceptionEntry] { CachedUserDefaults.json("exceptions", [ExceptionEntry].self) }
|
||||
static var previewSelectedWindow: Bool { CachedUserDefaults.bool("previewFocusedWindow") }
|
||||
static var screenRecordingPermissionSkipped: Bool { CachedUserDefaults.bool("screenRecordingPermissionSkipped") }
|
||||
static var settingsWindowShownOnFirstLaunch: Bool { CachedUserDefaults.bool("settingsWindowShownOnFirstLaunch") }
|
||||
@@ -184,7 +184,7 @@ class Preferences {
|
||||
}
|
||||
|
||||
static func set<T>(_ key: String, _ value: T, _ notify: Bool = true) where T: Encodable {
|
||||
UserDefaults.standard.set(key == "blacklist" ? jsonEncode(value) : value, forKey: key)
|
||||
UserDefaults.standard.set(key == "exceptions" ? jsonEncode(value) : value, forKey: key)
|
||||
CachedUserDefaults.removeFromCache(key)
|
||||
if notify {
|
||||
PreferencesEvents.preferenceChanged(key)
|
||||
@@ -214,10 +214,10 @@ class Preferences {
|
||||
return LiteralKeyCodeTransformer.shared.transformedValue(NSNumber(value: kVK_Return)) ?? "↩"
|
||||
}
|
||||
|
||||
static func defaultBlacklist() -> String {
|
||||
static func defaultExceptions() -> String {
|
||||
return jsonEncode([
|
||||
BlacklistEntry(bundleIdentifier: "com.McAfee.McAfeeSafariHost", hide: .always, ignore: .none),
|
||||
BlacklistEntry(bundleIdentifier: "com.apple.finder", hide: .whenNoOpenWindow, ignore: .none),
|
||||
ExceptionEntry(bundleIdentifier: "com.McAfee.McAfeeSafariHost", hide: .always, ignore: .none),
|
||||
ExceptionEntry(bundleIdentifier: "com.apple.finder", hide: .whenNoOpenWindow, ignore: .none),
|
||||
] + [
|
||||
"com.microsoft.rdc.macos",
|
||||
"com.teamviewer.TeamViewer",
|
||||
@@ -230,7 +230,7 @@ class Preferences {
|
||||
"com.apple.ScreenSharing",
|
||||
"com.utmapp.UTM",
|
||||
].map {
|
||||
BlacklistEntry(bundleIdentifier: $0, hide: .none, ignore: .whenFullscreen)
|
||||
ExceptionEntry(bundleIdentifier: $0, hide: .none, ignore: .whenFullscreen)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -325,9 +325,9 @@ class CachedUserDefaults {
|
||||
}
|
||||
}
|
||||
|
||||
struct BlacklistEntry: Codable {
|
||||
struct ExceptionEntry: Codable {
|
||||
var bundleIdentifier: String
|
||||
var hide: BlacklistHidePreference
|
||||
var ignore: BlacklistIgnorePreference
|
||||
var hide: ExceptionHidePreference
|
||||
var ignore: ExceptionIgnorePreference
|
||||
var windowTitleContains: String?
|
||||
}
|
||||
@@ -21,41 +21,44 @@ class PreferencesMigrations {
|
||||
private static func updateToNewPreferences(_ versionInPlist: String) {
|
||||
Logger.debug { "App-version:\(App.version), Plist-version:\(versionInPlist)" }
|
||||
// x.compare(y) is .orderedDescending if x > y
|
||||
if versionInPlist.compare("9.0.0", options: .numeric) != .orderedDescending {
|
||||
migrateShortcutIndexes()
|
||||
if versionInPlist.compare("7.27.0", options: .numeric) != .orderedDescending {
|
||||
migrateCursorFollowFocus()
|
||||
if versionInPlist.compare("7.26.0", options: .numeric) != .orderedDescending {
|
||||
migrateShowWindowlessApps()
|
||||
if versionInPlist.compare("7.25.0", options: .numeric) != .orderedDescending {
|
||||
migrateHideWindowlessApps()
|
||||
if versionInPlist.compare("7.13.1", options: .numeric) != .orderedDescending {
|
||||
migrateGestures()
|
||||
if versionInPlist.compare("7.8.0", options: .numeric) != .orderedDescending {
|
||||
migrateMenubarIconWithNewShownToggle()
|
||||
if versionInPlist.compare("7.0.0", options: .numeric) != .orderedDescending {
|
||||
migratePreferencesIndexes()
|
||||
if versionInPlist.compare("6.43.0", options: .numeric) != .orderedDescending {
|
||||
migrateBlacklists()
|
||||
if versionInPlist.compare("6.28.1", options: .numeric) != .orderedDescending {
|
||||
migrateMinMaxWindowsWidthInRow()
|
||||
if versionInPlist.compare("6.27.1", options: .numeric) != .orderedDescending {
|
||||
// "Start at login" new implem doesn't use Login Items; we remove the entry from previous versions
|
||||
(PreferencesMigrations.self as AvoidDeprecationWarnings.Type).migrateLoginItem()
|
||||
if versionInPlist.compare("6.23.0", options: .numeric) != .orderedDescending {
|
||||
// "Show windows from:" got the "Active Space" option removed
|
||||
migrateShowWindowsFrom()
|
||||
if versionInPlist.compare("6.18.1", options: .numeric) != .orderedDescending {
|
||||
// nextWindowShortcut used to be able to have modifiers already present in holdShortcut; we remove these
|
||||
migrateNextWindowShortcuts()
|
||||
// dropdowns preferences used to store English text; now they store indexes
|
||||
migrateDropdownsFromTextToIndexes()
|
||||
// the "Hide menubar icon" checkbox was replaced with a dropdown of: icon1, icon2, hidden
|
||||
migrateMenubarIconFromCheckboxToDropdown()
|
||||
// "Show minimized/hidden/fullscreen windows" checkboxes were replaced with dropdowns
|
||||
migrateShowWindowsCheckboxToDropdown()
|
||||
// "Max size on screen" was split into max width and max height
|
||||
migrateMaxSizeOnScreenToWidthAndHeight()
|
||||
if versionInPlist.compare("10.2.0", options: .numeric) != .orderedDescending {
|
||||
migrateBlacklistToExceptions()
|
||||
if versionInPlist.compare("9.0.0", options: .numeric) != .orderedDescending {
|
||||
migrateShortcutIndexes()
|
||||
if versionInPlist.compare("7.27.0", options: .numeric) != .orderedDescending {
|
||||
migrateCursorFollowFocus()
|
||||
if versionInPlist.compare("7.26.0", options: .numeric) != .orderedDescending {
|
||||
migrateShowWindowlessApps()
|
||||
if versionInPlist.compare("7.25.0", options: .numeric) != .orderedDescending {
|
||||
migrateHideWindowlessApps()
|
||||
if versionInPlist.compare("7.13.1", options: .numeric) != .orderedDescending {
|
||||
migrateGestures()
|
||||
if versionInPlist.compare("7.8.0", options: .numeric) != .orderedDescending {
|
||||
migrateMenubarIconWithNewShownToggle()
|
||||
if versionInPlist.compare("7.0.0", options: .numeric) != .orderedDescending {
|
||||
migratePreferencesIndexes()
|
||||
if versionInPlist.compare("6.43.0", options: .numeric) != .orderedDescending {
|
||||
migrateExceptions()
|
||||
if versionInPlist.compare("6.28.1", options: .numeric) != .orderedDescending {
|
||||
migrateMinMaxWindowsWidthInRow()
|
||||
if versionInPlist.compare("6.27.1", options: .numeric) != .orderedDescending {
|
||||
// "Start at login" new implem doesn't use Login Items; we remove the entry from previous versions
|
||||
(PreferencesMigrations.self as AvoidDeprecationWarnings.Type).migrateLoginItem()
|
||||
if versionInPlist.compare("6.23.0", options: .numeric) != .orderedDescending {
|
||||
// "Show windows from:" got the "Active Space" option removed
|
||||
migrateShowWindowsFrom()
|
||||
if versionInPlist.compare("6.18.1", options: .numeric) != .orderedDescending {
|
||||
// nextWindowShortcut used to be able to have modifiers already present in holdShortcut; we remove these
|
||||
migrateNextWindowShortcuts()
|
||||
// dropdowns preferences used to store English text; now they store indexes
|
||||
migrateDropdownsFromTextToIndexes()
|
||||
// the "Hide menubar icon" checkbox was replaced with a dropdown of: icon1, icon2, hidden
|
||||
migrateMenubarIconFromCheckboxToDropdown()
|
||||
// "Show minimized/hidden/fullscreen windows" checkboxes were replaced with dropdowns
|
||||
migrateShowWindowsCheckboxToDropdown()
|
||||
// "Max size on screen" was split into max width and max height
|
||||
migrateMaxSizeOnScreenToWidthAndHeight()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,6 +73,16 @@ class PreferencesMigrations {
|
||||
}
|
||||
}
|
||||
|
||||
private static func migrateBlacklistToExceptions() {
|
||||
let oldKey = "blacklist"
|
||||
let newKey = "exceptions"
|
||||
guard let oldValue = UserDefaults.standard.string(forKey: oldKey) else { return }
|
||||
if UserDefaults.standard.string(forKey: newKey) == nil {
|
||||
UserDefaults.standard.set(oldValue, forKey: newKey)
|
||||
}
|
||||
UserDefaults.standard.removeObject(forKey: oldKey)
|
||||
}
|
||||
|
||||
// gesture index moved from 3 (suffix "4") to 9 (suffix "10"); set shortcutCount for users who had a 3rd shortcut
|
||||
private static func migrateShortcutIndexes() {
|
||||
let gesturePrefs = [
|
||||
@@ -167,30 +180,30 @@ class PreferencesMigrations {
|
||||
}
|
||||
}
|
||||
|
||||
private static func migrateBlacklists() {
|
||||
var entries = [BlacklistEntry]()
|
||||
private static func migrateExceptions() {
|
||||
var entries = [ExceptionEntry]()
|
||||
if let old = UserDefaults.standard.string(forKey: "dontShowBlacklist") {
|
||||
entries.append(contentsOf: oldBlacklistEntriesToNewOnes(old, .always, .none))
|
||||
entries.append(contentsOf: oldExceptionEntriesToNewOnes(old, .always, .none))
|
||||
}
|
||||
if let old = UserDefaults.standard.string(forKey: "disableShortcutsBlacklist") {
|
||||
let onlyFullscreen = UserDefaults.standard.bool(forKey: "disableShortcutsBlacklistOnlyFullscreen")
|
||||
entries.append(contentsOf: oldBlacklistEntriesToNewOnes(old, .none, onlyFullscreen ? .whenFullscreen : .always))
|
||||
entries.append(contentsOf: oldExceptionEntriesToNewOnes(old, .none, onlyFullscreen ? .whenFullscreen : .always))
|
||||
}
|
||||
if entries.count > 0 {
|
||||
UserDefaults.standard.set(Preferences.jsonEncode(entries), forKey: "blacklist")
|
||||
UserDefaults.standard.set(Preferences.jsonEncode(entries), forKey: "exceptions")
|
||||
["dontShowBlacklist", "disableShortcutsBlacklist", "disableShortcutsBlacklistOnlyFullscreen"].forEach {
|
||||
UserDefaults.standard.removeObject(forKey: $0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static func oldBlacklistEntriesToNewOnes(_ old: String, _ hide: BlacklistHidePreference, _ ignore: BlacklistIgnorePreference) -> [BlacklistEntry] {
|
||||
old.split(separator: "\n").compactMap { (e) -> BlacklistEntry? in
|
||||
private static func oldExceptionEntriesToNewOnes(_ old: String, _ hide: ExceptionHidePreference, _ ignore: ExceptionIgnorePreference) -> [ExceptionEntry] {
|
||||
old.split(separator: "\n").compactMap { (e) -> ExceptionEntry? in
|
||||
let line = e.trimmingCharacters(in: .whitespaces)
|
||||
if line.isEmpty {
|
||||
return nil
|
||||
}
|
||||
return BlacklistEntry(bundleIdentifier: line, hide: hide, ignore: ignore)
|
||||
return ExceptionEntry(bundleIdentifier: line, hide: hide, ignore: ignore)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ class Windows {
|
||||
}
|
||||
}
|
||||
|
||||
private static func shouldHideWindow(_ window: Window, _ entry: BlacklistEntry) -> Bool {
|
||||
private static func shouldHideWindow(_ window: Window, _ entry: ExceptionEntry) -> Bool {
|
||||
switch entry.hide {
|
||||
case .none:
|
||||
return false
|
||||
@@ -182,7 +182,7 @@ class Windows {
|
||||
private static func refreshIfWindowShouldBeShownToTheUser(_ window: Window) {
|
||||
window.shouldShowTheUser =
|
||||
!(window.application.bundleIdentifier.flatMap { id in
|
||||
Preferences.blacklist.contains {
|
||||
Preferences.exceptions.contains {
|
||||
id.hasPrefix($0.bundleIdentifier) && shouldHideWindow(window, $0)
|
||||
}
|
||||
} ?? false) &&
|
||||
|
||||
@@ -67,11 +67,11 @@ class PreferencesEvents {
|
||||
}
|
||||
|
||||
private static func applyUpdatePolicyPreference() {
|
||||
PoliciesTab.policyLock = true
|
||||
GeneralTab.policyLock = true
|
||||
let policy = Preferences.updatePolicy
|
||||
SUUpdater.shared().automaticallyDownloadsUpdates = policy == .autoInstall
|
||||
SUUpdater.shared().automaticallyChecksForUpdates = policy == .autoInstall || policy == .autoCheck
|
||||
PoliciesTab.policyLock = false
|
||||
GeneralTab.policyLock = false
|
||||
}
|
||||
|
||||
private static func applyStartAtLoginPreference() {
|
||||
|
||||
@@ -17,14 +17,14 @@ class UserDefaultsEvents: NSObject {
|
||||
}
|
||||
|
||||
private func handleEvent(_ keyPath: String?) {
|
||||
Logger.debug { "\(keyPath ?? "keyPath:nil") updatePolicy:\(Preferences.updatePolicy) policyLock:\(PoliciesTab.policyLock)" }
|
||||
guard !PoliciesTab.policyLock else { return }
|
||||
Logger.debug { "\(keyPath ?? "keyPath:nil") updatePolicy:\(Preferences.updatePolicy) policyLock:\(GeneralTab.policyLock)" }
|
||||
guard !GeneralTab.policyLock else { return }
|
||||
let id = buttonIdToUpdate()
|
||||
if id == 2 {
|
||||
// Sparkle UI "Automatically download and install updates in the future" doesn't activate periodical checks; we do it manually
|
||||
SUUpdater.shared().automaticallyChecksForUpdates = true
|
||||
}
|
||||
PoliciesTab.updatesPolicyDropdown?.selectItem(at: id)
|
||||
GeneralTab.updatesPolicyDropdown?.selectItem(at: id)
|
||||
Preferences.set("updatePolicy", String(id))
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -148,7 +148,7 @@ class App: AppCenterApplication {
|
||||
}
|
||||
|
||||
@objc func checkForUpdatesNow(_ sender: NSMenuItem) {
|
||||
PoliciesTab.checkForUpdatesNow(sender)
|
||||
GeneralTab.checkForUpdatesNow(sender)
|
||||
}
|
||||
|
||||
@objc func checkPermissions(_ sender: NSMenuItem) {
|
||||
@@ -375,10 +375,10 @@ class App: AppCenterApplication {
|
||||
|
||||
func checkIfShortcutsShouldBeDisabled(_ activeWindow: Window?, _ activeApp: Application?) {
|
||||
let app = activeWindow?.application ?? activeApp!
|
||||
let shortcutsShouldBeDisabled = Preferences.blacklist.contains { blacklistedId in
|
||||
let shortcutsShouldBeDisabled = Preferences.exceptions.contains { exception in
|
||||
if let id = app.bundleIdentifier {
|
||||
return id.hasPrefix(blacklistedId.bundleIdentifier) &&
|
||||
(blacklistedId.ignore == .always || (blacklistedId.ignore == .whenFullscreen && (activeWindow?.isFullscreen ?? false)))
|
||||
return id.hasPrefix(exception.bundleIdentifier) &&
|
||||
(exception.ignore == .always || (exception.ignore == .whenFullscreen && (activeWindow?.isFullscreen ?? false)))
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Cocoa
|
||||
|
||||
class BlacklistView: NSScrollView {
|
||||
class ExceptionsView: NSScrollView {
|
||||
convenience init(width: CGFloat = 500, height: CGFloat = 378) {
|
||||
self.init(frame: .zero)
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
@@ -66,7 +66,7 @@ class BlacklistView: NSScrollView {
|
||||
}
|
||||
|
||||
class TableView: NSTableView {
|
||||
var items = Preferences.blacklist
|
||||
var items = Preferences.exceptions
|
||||
|
||||
override func wantsForwardedScrollEvents(for axis: NSEvent.GestureAxis) -> Bool {
|
||||
axis == .vertical
|
||||
@@ -94,7 +94,7 @@ class TableView: NSTableView {
|
||||
|
||||
func insertRow(_ bundleId: String) {
|
||||
if !(items.contains { $0.bundleIdentifier == bundleId }) {
|
||||
items.append(BlacklistEntry(bundleIdentifier: bundleId, hide: .always, ignore: .none, windowTitleContains: nil))
|
||||
items.append(ExceptionEntry(bundleIdentifier: bundleId, hide: .always, ignore: .none, windowTitleContains: nil))
|
||||
insertRows(at: [numberOfRows])
|
||||
savePreferences()
|
||||
}
|
||||
@@ -127,20 +127,20 @@ class TableView: NSTableView {
|
||||
if colId == "col1" {
|
||||
items[row].bundleIdentifier = LabelAndControl.getControlValue(control, nil)!
|
||||
} else if colId == "col2" {
|
||||
items[row].hide = BlacklistHidePreference.allCases[Int(LabelAndControl.getControlValue(control, nil)!)!]
|
||||
items[row].hide = ExceptionHidePreference.allCases[Int(LabelAndControl.getControlValue(control, nil)!)!]
|
||||
} else if colId == "col3" {
|
||||
items[row].windowTitleContains = LabelAndControl.getControlValue(control, nil)
|
||||
} else {
|
||||
items[row].ignore = BlacklistIgnorePreference.allCases[Int(LabelAndControl.getControlValue(control, nil)!)!]
|
||||
items[row].ignore = ExceptionIgnorePreference.allCases[Int(LabelAndControl.getControlValue(control, nil)!)!]
|
||||
}
|
||||
savePreferences()
|
||||
}
|
||||
|
||||
private func savePreferences() {
|
||||
Preferences.set("blacklist", items)
|
||||
Preferences.set("exceptions", items)
|
||||
}
|
||||
|
||||
private func text(_ item: BlacklistEntry) -> NSView {
|
||||
private func text(_ item: ExceptionEntry) -> NSView {
|
||||
let text = TextField(item.bundleIdentifier)
|
||||
text.isEditable = true
|
||||
text.allowsExpansionToolTips = true
|
||||
@@ -157,7 +157,7 @@ class TableView: NSTableView {
|
||||
return parent
|
||||
}
|
||||
|
||||
private func titleText(_ item: BlacklistEntry) -> NSView {
|
||||
private func titleText(_ item: ExceptionEntry) -> NSView {
|
||||
let text = TextField(item.windowTitleContains ?? "")
|
||||
text.isEditable = true
|
||||
text.allowsExpansionToolTips = true
|
||||
@@ -174,7 +174,7 @@ class TableView: NSTableView {
|
||||
return parent
|
||||
}
|
||||
|
||||
private func dropdown(_ item: BlacklistEntry, _ colId: String) -> NSView {
|
||||
private func dropdown(_ item: ExceptionEntry, _ colId: String) -> NSView {
|
||||
let isHidePref = colId == "col2"
|
||||
let button = NSPopUpButton()
|
||||
button.translatesAutoresizingMaskIntoConstraints = false
|
||||
@@ -184,7 +184,7 @@ class TableView: NSTableView {
|
||||
cell.bezelStyle = .regularSquare
|
||||
cell.arrowPosition = .arrowAtBottom
|
||||
cell.imagePosition = .imageOverlaps
|
||||
let cases: [MacroPreference] = isHidePref ? BlacklistHidePreference.allCases : BlacklistIgnorePreference.allCases
|
||||
let cases: [MacroPreference] = isHidePref ? ExceptionHidePreference.allCases : ExceptionIgnorePreference.allCases
|
||||
button.addItems(withTitles: cases.map { $0.localizedString })
|
||||
button.selectItem(at: isHidePref ? item.hide.index : item.ignore.index)
|
||||
button.onAction = { self.wasUpdated(colId, $0) }
|
||||
|
||||
@@ -694,8 +694,7 @@ class SettingsWindow: NSWindow {
|
||||
SettingsSectionDefinition(id: "appearance", title: NSLocalizedString("Appearance", comment: ""), imageName: "appearance", systemSymbolName: "paintpalette", view: AppearanceTab.initTab()),
|
||||
SettingsSectionDefinition(id: "controls", title: NSLocalizedString("Controls", comment: ""), imageName: "controls", systemSymbolName: "command", view: ControlsTab.initTab()),
|
||||
SettingsSectionDefinition(id: "general", title: NSLocalizedString("General", comment: ""), imageName: "general", systemSymbolName: "gearshape", view: GeneralTab.initTab()),
|
||||
SettingsSectionDefinition(id: "policies", title: NSLocalizedString("Policies", comment: ""), imageName: "policies", systemSymbolName: "antenna.radiowaves.left.and.right", view: PoliciesTab.initTab()),
|
||||
SettingsSectionDefinition(id: "blacklists", title: NSLocalizedString("Blacklists", comment: ""), imageName: "blacklists", systemSymbolName: "hand.raised", view: BlacklistsTab.initTab()),
|
||||
SettingsSectionDefinition(id: "exceptions", title: NSLocalizedString("Exceptions", comment: ""), imageName: "exceptions", systemSymbolName: "hand.raised", view: ExceptionsTab.initTab()),
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1149,7 +1148,6 @@ class SettingsWindow: NSWindow {
|
||||
|
||||
private func refreshControlsFromSettings() {
|
||||
GeneralTab.refreshControlsFromPreferences()
|
||||
PoliciesTab.refreshControlsFromPreferences()
|
||||
}
|
||||
|
||||
func beginSheetWithSearchHighlight(_ sheet: SheetWindow) {
|
||||
|
||||
+6
-7
@@ -1,17 +1,16 @@
|
||||
import Cocoa
|
||||
import Sparkle
|
||||
|
||||
class BlacklistsTab {
|
||||
class ExceptionsTab {
|
||||
static func initTab() -> NSView {
|
||||
let blacklist = BlacklistView(width: SettingsWindow.contentWidth - 2 * TableGroupView.padding)
|
||||
let tableView = blacklist.documentView as! TableView
|
||||
let exceptions = ExceptionsView(width: SettingsWindow.contentWidth - 2 * TableGroupView.padding)
|
||||
let tableView = exceptions.documentView as! TableView
|
||||
let addButton = makeAddButton(tableView)
|
||||
let removeButton = makeRemoveButton(tableView)
|
||||
let buttonsStack = NSStackView(views: [addButton, removeButton])
|
||||
buttonsStack.orientation = .horizontal
|
||||
buttonsStack.spacing = 2
|
||||
let table = TableGroupView(width: SettingsWindow.contentWidth)
|
||||
_ = table.addRow(leftViews: [blacklist], secondaryViews: [buttonsStack])
|
||||
_ = table.addRow(leftViews: [exceptions], secondaryViews: [buttonsStack])
|
||||
let view = TableGroupSetView(originalViews: [table], bottomPadding: 0)
|
||||
return view
|
||||
}
|
||||
@@ -59,7 +58,7 @@ class BlacklistsTab {
|
||||
menu.addItem(runningAppsItem)
|
||||
let diskItem = NSMenuItem(title: NSLocalizedString("Add an app from disk", comment: ""), action: nil, keyEquivalent: "")
|
||||
diskItem.representedObject = tableView
|
||||
diskItem.target = BlacklistsTab.self
|
||||
diskItem.target = ExceptionsTab.self
|
||||
diskItem.action = #selector(addFromDisk(_:))
|
||||
menu.addItem(diskItem)
|
||||
menu.popUp(positioning: nil, at: NSPoint(x: 0, y: sender.bounds.height + 2), in: sender)
|
||||
@@ -93,7 +92,7 @@ class BlacklistsTab {
|
||||
item.image = icon
|
||||
}
|
||||
item.representedObject = (tableView, bundleId)
|
||||
item.target = BlacklistsTab.self
|
||||
item.target = ExceptionsTab.self
|
||||
item.action = #selector(addRunningApp(_:))
|
||||
submenu.addItem(item)
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
import Cocoa
|
||||
import Sparkle
|
||||
|
||||
class GeneralTab {
|
||||
static var menubarIconDropdown: NSPopUpButton?
|
||||
static var updatesPolicyDropdown: NSPopUpButton?
|
||||
static var crashPolicyDropdown: NSPopUpButton?
|
||||
static var policyLock = false
|
||||
private static var menubarIsVisibleObserver: NSKeyValueObservation?
|
||||
|
||||
static func initTab() -> NSView {
|
||||
@@ -16,6 +20,12 @@ class GeneralTab {
|
||||
])
|
||||
let language = TableGroupView.Row(leftTitle: NSLocalizedString("Language", comment: ""),
|
||||
rightViews: [LabelAndControl.makeDropdown("language", LanguagePreference.allCases, extraAction: setLanguageCallback)])
|
||||
updatesPolicyDropdown = LabelAndControl.makeDropdown("updatePolicy", UpdatePolicyPreference.allCases)
|
||||
let updatesPolicy = TableGroupView.Row(leftTitle: NSLocalizedString("Updates policy", comment: ""),
|
||||
rightViews: [updatesPolicyDropdown!])
|
||||
crashPolicyDropdown = LabelAndControl.makeDropdown("crashPolicy", CrashPolicyPreference.allCases)
|
||||
let crashPolicy = TableGroupView.Row(leftTitle: NSLocalizedString("Crash reports policy", comment: ""),
|
||||
rightViews: [crashPolicyDropdown!])
|
||||
for i in 0..<MenubarIconPreference.allCases.count {
|
||||
let image = NSImage.initCopy("menubar-\(i)")
|
||||
image.isTemplate = i < 2
|
||||
@@ -31,11 +41,16 @@ class GeneralTab {
|
||||
table.addRow(menubarIcon)
|
||||
table.addNewTable()
|
||||
table.addRow(language)
|
||||
let exportButton = NSButton(title: NSLocalizedString("Export…", comment: ""), target: nil, action: nil)
|
||||
table.addNewTable()
|
||||
table.addRow(updatesPolicy)
|
||||
table.addRow(crashPolicy)
|
||||
let exportButton = NSButton(title: NSLocalizedString("Export settings…", comment: ""), target: nil, action: nil)
|
||||
exportButton.onAction = { _ in exportSettings() }
|
||||
let importButton = NSButton(title: NSLocalizedString("Import…", comment: ""), target: nil, action: nil)
|
||||
let importButton = NSButton(title: NSLocalizedString("Import settings…", comment: ""), target: nil, action: nil)
|
||||
importButton.onAction = { _ in importSettings() }
|
||||
let tools = StackView([exportButton, importButton], .horizontal)
|
||||
let checkForUpdates = NSButton(title: NSLocalizedString("Check for updates now…", comment: ""), target: nil, action: nil)
|
||||
checkForUpdates.onAction = { control in checkForUpdatesNow(control) }
|
||||
let tools = StackView([exportButton, importButton, checkForUpdates], .horizontal)
|
||||
let view = TableGroupSetView(originalViews: [table, tools], bottomPadding: 0)
|
||||
return view
|
||||
}
|
||||
@@ -43,6 +58,8 @@ class GeneralTab {
|
||||
static func refreshControlsFromPreferences() {
|
||||
menubarIconDropdown?.selectItem(at: CachedUserDefaults.intFromMacroPref("menubarIcon", MenubarIconPreference.allCases))
|
||||
menubarIconDropdown?.isEnabled = Preferences.menubarIconShown
|
||||
updatesPolicyDropdown?.selectItem(at: CachedUserDefaults.intFromMacroPref("updatePolicy", UpdatePolicyPreference.allCases))
|
||||
crashPolicyDropdown?.selectItem(at: CachedUserDefaults.intFromMacroPref("crashPolicy", CrashPolicyPreference.allCases))
|
||||
}
|
||||
|
||||
private static func enableDraggingOffMenubarIcon(_ menuIconShownToggle: Switch) {
|
||||
@@ -69,6 +86,10 @@ class GeneralTab {
|
||||
}
|
||||
}
|
||||
|
||||
@objc static func checkForUpdatesNow(_ sender: Any?) {
|
||||
SUUpdater.shared().checkForUpdates(sender)
|
||||
}
|
||||
|
||||
private static func exportSettings() {
|
||||
let panel = NSSavePanel()
|
||||
panel.nameFieldStringValue = "\(App.bundleIdentifier).plist"
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
import Cocoa
|
||||
import Sparkle
|
||||
|
||||
class PoliciesTab {
|
||||
static var updatesPolicyDropdown: NSPopUpButton!
|
||||
static var crashPolicyDropdown: NSPopUpButton!
|
||||
// this helps prevent double-dipping (i.e. user updates the UI > changes the preference > updates the UI)
|
||||
static var policyLock = false
|
||||
|
||||
static func refreshControlsFromPreferences() {
|
||||
updatesPolicyDropdown?.selectItem(at: CachedUserDefaults.intFromMacroPref("updatePolicy", UpdatePolicyPreference.allCases))
|
||||
crashPolicyDropdown?.selectItem(at: CachedUserDefaults.intFromMacroPref("crashPolicy", CrashPolicyPreference.allCases))
|
||||
}
|
||||
|
||||
static func initTab() -> NSView {
|
||||
PoliciesTab.updatesPolicyDropdown = LabelAndControl.makeDropdown("updatePolicy", UpdatePolicyPreference.allCases)
|
||||
PoliciesTab.crashPolicyDropdown = LabelAndControl.makeDropdown("crashPolicy", CrashPolicyPreference.allCases)
|
||||
let table = TableGroupView(width: SettingsWindow.contentWidth)
|
||||
table.addRow(leftText: NSLocalizedString("Updates policy", comment: ""), rightViews: [PoliciesTab.updatesPolicyDropdown])
|
||||
table.addRow(leftText: NSLocalizedString("Crash reports policy", comment: ""), rightViews: [PoliciesTab.crashPolicyDropdown])
|
||||
let checkForUpdates = NSButton(title: NSLocalizedString("Check for updates now…", comment: ""), target: nil, action: #selector(PoliciesTab.checkForUpdatesNow))
|
||||
let view = TableGroupSetView(originalViews: [table, checkForUpdates], bottomPadding: 0)
|
||||
return view
|
||||
}
|
||||
|
||||
@objc static func checkForUpdatesNow(_ sender: Any?) {
|
||||
SUUpdater.shared().checkForUpdates(sender)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user