Skip to content

Commit a795c3d

Browse files
committed
feat: update CFBundleVersion to 6725, add SettingsAccess package, and refactor menu bar UI for improved accessibility
1 parent a9e0e23 commit a795c3d

File tree

5 files changed

+45
-10
lines changed

5 files changed

+45
-10
lines changed

Pareto Security.xcodeproj/project.pbxproj

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@
245245
4FB7C68126AFF25300FB1C41 /* Date.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FB7C68026AFF25300FB1C41 /* Date.swift */; };
246246
4FB7C68726AFF29A00FB1C41 /* NSImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FB7C68626AFF29A00FB1C41 /* NSImage.swift */; };
247247
4FB7C68D26AFFD2600FB1C41 /* FileVault.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FB7C68C26AFFD2600FB1C41 /* FileVault.swift */; };
248+
4FBF73B22E78309500E1CC53 /* SettingsAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 4FBF73B12E78309500E1CC53 /* SettingsAccess */; };
249+
4FBF73B42E7830A500E1CC53 /* SettingsAccess in Frameworks */ = {isa = PBXBuildFile; productRef = 4FBF73B32E7830A500E1CC53 /* SettingsAccess */; };
248250
4FCAA78B2B4AD7C300A62B4E /* NoAdminUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FCAA78A2B4AD7C300A62B4E /* NoAdminUser.swift */; };
249251
4FCAA78C2B4AD7C300A62B4E /* NoAdminUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FCAA78A2B4AD7C300A62B4E /* NoAdminUser.swift */; };
250252
4FD0A24126A024440070BED4 /* Gatekeeper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FD0A24026A024440070BED4 /* Gatekeeper.swift */; };
@@ -514,6 +516,7 @@
514516
4F37E7382718122E00A2B254 /* Version in Frameworks */,
515517
4F37E7392718122E00A2B254 /* Path in Frameworks */,
516518
4F37E73A2718122E00A2B254 /* Alamofire in Frameworks */,
519+
4FBF73B42E7830A500E1CC53 /* SettingsAccess in Frameworks */,
517520
4F37E73B2718122E00A2B254 /* Defaults in Frameworks */,
518521
4F37E73C2718122E00A2B254 /* SwiftSocket in Frameworks */,
519522
4F37E73D2718122E00A2B254 /* LaunchAtLogin in Frameworks */,
@@ -559,6 +562,7 @@
559562
4F1AE88B26F9FC150084A381 /* SwiftSocket in Frameworks */,
560563
4F103012269F1C65008C1E86 /* LaunchAtLogin in Frameworks */,
561564
4F196CD62714B51900A2A7B8 /* JWTDecode in Frameworks */,
565+
4FBF73B22E78309500E1CC53 /* SettingsAccess in Frameworks */,
562566
4F3EF0A528AEA05F00D83F4E /* Yams in Frameworks */,
563567
4F923CED2756918E00070551 /* Cache in Frameworks */,
564568
);
@@ -876,6 +880,7 @@
876880
4F1E6DDA2760081300FD3F01 /* Regex */,
877881
4FAF5BC12895583A004E9615 /* Setapp */,
878882
4F3EF0A628AEA07400D83F4E /* Yams */,
883+
4FBF73B32E7830A500E1CC53 /* SettingsAccess */,
879884
);
880885
productName = Pareto;
881886
productReference = 4F37E7472718122E00A2B254 /* Pareto Security SetApp.app */;
@@ -970,6 +975,7 @@
970975
4F923CEC2756918E00070551 /* Cache */,
971976
4F6EF891275FEE6C00752559 /* Regex */,
972977
4F3EF0A428AEA05F00D83F4E /* Yams */,
978+
4FBF73B12E78309500E1CC53 /* SettingsAccess */,
973979
);
974980
productName = Pareto;
975981
productReference = 4FEBA2EE269CD48F009B2469 /* Pareto Security.app */;
@@ -1022,6 +1028,7 @@
10221028
4FAF5BC02895583A004E9615 /* XCRemoteSwiftPackageReference "Setapp-framework" */,
10231029
4F3EF0A328AEA05F00D83F4E /* XCRemoteSwiftPackageReference "Yams" */,
10241030
4FC0F2EC2A4C47FD004E7359 /* XCRemoteSwiftPackageReference "ViewInspector" */,
1031+
4FBF73B02E78309500E1CC53 /* XCRemoteSwiftPackageReference "SettingsAccess" */,
10251032
);
10261033
preferredProjectObjectVersion = 50;
10271034
productRefGroup = 4FEBA2EF269CD48F009B2469 /* Products */;
@@ -2063,6 +2070,14 @@
20632070
minimumVersion = 4.0.0;
20642071
};
20652072
};
2073+
4FBF73B02E78309500E1CC53 /* XCRemoteSwiftPackageReference "SettingsAccess" */ = {
2074+
isa = XCRemoteSwiftPackageReference;
2075+
repositoryURL = "https://github.com/orchetect/SettingsAccess";
2076+
requirement = {
2077+
kind = upToNextMajorVersion;
2078+
minimumVersion = 2.1.0;
2079+
};
2080+
};
20662081
4FC0F2EC2A4C47FD004E7359 /* XCRemoteSwiftPackageReference "ViewInspector" */ = {
20672082
isa = XCRemoteSwiftPackageReference;
20682083
repositoryURL = "https://github.com/nalexn/ViewInspector";
@@ -2192,6 +2207,16 @@
21922207
package = 4FAF5BC02895583A004E9615 /* XCRemoteSwiftPackageReference "Setapp-framework" */;
21932208
productName = Setapp;
21942209
};
2210+
4FBF73B12E78309500E1CC53 /* SettingsAccess */ = {
2211+
isa = XCSwiftPackageProductDependency;
2212+
package = 4FBF73B02E78309500E1CC53 /* XCRemoteSwiftPackageReference "SettingsAccess" */;
2213+
productName = SettingsAccess;
2214+
};
2215+
4FBF73B32E7830A500E1CC53 /* SettingsAccess */ = {
2216+
isa = XCSwiftPackageProductDependency;
2217+
package = 4FBF73B02E78309500E1CC53 /* XCRemoteSwiftPackageReference "SettingsAccess" */;
2218+
productName = SettingsAccess;
2219+
};
21952220
4FF515C026F7B362008D135E /* Alamofire */ = {
21962221
isa = XCSwiftPackageProductDependency;
21972222
package = 4FF515BF26F7B362008D135E /* XCRemoteSwiftPackageReference "Alamofire" */;

Pareto/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</dict>
2727
</array>
2828
<key>CFBundleVersion</key>
29-
<string>6721</string>
29+
<string>6725</string>
3030
<key>LSApplicationCategoryType</key>
3131
<string>public.app-category.utilities</string>
3232
<key>LSMinimumSystemVersion</key>

Pareto/ParetoApp.swift

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,6 @@ struct Pareto: App {
256256
.windowStyle(.hiddenTitleBar)
257257
.defaultSize(width: 1, height: 1)
258258

259-
// Menu bar UI
260-
MenuBarExtra(isInserted: .constant(true)) {
261-
StatusBarMenuView(statusBarModel: appDelegate.statusBarModel)
262-
.environmentObject(appDelegate as AppHandlers)
263-
} label: {
264-
StatusBarIcon(statusBarModel: appDelegate.statusBarModel)
265-
}
266259

267260
// Welcome window managed by SwiftUI, with no controls
268261
WindowGroup("Welcome", id: AppWindowID.welcome) {
@@ -293,5 +286,13 @@ struct Pareto: App {
293286
NSApp.activate(ignoringOtherApps: true)
294287
}
295288
}
289+
290+
// Menu bar UI
291+
MenuBarExtra(isInserted: .constant(true)) {
292+
StatusBarMenuView(statusBarModel: appDelegate.statusBarModel)
293+
.environmentObject(appDelegate as AppHandlers)
294+
} label: {
295+
StatusBarIcon(statusBarModel: appDelegate.statusBarModel)
296+
}
296297
}
297298
}

