Skip to content

Commit efbe5f0

Browse files
committed
Rename RecordingFailure to HotkeyRecordingFailure
1 parent d64a383 commit efbe5f0

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Ice.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
170749C82B12078F009DDF73 /* GlobalEventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 170749C72B12078F009DDF73 /* GlobalEventMonitor.swift */; };
1111
170749CA2B1207D9009DDF73 /* UniversalEventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 170749C92B1207D9009DDF73 /* UniversalEventMonitor.swift */; };
12-
170CF88C2B0ED4FA0073F982 /* RecordingFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 170CF88B2B0ED4FA0073F982 /* RecordingFailure.swift */; };
12+
170CF88C2B0ED4FA0073F982 /* HotkeyRecordingFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 170CF88B2B0ED4FA0073F982 /* HotkeyRecordingFailure.swift */; };
1313
170CF88E2B0EDD780073F982 /* LocalizedErrorBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 170CF88D2B0EDD780073F982 /* LocalizedErrorBox.swift */; };
1414
170CF8902B101D980073F982 /* ColorStop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 170CF88F2B101D980073F982 /* ColorStop.swift */; };
1515
1725FC6A2AED973800A59081 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1725FC692AED973800A59081 /* AppState.swift */; };
@@ -85,7 +85,7 @@
8585
/* Begin PBXFileReference section */
8686
170749C72B12078F009DDF73 /* GlobalEventMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlobalEventMonitor.swift; sourceTree = "<group>"; };
8787
170749C92B1207D9009DDF73 /* UniversalEventMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UniversalEventMonitor.swift; sourceTree = "<group>"; };
88-
170CF88B2B0ED4FA0073F982 /* RecordingFailure.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordingFailure.swift; sourceTree = "<group>"; };
88+
170CF88B2B0ED4FA0073F982 /* HotkeyRecordingFailure.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HotkeyRecordingFailure.swift; sourceTree = "<group>"; };
8989
170CF88D2B0EDD780073F982 /* LocalizedErrorBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizedErrorBox.swift; sourceTree = "<group>"; };
9090
170CF88F2B101D980073F982 /* ColorStop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorStop.swift; sourceTree = "<group>"; };
9191
1725FC692AED973800A59081 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };
@@ -176,7 +176,7 @@
176176
children = (
177177
71FEA24F2A8D5D590048341A /* HotkeyRecorder.swift */,
178178
718AFF2B2AB360AD00BC49CB /* HotkeyRecorderModel.swift */,
179-
170CF88B2B0ED4FA0073F982 /* RecordingFailure.swift */,
179+
170CF88B2B0ED4FA0073F982 /* HotkeyRecordingFailure.swift */,
180180
);
181181
path = HotkeyRecorder;
182182
sourceTree = "<group>";
@@ -671,7 +671,7 @@
671671
71D36C4F2A88FE4900D89CD5 /* SettingsWindow.swift in Sources */,
672672
71604D632AAE84ED002FE96F /* ErrorOverlay.swift in Sources */,
673673
1787C4302B16AE78002F50DF /* PermissionsManager.swift in Sources */,
674-
170CF88C2B0ED4FA0073F982 /* RecordingFailure.swift in Sources */,
674+
170CF88C2B0ED4FA0073F982 /* HotkeyRecordingFailure.swift in Sources */,
675675
170CF88E2B0EDD780073F982 /* LocalizedErrorBox.swift in Sources */,
676676
7166832E2A767E6A006ABF84 /* IceApp.swift in Sources */,
677677
1773547B2B1F539A001CF731 /* MenuBarBackingPanel.swift in Sources */,

Ice/Settings/HotkeyRecorder/HotkeyRecorderModel.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import Combine
1010
class HotkeyRecorderModel: ObservableObject {
1111
@Published private(set) var isRecording = false
1212
@Published private(set) var pressedModifierStrings = [String]()
13-
@Published var failure: RecordingFailure?
13+
@Published var failure: HotkeyRecordingFailure?
1414

1515
let section: MenuBarSection?
1616

17-
private let handleFailure: (HotkeyRecorderModel, RecordingFailure) -> Void
17+
private let handleFailure: (HotkeyRecorderModel, HotkeyRecordingFailure) -> Void
1818
private var monitor: LocalEventMonitor?
1919

2020
private var cancellables = Set<AnyCancellable>()

Ice/Settings/HotkeyRecorder/RecordingFailure.swift Ice/Settings/HotkeyRecorder/HotkeyRecordingFailure.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//
2-
// RecordingFailure.swift
2+
// HotkeyRecordingFailure.swift
33
// Ice
44
//
55

66
import Foundation
77

88
/// An error type that describes a recording failure.
9-
enum RecordingFailure: LocalizedError, Hashable {
9+
enum HotkeyRecordingFailure: LocalizedError, Hashable {
1010
/// No modifiers were pressed.
1111
case noModifiers
1212
/// Shift was the only modifier being pressed.

Ice/Settings/SettingsPanes/GeneralSettingsPane.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct GeneralSettingsPane: View {
3737
.scrollContentBackground(.hidden)
3838
.scrollBounceBehavior(.basedOnSize)
3939
.frame(maxHeight: .infinity)
40-
.errorOverlay(for: RecordingFailure.self)
40+
.errorOverlay(for: HotkeyRecordingFailure.self)
4141
.alert(isPresented: $isPresentingError, error: presentedError) {
4242
Button("OK") {
4343
presentedError = nil

0 commit comments

Comments
 (0)