]> git.r.bdr.sh - rbdr/Flat-Bezel.qsplugin/commitdiff
Remove half-swifts
authorRuben Beltran del Rio <redacted>
Fri, 10 Feb 2023 19:01:27 +0000 (20:01 +0100)
committerRuben Beltran del Rio <redacted>
Fri, 10 Feb 2023 19:01:27 +0000 (20:01 +0100)
Flat Bezel.xcodeproj/project.pbxproj
Flat Bezel.xcodeproj/xcshareddata/xcschemes/Flat Bezel.xcscheme
Flat Bezel/FlatBezel-Bridging-Header.h
Flat Bezel/FlatBezelObjectCell.swift [deleted file]
Flat Bezel/FlatBezelSearchObjectView.swift [deleted file]

index adb78ea62d4b863058b6fd04f0db9985331acff7..4ad467799175cded13144baaa964e02388f40144 100644 (file)
@@ -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 = "<group>"; };
                B576D2F42993FBD400A8B645 /* BackgroundView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundView.swift; sourceTree = "<group>"; };
                B576D2F62993FD7500A8B645 /* FlatBezel-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FlatBezel-Bridging-Header.h"; sourceTree = "<group>"; };
-               B57F7B8F299405B7005F64AC /* FlatBezelSearchObjectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlatBezelSearchObjectView.swift; sourceTree = "<group>"; };
-               B57F7B912994063C005F64AC /* FlatBezelObjectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlatBezelObjectCell.swift; sourceTree = "<group>"; };
                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";
                E470B7D61709F3A0000169F2 /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
-                               LastUpgradeCheck = 1120;
+                               LastUpgradeCheck = 1420;
                                ORGANIZATIONNAME = BRNBW;
                                TargetAttributes = {
                                        E470B7DE1709F3A0000169F2 = {
                        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;
                };
                                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;
                                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;
                };
                        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;
                        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;
index 2812b46b530715d8fe15d782d1cf734080705252..3a26b2543739fcbcd972144d5efbf404b561a56d 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "1120"
+   LastUpgradeVersion = "1420"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
index d3e20b0163210f847f48989733f57db568545e67..f41b12ce88e6ac7d7f9e806fc6ca64450d346e72 100644 (file)
@@ -1 +1,2 @@
 #import "Quicksilver.pch"
+#import "BBSearchObjectView.h"
diff --git a/Flat Bezel/FlatBezelObjectCell.swift b/Flat Bezel/FlatBezelObjectCell.swift
deleted file mode 100644 (file)
index 211f332..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-//
-//  FlatBezelObjectCell.swift
-//  Flat Bezel
-//
-//  Created by Ruben Beltran del Rio on 2/8/23.
-//  Copyright © 2023 BRNBW. All rights reserved.
-//
-/*
-import Foundation
-import Cocoa
-
-class FlatBezelObjectCell: QSObjectCell {
-  let preferredImagePosition: NSControl.ImagePosition = .imageAbove
-  
-  override func draw(withFrame cellFrame: NSRect, in controlView: NSView!) {
-    let isFirstResponder = controlView.window?.firstResponder == controlView && !controlView.isKind(of: NSTableView.self)
-    
-    let dropTarget = self.isHighlighted && self.highlightsBy.contains(NSCell.StyleMask.changeBackgroundCellMask) && !self.isBezeled
-    
-    var fillColor: NSColor = self.backgroundColor ?? .textBackgroundColor
-    if (isFirstResponder) {
-      fillColor = self.highlightColor()
-    }
-    if (dropTarget) {
-      fillColor = NSColor(red: 0.77, green: 0.91, blue: 0.96, alpha: 1)
-    }
-    
-    var strokeColor: NSColor = .clear
-    
-    fillColor.setFill()
-    strokeColor.setStroke()
-    
-    let roundRect = NSBezierPath()
-    roundRect.appendRoundedRect(cellFrame, xRadius: cellRadiusFactor(), yRadius: cellRadiusFactor())
-    roundRect.fill()
-    
-    self.drawInterior(withFrame: self.drawingRect(forBounds: cellFrame), in: controlView)
-  }
-  
-  override func titleRect(forBounds rect: NSRect) -> 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<NSIndexSet?>? = 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<count; i += j) {
-      for (j = 1; i+j<count && hits[i+j-1] +1 == hits[i+j]; j++);
-      [titleString addAttributes:attributes range:NSMakeRange(hits[i], j)];
-    }
-  } else {
-    [titleString addAttribute:NSBaselineOffsetAttributeName value:[NSNumber numberWithDouble:-1.0] range:NSMakeRange(0, [titleString length])];
-  }
-
-  if (showDetails) {
-    NSString *detailsString = [drawObject details];
-    
-    NSRange returnRange = [detailsString rangeOfString:@"\n"];
-    if (returnRange.location != NSNotFound) {
-      detailsString = [detailsString substringToIndex:returnRange.location];
-    }
-
-    detailsAttributes = [detailsAttributes mutableCopy];
-    [detailsAttributes setValue:[NSColor grayColor] forKey:NSForegroundColorAttributeName];
-    
-    if (detailsString && detailsString.length && ![detailsString isEqualToString:nameString]) {
-      [titleString appendAttributedString:[[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"\n%@",detailsString] attributes:detailsAttributes] autorelease]];
-    }
-  }
-
-  NSRect centerRect = rectFromSize([titleString size]);
-  centerRect.size.width = NSWidth(textDrawRect);
-  centerRect.size.height = MIN(NSHeight(textDrawRect), centerRect.size.height);
-  [titleString drawInRect:centerRectInRect(centerRect, textDrawRect)];
-}
-
-@end
-*/
diff --git a/Flat Bezel/FlatBezelSearchObjectView.swift b/Flat Bezel/FlatBezelSearchObjectView.swift
deleted file mode 100644 (file)
index fdd88d5..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-//  SearchObjectView.swift
-//  Flat Bezel
-//
-//  Created by Ruben Beltran del Rio on 2/8/23.
-//  Copyright © 2023 BRNBW. All rights reserved.
-//
-/*
-import Foundation
-
-class FlatBezelSearchObjectView: QSSearchObjectView {
-  static func cellClass() -> AnyClass {
-    return FlatBezelObjectCell.self
-  }
-}
-*/