From: Ruben Beltran del Rio Date: Fri, 10 Feb 2023 19:01:27 +0000 (+0100) Subject: Remove half-swifts X-Git-Tag: 1.0.0~3 X-Git-Url: https://git.r.bdr.sh/rbdr/Flat-Bezel.qsplugin/commitdiff_plain/285ac7c2364f90a6bfc7853e25ec7f592d2009bc Remove half-swifts --- diff --git a/Flat Bezel.xcodeproj/project.pbxproj b/Flat Bezel.xcodeproj/project.pbxproj index adb78ea..4ad4677 100644 --- a/Flat Bezel.xcodeproj/project.pbxproj +++ b/Flat Bezel.xcodeproj/project.pbxproj @@ -10,8 +10,6 @@ 42447D7D19407DA00077B4B2 /* BBSearchObjectView.m in Sources */ = {isa = PBXBuildFile; fileRef = 42447D7C19407DA00077B4B2 /* BBSearchObjectView.m */; }; 42663058193CC1FA00C0DD31 /* BBFlatBezelInterface.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42663057193CC1FA00C0DD31 /* BBFlatBezelInterface.xib */; }; B576D2F52993FBD400A8B645 /* BackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B576D2F42993FBD400A8B645 /* BackgroundView.swift */; }; - B57F7B90299405B7005F64AC /* FlatBezelSearchObjectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B57F7B8F299405B7005F64AC /* FlatBezelSearchObjectView.swift */; }; - B57F7B922994063C005F64AC /* FlatBezelObjectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B57F7B912994063C005F64AC /* FlatBezelObjectCell.swift */; }; E470B7E31709F3A0000169F2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E470B7E21709F3A0000169F2 /* Cocoa.framework */; }; E470B7E91709F3A0000169F2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = E470B7E71709F3A0000169F2 /* InfoPlist.strings */; }; E470B7F81709F3A0000169F2 /* BBFlatBezelInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = E470B7F71709F3A0000169F2 /* BBFlatBezelInterface.m */; }; @@ -23,8 +21,6 @@ 42663057193CC1FA00C0DD31 /* BBFlatBezelInterface.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BBFlatBezelInterface.xib; sourceTree = ""; }; B576D2F42993FBD400A8B645 /* BackgroundView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundView.swift; sourceTree = ""; }; B576D2F62993FD7500A8B645 /* FlatBezel-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FlatBezel-Bridging-Header.h"; sourceTree = ""; }; - B57F7B8F299405B7005F64AC /* FlatBezelSearchObjectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlatBezelSearchObjectView.swift; sourceTree = ""; }; - B57F7B912994063C005F64AC /* FlatBezelObjectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlatBezelObjectCell.swift; sourceTree = ""; }; E470B7DF1709F3A0000169F2 /* Flat Bezel.qsplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Flat Bezel.qsplugin"; sourceTree = BUILT_PRODUCTS_DIR; }; E470B7E21709F3A0000169F2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; E470B7E61709F3A0000169F2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; @@ -86,8 +82,6 @@ E470B7F61709F3A0000169F2 /* BBFlatBezelInterface.h */, E470B7F71709F3A0000169F2 /* BBFlatBezelInterface.m */, 42663057193CC1FA00C0DD31 /* BBFlatBezelInterface.xib */, - B57F7B8F299405B7005F64AC /* FlatBezelSearchObjectView.swift */, - B57F7B912994063C005F64AC /* FlatBezelObjectCell.swift */, B576D2F42993FBD400A8B645 /* BackgroundView.swift */, ); path = "Flat Bezel"; @@ -144,7 +138,7 @@ E470B7D61709F3A0000169F2 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1120; + LastUpgradeCheck = 1420; ORGANIZATIONNAME = BRNBW; TargetAttributes = { E470B7DE1709F3A0000169F2 = { @@ -205,10 +199,8 @@ buildActionMask = 2147483647; files = ( B576D2F52993FBD400A8B645 /* BackgroundView.swift in Sources */, - B57F7B90299405B7005F64AC /* FlatBezelSearchObjectView.swift in Sources */, 42447D7D19407DA00077B4B2 /* BBSearchObjectView.m in Sources */, E470B7F81709F3A0000169F2 /* BBFlatBezelInterface.m in Sources */, - B57F7B922994063C005F64AC /* FlatBezelObjectCell.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -238,10 +230,12 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; + DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; @@ -260,12 +254,15 @@ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; + DEAD_CODE_STRIPPING = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; + SWIFT_COMPILATION_MODE = wholemodule; }; name = Release; }; @@ -275,6 +272,7 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; + DEAD_CODE_STRIPPING = YES; DEFINES_MODULE = YES; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 12.0; @@ -292,6 +290,7 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_WEAK = YES; + DEAD_CODE_STRIPPING = YES; DEFINES_MODULE = YES; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 12.0; diff --git a/Flat Bezel.xcodeproj/xcshareddata/xcschemes/Flat Bezel.xcscheme b/Flat Bezel.xcodeproj/xcshareddata/xcschemes/Flat Bezel.xcscheme index 2812b46..3a26b25 100644 --- a/Flat Bezel.xcodeproj/xcshareddata/xcschemes/Flat Bezel.xcscheme +++ b/Flat Bezel.xcodeproj/xcshareddata/xcschemes/Flat Bezel.xcscheme @@ -1,6 +1,6 @@ NSRect { - super.titleRect(forBounds: rect.offsetBy(dx: 0, dy: -4)) - } - - override func drawText(for drawObject: QSObject!, withFrame cellFrame: NSRect, in controlView: NSView!) { - if self.imagePosition == .imageOnly { - return; - } - - var abbrString: String? = nil - if controlView.responds(to: #selector(QSSearchObjectView.matchedString)) { - abbrString = (controlView as! QSSearchObjectView).matchedString() - } - - var nameString: String? = drawObject.displayName() - var hitMask: AutoreleasingUnsafeMutablePointer? = nil - - var ranker = drawObject.ranker() - if let ranker, let abbrString { - nameString = ranker.matchedString(forAbbreviation: abbrString, hitmask: hitMask, inContext: nil) - } - - var rankedStringIsName = nameString == drawObject.displayName() - if nameString == nil { - nameString = drawObject.identifier() ?? "Unknown" - } - - var useAlternateColor = false - if let controlView = controlView as? NSTableView { - useAlternateColor = controlView.isRowSelected(controlView.row(at: cellFrame.origin)) - } - - var mainColor: NSColor? = textColor() - if mainColor == nil { - mainColor = useAlternateColor ? .alternateSelectedControlTextColor : .controlTextColor - } - - var fadedColor = mainColor!.withAlphaComponent(0.50) - var textDrawRect = titleRect(forBounds: cellFrame) - - var titleString = NSMutableAttributedString(string: nameString!) - titleString.setAttributes(rankedStringIsName ? nameAttributes : detailAttributes, range: NSMakeRange(0, titleString.length)) - - if abbrString != nil && abbrString!.hasPrefix("QSActionMnemonic") { - titleString.addAttribute(.foregroundColor, value: rankedStringIsName ? fadedColor : fadedColor.withAlphaComponent(0.8), range: NSMakeRange(0, titleString.length)) - } else { - var i = 0 - var j = 0 - var hits: [Int] = [] - count = hitMask?. - } - } -} - - - NSUInteger i = 0; - NSUInteger j = 0; - NSUInteger hits[[titleString length]]; - NSUInteger count = [hitMask getIndexes:(NSUInteger *)&hits maxCount:[titleString length] inIndexRange:nil]; - NSDictionary *attributes = @{ - NSForegroundColorAttributeName: rankedStringIsName ? mainColor : fadedColor - }; - for(i = 0; i AnyClass { - return FlatBezelObjectCell.self - } -} -*/