diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6c4d1a15..0e826b61 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,7 +14,7 @@ concurrency: jobs: build: - runs-on: macos-latest + runs-on: macos-15 steps: - uses: actions/checkout@v4 diff --git a/Kit/constants.swift b/Kit/constants.swift index 83f53c07..9ce1f6d6 100644 --- a/Kit/constants.swift +++ b/Kit/constants.swift @@ -69,7 +69,7 @@ public enum ModuleType: Int { case combined - public var rawValue: String { + public var stringValue: String { switch self { case .CPU: return "CPU" case .RAM: return "RAM" diff --git a/Kit/module/notifications.swift b/Kit/module/notifications.swift index faee1f38..ebe7a98e 100644 --- a/Kit/module/notifications.swift +++ b/Kit/module/notifications.swift @@ -18,7 +18,7 @@ open class NotificationsWrapper: NSStackView { private var ids: [String: Bool?] = [:] public init(_ module: ModuleType, _ ids: [String] = []) { - self.module = module.rawValue + self.module = module.stringValue super.init(frame: NSRect.zero) self.initIDs(ids) diff --git a/Kit/module/popup.swift b/Kit/module/popup.swift index a3167246..d0ee6479 100644 --- a/Kit/module/popup.swift +++ b/Kit/module/popup.swift @@ -28,8 +28,8 @@ open class PopupWrapper: NSStackView, Popup_p { open var sizeCallback: ((NSSize) -> Void)? = nil public init(_ typ: ModuleType, frame: NSRect) { - self.title = typ.rawValue - self.keyboardShortcut = Store.shared.array(key: "\(typ.rawValue)_popup_keyboardShortcut", defaultValue: []) as? [UInt16] ?? [] + self.title = typ.stringValue + self.keyboardShortcut = Store.shared.array(key: "\(typ.stringValue)_popup_keyboardShortcut", defaultValue: []) as? [UInt16] ?? [] super.init(frame: frame) } diff --git a/Kit/module/portal.swift b/Kit/module/portal.swift index b3053044..d40c1899 100644 --- a/Kit/module/portal.swift +++ b/Kit/module/portal.swift @@ -20,8 +20,8 @@ open class PortalWrapper: NSStackView, Portal_p { private let header: PortalHeader public init(_ type: ModuleType, height: CGFloat = Constants.Popup.portalHeight) { - self.name = type.rawValue - self.header = PortalHeader(type.rawValue) + self.name = type.stringValue + self.header = PortalHeader(type.stringValue) super.init(frame: NSRect(x: 0, y: 0, width: Constants.Popup.width, height: height)) diff --git a/Kit/module/reader.swift b/Kit/module/reader.swift index c95d8800..8a12d6a8 100644 --- a/Kit/module/reader.swift +++ b/Kit/module/reader.swift @@ -75,8 +75,8 @@ open class Reader: NSObject, ReaderInternal_p { self.callbackHandler = callback super.init() - DB.shared.setup(T.self, "\(module.rawValue)@\(self.name)") - if let lastValue = DB.shared.findOne(T.self, key: "\(module.rawValue)@\(self.name)") { + DB.shared.setup(T.self, "\(module.stringValue)@\(self.name)") + if let lastValue = DB.shared.findOne(T.self, key: "\(module.stringValue)@\(self.name)") { self.value = lastValue callback(lastValue) } @@ -86,7 +86,7 @@ open class Reader: NSObject, ReaderInternal_p { } deinit { - DB.shared.insert(key: "\(self.module.rawValue)@\(self.name)", value: self.value, ts: self.history) + DB.shared.insert(key: "\(self.module.stringValue)@\(self.name)", value: self.value, ts: self.history) } public func initStoreValues(title: String) { @@ -102,10 +102,10 @@ open class Reader: NSObject, ReaderInternal_p { if let value { self.callbackHandler(value) if let ts = self.lastDBWrite, let interval = self.interval, Date().timeIntervalSince(ts) > interval * 10 { - DB.shared.insert(key: "\(self.module.rawValue)@\(self.name)", value: value, ts: self.history) + DB.shared.insert(key: "\(self.module.stringValue)@\(self.name)", value: value, ts: self.history) self.lastDBWrite = Date() } else if self.lastDBWrite == nil { - DB.shared.insert(key: "\(self.module.rawValue)@\(self.name)", value: value, ts: self.history) + DB.shared.insert(key: "\(self.module.stringValue)@\(self.name)", value: value, ts: self.history) self.lastDBWrite = Date() } } @@ -162,7 +162,7 @@ open class Reader: NSObject, ReaderInternal_p { } public func save(_ value: T) { - DB.shared.insert(key: "\(self.module.rawValue)@\(self.name)", value: value, ts: self.history, force: true) + DB.shared.insert(key: "\(self.module.stringValue)@\(self.name)", value: value, ts: self.history, force: true) } } diff --git a/Modules/Battery/portal.swift b/Modules/Battery/portal.swift index 39eae2e5..b366efd7 100644 --- a/Modules/Battery/portal.swift +++ b/Modules/Battery/portal.swift @@ -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) diff --git a/Modules/Battery/settings.swift b/Modules/Battery/settings.swift index fc2ed593..8235a072 100644 --- a/Modules/Battery/settings.swift +++ b/Modules/Battery/settings.swift @@ -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) diff --git a/Modules/CPU/settings.swift b/Modules/CPU/settings.swift index 4720d06e..08d353af 100644 --- a/Modules/CPU/settings.swift +++ b/Modules/CPU/settings.swift @@ -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), diff --git a/Modules/Clock/portal.swift b/Modules/Clock/portal.swift index f5aa3f67..cd88681e 100644 --- a/Modules/Clock/portal.swift +++ b/Modules/Clock/portal.swift @@ -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) diff --git a/Modules/Clock/settings.swift b/Modules/Clock/settings.swift index 54e006de..56dc3a74 100644 --- a/Modules/Clock/settings.swift +++ b/Modules/Clock/settings.swift @@ -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) diff --git a/Modules/Disk/settings.swift b/Modules/Disk/settings.swift index e09d4b37..d3dd0e37 100644 --- a/Modules/Disk/settings.swift +++ b/Modules/Disk/settings.swift @@ -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) diff --git a/Modules/GPU/settings.swift b/Modules/GPU/settings.swift index 37e5184d..0d1c622b 100644 --- a/Modules/GPU/settings.swift +++ b/Modules/GPU/settings.swift @@ -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) diff --git a/Modules/Net/settings.swift b/Modules/Net/settings.swift index 80a9320d..ed3beea4 100644 --- a/Modules/Net/settings.swift +++ b/Modules/Net/settings.swift @@ -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) diff --git a/Modules/RAM/settings.swift b/Modules/RAM/settings.swift index 878ccf0c..c97fab21 100644 --- a/Modules/RAM/settings.swift +++ b/Modules/RAM/settings.swift @@ -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) diff --git a/Modules/Sensors/portal.swift b/Modules/Sensors/portal.swift index d09067c0..9f7670c9 100644 --- a/Modules/Sensors/portal.swift +++ b/Modules/Sensors/portal.swift @@ -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)) diff --git a/Modules/Sensors/settings.swift b/Modules/Sensors/settings.swift index e7f377af..1b5aec5e 100644 --- a/Modules/Sensors/settings.swift +++ b/Modules/Sensors/settings.swift @@ -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) diff --git a/Stats.xcodeproj/project.pbxproj b/Stats.xcodeproj/project.pbxproj index cb7e6272..c006450a 100644 --- a/Stats.xcodeproj/project.pbxproj +++ b/Stats.xcodeproj/project.pbxproj @@ -2861,7 +2861,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 2.11.26; + MARKETING_VERSION = 2.11.27; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2898,7 +2898,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.15; - MARKETING_VERSION = 2.11.26; + MARKETING_VERSION = 2.11.27; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Stats/Supporting Files/Info.plist b/Stats/Supporting Files/Info.plist index d1e04043..23b02d4c 100755 --- a/Stats/Supporting Files/Info.plist +++ b/Stats/Supporting Files/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 662 + 668 Description Simple macOS system monitor in your menu bar LSApplicationCategoryType diff --git a/Stats/Supporting Files/pl.lproj/Localizable.strings b/Stats/Supporting Files/pl.lproj/Localizable.strings index fcd9342a..e5265b11 100644 --- a/Stats/Supporting Files/pl.lproj/Localizable.strings +++ b/Stats/Supporting Files/pl.lproj/Localizable.strings @@ -75,7 +75,7 @@ "Name" = "Nazwa"; "Format" = "Format"; "Turn off" = "Wyłączyć"; -"Normal" = "Normal"; +"Normal" = "Normalny"; "Warning" = "Ostrzeżenie"; "Critical" = "Krytyczny"; "Usage" = "Wykorzystanie"; @@ -195,7 +195,7 @@ "Static width" = "Statyczna szerokość"; "Tachometer widget" = "Tachometr"; "State widget" = "Stan"; -"Text widget" = "Text widget"; +"Text widget" = "Tekst"; "Show symbols" = "Pokaż symbole"; "Label widget" = "Etykieta"; "Number of reads in the chart" = "Liczba odczytów na wykresie"; @@ -328,7 +328,7 @@ "Write speed" = "Zapis"; "Read speed" = "Odczyt"; "Drives" = "Dyski"; -"SMART data" = "SMART data"; +"SMART data" = "SMART dane"; // Sensors "Temperature unit" = "Jednostka temperatury"; @@ -394,7 +394,7 @@ "Latency" = "Opóźnienie"; "Upload speed" = "Wysyłka"; "Download speed" = "Pobranie"; -"Address" = "Address"; +"Address" = "Adres"; // Battery "Level" = "Poziom naładowania"; diff --git a/Stats/Supporting Files/ru.lproj/Localizable.strings b/Stats/Supporting Files/ru.lproj/Localizable.strings index 2fe08875..138b4c26 100644 --- a/Stats/Supporting Files/ru.lproj/Localizable.strings +++ b/Stats/Supporting Files/ru.lproj/Localizable.strings @@ -75,7 +75,7 @@ "Name" = "Название"; "Format" = "Формат"; "Turn off" = "Выключить"; -"Normal" = "Normal"; +"Normal" = "Нормальный"; "Warning" = "Предупреждение"; "Critical" = "Критический"; "Usage" = "Использование"; @@ -195,7 +195,7 @@ "Static width" = "Статическая ширина"; "Tachometer widget" = "Тахометр"; "State widget" = "Состояние"; -"Text widget" = "Text widget"; +"Text widget" = "Текст"; "Show symbols" = "Показать символы"; "Label widget" = "Этикетка"; "Number of reads in the chart" = "Количество чтений на графике"; @@ -328,7 +328,7 @@ "Write speed" = "Запись"; "Read speed" = "Чтение"; "Drives" = "Диски"; -"SMART data" = "SMART data"; +"SMART data" = "SMART данные"; // Sensors "Temperature unit" = "Единица измерения температуры"; @@ -394,7 +394,7 @@ "Latency" = "Задержка"; "Upload speed" = "Выгрузка"; "Download speed" = "Загрузка"; -"Address" = "Address"; +"Address" = "Адрес"; // Battery "Level" = "Уровень заряда"; diff --git a/Stats/Supporting Files/uk.lproj/Localizable.strings b/Stats/Supporting Files/uk.lproj/Localizable.strings index e38bed5e..cd4a2fd1 100644 --- a/Stats/Supporting Files/uk.lproj/Localizable.strings +++ b/Stats/Supporting Files/uk.lproj/Localizable.strings @@ -75,7 +75,7 @@ "Name" = "Назва"; "Format" = "Формат"; "Turn off" = "Вимкнути"; -"Normal" = "Normal"; +"Normal" = "Нормальний"; "Warning" = "Попереджнння"; "Critical" = "Критичний"; "Usage" = "Використання"; @@ -195,7 +195,7 @@ "Static width" = "Статична ширина"; "Tachometer widget" = "Тахометр"; "State widget" = "Стан"; -"Text widget" = "Text widget"; +"Text widget" = "Текст"; "Show symbols" = "Показати символи"; "Label widget" = "Етикетка"; "Number of reads in the chart" = "Кількість зчитувань на діаграмі"; @@ -328,7 +328,7 @@ "Write speed" = "Запис"; "Read speed" = "Зчитування"; "Drives" = "Диски"; -"SMART data" = "SMART data"; +"SMART data" = "SMART дані"; // Sensors "Temperature unit" = "Одиниця виміру температури"; @@ -394,7 +394,7 @@ "Latency" = "Затримка"; "Upload speed" = "Висилання"; "Download speed" = "Завантаження"; -"Address" = "Address"; +"Address" = "Адреса"; // Battery "Level" = "Рівень заряду"; diff --git a/Widgets/Supporting Files/Info.plist b/Widgets/Supporting Files/Info.plist index ad882593..aa019b1b 100644 --- a/Widgets/Supporting Files/Info.plist +++ b/Widgets/Supporting Files/Info.plist @@ -11,9 +11,9 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleShortVersionString - 2.11.26 + 2.11.27 CFBundleVersion - 662 + 668 NSExtension NSExtensionPointIdentifier