diff --git a/.travis.yml b/.travis.yml index 0f9a781..fdd3af9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode10.3 +osx_image: xcode11 language: objective-c before_install: diff --git a/Gemfile b/Gemfile index 0f5107e..62f77a0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'cocoapods', '~> 1.6.0.beta.2' +gem 'cocoapods', '~> 1.9.1' diff --git a/Gray.xcodeproj/project.pbxproj b/Gray.xcodeproj/project.pbxproj index 71dec9c..0946b51 100644 --- a/Gray.xcodeproj/project.pbxproj +++ b/Gray.xcodeproj/project.pbxproj @@ -722,7 +722,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 0.15.0; + MARKETING_VERSION = 0.16.1; PRODUCT_BUNDLE_IDENTIFIER = com.zenangst.Gray; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; @@ -745,7 +745,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 0.15.0; + MARKETING_VERSION = 0.16.1; PRODUCT_BUNDLE_IDENTIFIER = com.zenangst.Gray; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; diff --git a/Podfile b/Podfile index f9dc876..18003a9 100644 --- a/Podfile +++ b/Podfile @@ -2,7 +2,7 @@ source 'https://github.com/CocoaPods/Specs.git' platform :macos, '10.14' # Frameworks -pod 'Blueprints' +pod 'Blueprints', git: 'https://github.com/zenangst/Blueprints.git', branch: 'feature/preferred-layout-attributes' pod 'Differific' pod 'Family' pod 'UserInterface' diff --git a/Podfile.lock b/Podfile.lock index c442596..ccb5d20 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,32 +1,41 @@ PODS: - Blueprints (0.13.1) - Differific (0.8.2) - - Family (0.22.4) + - Family (0.22.11) - Sourcery (0.17.0) - UserInterface (0.5.0) DEPENDENCIES: - - Blueprints + - "Blueprints (from `git@github.com:zenangst/Blueprints.git`, branch `feature/preferred-layout-attributes`)" - Differific - Family - Sourcery - UserInterface SPEC REPOS: - https://github.com/CocoaPods/Specs: - - Blueprints + https://github.com/CocoaPods/Specs.git: - Differific - Family - Sourcery - UserInterface +EXTERNAL SOURCES: + Blueprints: + :branch: feature/preferred-layout-attributes + :git: "git@github.com:zenangst/Blueprints.git" + +CHECKOUT OPTIONS: + Blueprints: + :commit: 6719ed1aba5cfca311ae04d1035832755116dfc0 + :git: "git@github.com:zenangst/Blueprints.git" + SPEC CHECKSUMS: Blueprints: ddd6ab1e455c98471aaef2fdd0b09b5f9b53af5b Differific: c3840b9e4d1ee2216b2c0054c270e4a616df9327 - Family: 0dffb3c3ec36b85a599e43b9aa3d8cefeef81873 + Family: d380fa14141faf72359813338ee64ef93920f326 Sourcery: 3ed61be7c8a1218fce349266139379dba477efe0 UserInterface: 54e15db9aceaec2b9686d00f471adb15d2598ea3 -PODFILE CHECKSUM: 9a4a4208e8595d7fa51cbc758521284dec9359cc +PODFILE CHECKSUM: 2c8c2d81b994943738c4544119e5d29b6bb5f0fe -COCOAPODS: 1.8.3 +COCOAPODS: 1.9.1 diff --git a/Resources/Base.lproj/MainMenu.xib b/Resources/Base.lproj/MainMenu.xib index dc0f3f0..53379dd 100644 --- a/Resources/Base.lproj/MainMenu.xib +++ b/Resources/Base.lproj/MainMenu.xib @@ -1,8 +1,8 @@ - + - + @@ -80,6 +80,24 @@ + + + + + + + + + + + + + + + + + + @@ -110,7 +128,7 @@ - + @@ -128,8 +146,8 @@ - - + + @@ -159,5 +177,19 @@ + + + + + + + + + + + + + + diff --git a/Sources/Features/Applications/Application.swift b/Sources/Features/Applications/Application.swift index be0f530..f280ffb 100644 --- a/Sources/Features/Applications/Application.swift +++ b/Sources/Features/Applications/Application.swift @@ -14,4 +14,5 @@ struct Application: Hashable { let preferencesUrl: URL let appearance: Appearance let restricted: Bool + var localizedName: String? } diff --git a/Sources/Features/Applications/ApplicationGridView.swift b/Sources/Features/Applications/ApplicationGridView.swift index e09a813..10521ca 100644 --- a/Sources/Features/Applications/ApplicationGridView.swift +++ b/Sources/Features/Applications/ApplicationGridView.swift @@ -15,7 +15,7 @@ class ApplicationGridView: NSCollectionViewItem, CollectionViewItemComponent, Ap // sourcery: $RawBinding = "iconStore.loadIcon(for: model.application) { image in view.iconView.image = image }" lazy var iconView = NSImageView() - // sourcery: let title: String = "titleLabel.stringValue = model.title" + // sourcery: let title: String = "titleLabel.stringValue = model.application.localizedName ?? model.title" lazy var titleLabel = NSTextField() // sourcery: let subtitle: String = "subtitleLabel.stringValue = model.subtitle" lazy var subtitleLabel = NSTextField() diff --git a/Sources/Features/Applications/ApplicationListView.swift b/Sources/Features/Applications/ApplicationListView.swift index 1b8811d..a702485 100644 --- a/Sources/Features/Applications/ApplicationListView.swift +++ b/Sources/Features/Applications/ApplicationListView.swift @@ -14,7 +14,7 @@ class ApplicationListView: NSCollectionViewItem, CollectionViewItemComponent, Ap // sourcery: $RawBinding = "iconStore.loadIcon(for: model.application) { image in view.iconView.image = image }" lazy var iconView: NSImageView = .init() - // sourcery: let title: String = "titleLabel.stringValue = model.title" + // sourcery: let title: String = "titleLabel.stringValue = model.application.localizedName ?? model.title" lazy var titleLabel: NSTextField = .init() // sourcery: let subtitle: String = "subtitleLabel.stringValue = model.subtitle" lazy var subtitleLabel: NSTextField = .init() diff --git a/Sources/Features/Applications/ApplicationsFeatureViewController.swift b/Sources/Features/Applications/ApplicationsFeatureViewController.swift index d2fd839..b06dcc7 100644 --- a/Sources/Features/Applications/ApplicationsFeatureViewController.swift +++ b/Sources/Features/Applications/ApplicationsFeatureViewController.swift @@ -113,7 +113,9 @@ ApplicationGridViewDelegate, ApplicationsLogicControllerDelegate, ApplicationLis case 0: filtered = applicationCache default: - filtered = applicationCache.filter({ $0.name.lowercased().contains(query) }) + filtered = applicationCache.filter({ + return ($0.localizedName ?? $0.name).lowercased().contains(query) + }) } switch mode { diff --git a/Sources/Features/Applications/ApplicationsLogicController.swift b/Sources/Features/Applications/ApplicationsLogicController.swift index 56d2f7e..32e40a1 100644 --- a/Sources/Features/Applications/ApplicationsLogicController.swift +++ b/Sources/Features/Applications/ApplicationsLogicController.swift @@ -210,13 +210,15 @@ class ApplicationsLogicController { metadata = "🔐 Locked".localized } - let application = Application(bundleIdentifier: bundleIdentifier, + var application = Application(bundleIdentifier: bundleIdentifier, name: bundleName, metadata: metadata, url: url, preferencesUrl: resolvedAppPreferenceUrl, appearance: appearance, restricted: restricted) + application.localizedName = FileManager.default.displayName(atPath: application.url.path) + DispatchQueue.main.async { [weak self] in guard let strongSelf = self else { return } strongSelf.delegate?.applicationsLogicController(strongSelf, didLoadApplication: application, offset: offset, total: total) diff --git a/Voodoo/Output/CollectionViewItemComponent-macOS.generated.swift b/Voodoo/Output/CollectionViewItemComponent-macOS.generated.swift index c30f5b4..6a0ab9d 100644 --- a/Voodoo/Output/CollectionViewItemComponent-macOS.generated.swift +++ b/Voodoo/Output/CollectionViewItemComponent-macOS.generated.swift @@ -124,7 +124,7 @@ class ApplicationGridDataSource: NSObject, NSCollectionViewDataSource { if let view = item as? ApplicationGridView { view.currentAppearance = model.application.appearance iconStore.loadIcon(for: model.application) { image in view.iconView.image = image } - view.titleLabel.stringValue = model.title + view.titleLabel.stringValue = model.application.localizedName ?? model.title view.subtitleLabel.stringValue = model.subtitle } @@ -258,7 +258,7 @@ class ApplicationListDataSource: NSObject, NSCollectionViewDataSource { if let view = item as? ApplicationListView { view.currentAppearance = model.application.appearance iconStore.loadIcon(for: model.application) { image in view.iconView.image = image } - view.titleLabel.stringValue = model.title + view.titleLabel.stringValue = model.application.localizedName ?? model.title view.subtitleLabel.stringValue = model.subtitle }