Skip to content

Commit

Permalink
Rename search field components.
Browse files Browse the repository at this point in the history
  • Loading branch information
dyerc committed Mar 11, 2022
1 parent 46ac26c commit 926f4d8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
10 changes: 4 additions & 6 deletions Doughnut.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
6B36624627CFB339008E1CA5 /* NSImage+Tint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B36624527CFB339008E1CA5 /* NSImage+Tint.swift */; };
6B3A75F8278F44F500F25578 /* NSView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B3A75F7278F44F500F25578 /* NSView+Extensions.swift */; };
6B94DF4C278968F500BCB149 /* NSTableView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B94DF4B278968F500BCB149 /* NSTableView+Extensions.swift */; };
6B96F45D27CE6F10001941BA /* PodcastSearchFiled.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B96F45C27CE6F10001941BA /* PodcastSearchFiled.swift */; };
6B96F45D27CE6F10001941BA /* PodcastSearchField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B96F45C27CE6F10001941BA /* PodcastSearchField.swift */; };
6B9C30BB27B5708300D462BE /* BaseTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B9C30BA27B5708300D462BE /* BaseTableView.swift */; };
6B9E154727C9EA5F00C919D5 /* AppIcon_Big_Sur.icns in Resources */ = {isa = PBXBuildFile; fileRef = 6B9E154627C9EA5F00C919D5 /* AppIcon_Big_Sur.icns */; };
6BA21C4F279D690700CD3672 /* WindowController+Toolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BA21C4E279D690700CD3672 /* WindowController+Toolbar.swift */; };
Expand Down Expand Up @@ -108,7 +108,7 @@
6B3ACC982773555700CF1EF1 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = .swiftlint.yml; sourceTree = "<group>"; };
6B730B732767A90900FB5F84 /* Doughnut-Release.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Doughnut-Release.entitlements"; sourceTree = "<group>"; };
6B94DF4B278968F500BCB149 /* NSTableView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSTableView+Extensions.swift"; sourceTree = "<group>"; };
6B96F45C27CE6F10001941BA /* PodcastSearchFiled.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodcastSearchFiled.swift; sourceTree = "<group>"; };
6B96F45C27CE6F10001941BA /* PodcastSearchField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PodcastSearchField.swift; sourceTree = "<group>"; };
6B9C30BA27B5708300D462BE /* BaseTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableView.swift; sourceTree = "<group>"; };
6B9E154627C9EA5F00C919D5 /* AppIcon_Big_Sur.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = AppIcon_Big_Sur.icns; sourceTree = "<group>"; };
6BA21C4E279D690700CD3672 /* WindowController+Toolbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WindowController+Toolbar.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -284,6 +284,7 @@
834998B51FF3E3F00035EF87 /* TaskManagerView.swift */,
830E99BC1FF50DD000B728BE /* ActivityIndicator.swift */,
8389709B20069D720094795D /* SortingMenuProvider.swift */,
6B96F45C27CE6F10001941BA /* PodcastSearchField.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -314,7 +315,6 @@
isa = PBXGroup;
children = (
6B9E154627C9EA5F00C919D5 /* AppIcon_Big_Sur.icns */,
83235C0B2009481200BC356F /* dsa_pub.pem */,
);
path = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -379,7 +379,6 @@
6B0233BC27B2CA6500500E28 /* ControlMenuProvider.swift */,
832A04331F76EBDC00C92D25 /* WindowController.swift */,
6BA21C4E279D690700CD3672 /* WindowController+Toolbar.swift */,
6B96F45C27CE6F10001941BA /* PodcastSearchFiled.swift */,
832BB7511F95184700988AE8 /* Doughnut-Bridging-Header.h */,
838257D11F759F6F00DB4FD1 /* Assets.xcassets */,
831EBAD927CC11E700F212B4 /* Credits.rtf */,
Expand Down Expand Up @@ -610,7 +609,6 @@
6BF126D12780727100D840A4 /* EpisodeInfo.storyboard in Resources */,
831EBADA27CC120000F212B4 /* Credits.rtf in Resources */,
6B9E154727C9EA5F00C919D5 /* AppIcon_Big_Sur.icns in Resources */,
83235C0C2009481400BC356F /* dsa_pub.pem in Resources */,
838257D51F759F6F00DB4FD1 /* Main.storyboard in Resources */,
83235C0D2009502D00BC356F /* Preferences.storyboard in Resources */,
6BF126D32780742600D840A4 /* PodcastInfo.storyboard in Resources */,
Expand Down Expand Up @@ -831,7 +829,7 @@
83235C012009472F00BC356F /* PrefGeneralViewController.swift in Sources */,
83235BFE2009472900BC356F /* Preference.swift in Sources */,
83FB4EB81F7BD9A1001CD842 /* Library.swift in Sources */,
6B96F45D27CE6F10001941BA /* PodcastSearchFiled.swift in Sources */,
6B96F45D27CE6F10001941BA /* PodcastSearchField.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion Doughnut/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ Gw
<constraint firstAttribute="height" constant="1" id="yYT-XN-B8Z"/>
</constraints>
</box>
<searchField wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mtS-jJ-Pmb" customClass="PodcastSearchFiled" customModule="Doughnut" customModuleProvider="target">
<searchField wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mtS-jJ-Pmb" customClass="PodcastSearchField" customModule="Doughnut" customModuleProvider="target">
<rect key="frame" x="30" y="3" width="217" height="22"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" focusRingType="none" placeholderString="Filter" usesSingleLineMode="YES" bezelStyle="round" sendsSearchStringImmediately="YES" maximumRecents="0" id="kGs-iR-hTg">
<font key="font" metaFont="system"/>
Expand Down
6 changes: 3 additions & 3 deletions Doughnut/View Controllers/PodcastViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class PodcastViewController: NSViewController, NSTableViewDelegate, NSTabl

@IBOutlet var sortView: NSView!
@IBOutlet var moreButton: NSButton!
@IBOutlet var searchField: PodcastSearchFiled!
@IBOutlet var searchField: PodcastSearchField!

private var sortingMenuProvider: SortingMenuProvider {
return SortingMenuProvider.Shared.podcasts
Expand Down Expand Up @@ -384,9 +384,9 @@ final class PodcastViewController: NSViewController, NSTableViewDelegate, NSTabl

}

extension PodcastViewController: PodcastSearchFiledDelegate {
extension PodcastViewController: PodcastSearchFieldDelegate {

func podcastSearchFiledDidUpdate(withFilter filter: Filter) {
func podcastSearchFieldDidUpdate(withFilter filter: Filter) {
self.filter = filter
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@

import AppKit

protocol PodcastSearchFiledDelegate: AnyObject {
protocol PodcastSearchFieldDelegate: AnyObject {

func podcastSearchFiledDidUpdate(withFilter filter: PodcastViewController.Filter)
func podcastSearchFieldDidUpdate(withFilter filter: PodcastViewController.Filter)

}

final class PodcastSearchFiled: NSSearchField {
final class PodcastSearchField: NSSearchField {

weak var searchFieldDelegate: PodcastSearchFiledDelegate?
weak var searchFieldDelegate: PodcastSearchFieldDelegate?

private var filter: PodcastViewController.Filter = .all {
didSet {
updateFilteringButtonState()
searchFieldDelegate?.podcastSearchFiledDidUpdate(withFilter: filter)
searchFieldDelegate?.podcastSearchFieldDidUpdate(withFilter: filter)
}
}

Expand Down

0 comments on commit 926f4d8

Please sign in to comment.