mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
v2.11.27
This commit is contained in:
@@ -26,7 +26,7 @@ internal class Portal: NSStackView, Portal_p {
|
||||
}
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.name = module.rawValue
|
||||
self.name = module.stringValue
|
||||
|
||||
super.init(frame: NSRect.zero)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ internal class Settings: NSStackView, Settings_v {
|
||||
private var timeFormat: String = "short"
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
self.numberOfProcesses = Store.shared.int(key: "\(self.title)_processes", defaultValue: self.numberOfProcesses)
|
||||
self.timeFormat = Store.shared.string(key: "\(self.title)_timeFormat", defaultValue: self.timeFormat)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ internal class Settings: NSStackView, Settings_v {
|
||||
private var groupByClustersView: NSSwitch? = nil
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
self.hyperthreadState = Store.shared.bool(key: "\(self.title)_hyperhreading", defaultValue: self.hyperthreadState)
|
||||
self.usagePerCoreState = Store.shared.bool(key: "\(self.title)_usagePerCore", defaultValue: self.usagePerCoreState)
|
||||
self.splitValueState = Store.shared.bool(key: "\(self.title)_splitValue", defaultValue: self.splitValueState)
|
||||
@@ -63,13 +63,6 @@ internal class Settings: NSStackView, Settings_v {
|
||||
public func load(widgets: [widget_t]) {
|
||||
self.subviews.forEach{ $0.removeFromSuperview() }
|
||||
|
||||
var hasIPG = false
|
||||
#if arch(x86_64)
|
||||
let path: CFString = "/Library/Frameworks/IntelPowerGadget.framework" as CFString
|
||||
let bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path, CFURLPathStyle.cfurlposixPathStyle, true)
|
||||
hasIPG = CFBundleCreate(kCFAllocatorDefault, bundleURL) != nil
|
||||
#endif
|
||||
|
||||
self.addArrangedSubview(PreferencesSection([
|
||||
PreferencesRow(localizedString("Update interval"), component: selectView(
|
||||
action: #selector(self.changeUpdateInterval),
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Portal: NSStackView, Portal_p {
|
||||
private var multiplyContainer: ScrollableStackView = ScrollableStackView(orientation: .horizontal)
|
||||
|
||||
init(_ module: ModuleType, list: [Clock_t]) {
|
||||
self.name = module.rawValue
|
||||
self.name = module.stringValue
|
||||
|
||||
super.init(frame: NSRect.zero)
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ internal class Settings: NSStackView, Settings_v, NSTableViewDelegate, NSTableVi
|
||||
private var deleteButton: NSButton? = nil
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
|
||||
super.init(frame: NSRect.zero)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ internal class Settings: NSStackView, Settings_v {
|
||||
private var list: [String] = []
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
|
||||
self.selectedDisk = Store.shared.string(key: "\(self.title)_disk", defaultValue: "")
|
||||
self.removableState = Store.shared.bool(key: "\(self.title)_removable", defaultValue: self.removableState)
|
||||
|
||||
@@ -27,7 +27,7 @@ internal class Settings: NSStackView, Settings_v {
|
||||
private var button: NSPopUpButton?
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
self.selectedGPU = Store.shared.string(key: "\(self.title)_gpu", defaultValue: "")
|
||||
self.updateIntervalValue = Store.shared.int(key: "\(self.title)_updateInterval", defaultValue: self.updateIntervalValue)
|
||||
self.showTypeValue = Store.shared.bool(key: "\(self.title)_showType", defaultValue: self.showTypeValue)
|
||||
|
||||
@@ -86,7 +86,7 @@ internal class Settings: NSStackView, Settings_v, NSTextFieldDelegate {
|
||||
}
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
self.numberOfProcesses = Store.shared.int(key: "\(self.title)_processes", defaultValue: self.numberOfProcesses)
|
||||
self.readerType = Store.shared.string(key: "\(self.title)_reader", defaultValue: self.readerType)
|
||||
self.usageReset = Store.shared.string(key: "\(self.title)_usageReset", defaultValue: self.usageReset)
|
||||
|
||||
@@ -60,7 +60,7 @@ internal class Settings: NSStackView, Settings_v, NSTextFieldDelegate {
|
||||
private let textWidgetHelpPanel: HelpHUD = HelpHUD(textWidgetHelp)
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
self.updateIntervalValue = Store.shared.int(key: "\(self.title)_updateInterval", defaultValue: self.updateIntervalValue)
|
||||
self.updateTopIntervalValue = Store.shared.int(key: "\(self.title)_updateTopInterval", defaultValue: self.updateTopIntervalValue)
|
||||
self.numberOfProcesses = Store.shared.int(key: "\(self.title)_processes", defaultValue: self.numberOfProcesses)
|
||||
|
||||
@@ -25,7 +25,7 @@ public class Portal: NSStackView, Portal_p {
|
||||
}
|
||||
|
||||
init(_ name: ModuleType) {
|
||||
self.name = name.rawValue
|
||||
self.name = name.stringValue
|
||||
|
||||
super.init(frame: NSRect( x: 0, y: 0, width: Constants.Popup.width, height: Constants.Popup.portalHeight))
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ internal class Settings: NSStackView, Settings_v {
|
||||
private var selectedSensor: String = "Average System Total"
|
||||
|
||||
public init(_ module: ModuleType) {
|
||||
self.title = module.rawValue
|
||||
self.title = module.stringValue
|
||||
self.hidState = SystemKit.shared.device.platform == .m1 ? true : false
|
||||
|
||||
super.init(frame: NSRect.zero)
|
||||
|
||||
Reference in New Issue
Block a user