Pareto/Views/Settings/SettingsView.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ struct SettingsView: View {
4747
.tag(Tabs.about)
4848
}
4949
.scenePadding()
50-
// Let the window size adapt naturally without hardcoded sizes
51-
.frame(width: 520) // avoid overly narrow layouts
50+
.frame(width: 520)
51+
.onAppear {
52+
// Bring the app (and thus the Settings window) to the front
53+
NSApp.activate(ignoringOtherApps: true)
54+
}
5255
}
5356
}

Pareto/Views/StatusBarMenuView.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import AppKit
99
import Defaults
1010
import SwiftUI
11+
import SettingsAccess
1112

1213
struct StatusBarMenuView: View {
1314
@ObservedObject var statusBarModel: StatusBarModel
@@ -88,13 +89,18 @@ struct StatusBarMenuView: View {
8889
SettingsLink {
8990
Label("Preferences", systemImage: "gearshape.fill")
9091
.symbolRenderingMode(.multicolor)
92+
} preAction: {
93+
NSApp.activate(ignoringOtherApps: true)
94+
} postAction: {
95+
NSApp.activate(ignoringOtherApps: true)
9196
}
9297
.keyboardShortcut(",")
9398
.padding(.horizontal)
9499
.padding(.vertical, 2)
95100
} else {
96101
Button {
97102
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
103+
NSApp.activate(ignoringOtherApps: true)
98104
} label: {
99105
Label("Preferences", systemImage: "gearshape.fill")
100106
.symbolRenderingMode(.multicolor)

0 commit comments

Comments
 (0)