Browse Source

Minor renaming.

pull/113/head
Abhishek 3 years ago
parent
commit
127a1eb8cb
  1. 8
      Clocker/Clocker.xcodeproj/project.pbxproj
  2. 4
      Clocker/ClockerUnitTests/StandardMenubarHandlerTests.swift
  3. 2
      Clocker/Panel/ParentPanelController.swift
  4. 2
      Clocker/Preferences/General/PreferencesViewController.swift
  5. 2
      Clocker/Preferences/Menu Bar/MenubarTitleProvider.swift
  6. 2
      Clocker/Preferences/Menu Bar/StatusItemHandler.swift

8
Clocker/Clocker.xcodeproj/project.pbxproj

@ -7,7 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
3508CC942599FFEC000E3530 /* MenubarHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3508CC932599FFEC000E3530 /* MenubarHandler.swift */; };
3508CC942599FFEC000E3530 /* MenubarTitleProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3508CC932599FFEC000E3530 /* MenubarTitleProvider.swift */; };
3508CC9A259A0001000E3530 /* StatusItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3508CC99259A0001000E3530 /* StatusItemView.swift */; };
3508CC9F259A000E000E3530 /* StatusItemHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3508CC9E259A000E000E3530 /* StatusItemHandler.swift */; };
3508CCAA259A0027000E3530 /* StatusContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3508CCA9259A0027000E3530 /* StatusContainerView.swift */; };
@ -255,7 +255,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
3508CC932599FFEC000E3530 /* MenubarHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenubarHandler.swift; sourceTree = "<group>"; };
3508CC932599FFEC000E3530 /* MenubarTitleProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenubarTitleProvider.swift; sourceTree = "<group>"; };
3508CC99259A0001000E3530 /* StatusItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusItemView.swift; sourceTree = "<group>"; };
3508CC9E259A000E000E3530 /* StatusItemHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusItemHandler.swift; sourceTree = "<group>"; };
3508CCA9259A0027000E3530 /* StatusContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusContainerView.swift; sourceTree = "<group>"; };
@ -568,7 +568,7 @@
35C36EDF22595D9C002FA5C6 /* Menu Bar */ = {
isa = PBXGroup;
children = (
3508CC932599FFEC000E3530 /* MenubarHandler.swift */,
3508CC932599FFEC000E3530 /* MenubarTitleProvider.swift */,
3508CC99259A0001000E3530 /* StatusItemView.swift */,
3508CC9E259A000E000E3530 /* StatusItemHandler.swift */,
3508CCA9259A0027000E3530 /* StatusContainerView.swift */,
@ -1317,7 +1317,7 @@
35C36F4F2259D981002FA5C6 /* AppDefaults.swift in Sources */,
35C36F5D2259DD96002FA5C6 /* TimezoneDataOperations.swift in Sources */,
3548C45D26BEEF4C00AFB533 /* ParentPanelController+UpcomingEvents.swift in Sources */,
3508CC942599FFEC000E3530 /* MenubarHandler.swift in Sources */,
3508CC942599FFEC000E3530 /* MenubarTitleProvider.swift in Sources */,
35C36F14225961DA002FA5C6 /* Integer+DateTools.swift in Sources */,
35C36FA22259ED6D002FA5C6 /* RemindersHandler.swift in Sources */,
35C36F622259DE67002FA5C6 /* NotesPopover.swift in Sources */,

4
Clocker/ClockerUnitTests/StandardMenubarHandlerTests.swift

@ -30,7 +30,7 @@ class StandardMenubarHandlerTests: XCTestCase {
// Set standard menubar in Prefs
UserDefaults.standard.set(1, forKey: CLMenubarCompactMode)
let menubarHandler = MenubarHandler()
let menubarHandler = MenubarTitleProvider()
let menubarString = menubarHandler.titleForMenubar() ?? ""
// Test menubar string is present
@ -58,7 +58,7 @@ class StandardMenubarHandlerTests: XCTestCase {
func testUnfavouritedTimezone_returnNilMenubarString() {
// Wipe all timezones from UserDefaults
DataStore.shared().setTimezones(nil)
let menubarHandler = MenubarHandler()
let menubarHandler = MenubarTitleProvider()
let emptyMenubarString = menubarHandler.titleForMenubar()
// Returns early because DataStore.menubarTimezones is nil
XCTAssertNil(emptyMenubarString)

2
Clocker/Panel/ParentPanelController.swift

@ -575,7 +575,7 @@ class ParentPanelController: NSWindowController {
Logger.log(object: nil, for: "Deleted Timezone Through Swipe")
}
private lazy var menubarTitleHandler = MenubarHandler()
private lazy var menubarTitleHandler = MenubarTitleProvider()
@objc func updateTime() {
let store = DataStore.shared()

2
Clocker/Preferences/General/PreferencesViewController.swift

@ -79,7 +79,7 @@ class PreferencesViewController: ParentViewController {
let dictionary = NSDictionary(contentsOfFile: path),
let apiKey = dictionary["GeocodingKey"] as? String
else {
assertionFailure("Unable to find the API key")
// assertionFailure("Unable to find the API key")
return ""
}
return apiKey

2
Clocker/Preferences/Menu Bar/MenubarHandler.swift → Clocker/Preferences/Menu Bar/MenubarTitleProvider.swift

@ -5,7 +5,7 @@ import CoreLoggerKit
import CoreModelKit
import EventKit
class MenubarHandler: NSObject {
class MenubarTitleProvider: NSObject {
func titleForMenubar() -> String? {
if let nextEvent = checkForUpcomingEvents() {
return nextEvent

2
Clocker/Preferences/Menu Bar/StatusItemHandler.swift

@ -22,7 +22,7 @@ class StatusItemHandler: NSObject {
return statusItem
}()
private var menubarTitleHandler = MenubarHandler()
private var menubarTitleHandler = MenubarTitleProvider()
private var parentView: StatusContainerView?

Loading…
Cancel
Save