Browse Source

Naming.

pull/113/head
Abhishek 3 years ago
parent
commit
a569420956
  1. 2
      Clocker/Panel/FloatingWindowController.swift
  2. 8
      Clocker/Panel/PanelController.swift
  3. 8
      Clocker/Panel/ParentPanelController.swift

2
Clocker/Panel/FloatingWindowController.swift

@ -49,7 +49,7 @@ class FloatingWindowController: ParentPanelController {
} }
override func showNotesPopover(forRow row: Int, relativeTo positioningRect: NSRect, andButton target: NSButton!) -> Bool { override func showNotesPopover(forRow row: Int, relativeTo positioningRect: NSRect, andButton target: NSButton!) -> Bool {
guard let popover = morePopover else { guard let popover = additionalOptionsPopover else {
return false return false
} }

8
Clocker/Panel/PanelController.swift

@ -302,7 +302,7 @@ class PanelController: ParentPanelController {
NSAnimationContext.beginGrouping() NSAnimationContext.beginGrouping()
NSAnimationContext.current.duration = 0.1 NSAnimationContext.current.duration = 0.1
window?.animator().alphaValue = 0 window?.animator().alphaValue = 0
morePopover?.close() additionalOptionsPopover?.close()
NSAnimationContext.endGrouping() NSAnimationContext.endGrouping()
window?.orderOut(nil) window?.orderOut(nil)
@ -329,11 +329,11 @@ class PanelController: ParentPanelController {
} }
override func showNotesPopover(forRow row: Int, relativeTo positioningRect: NSRect, andButton target: NSButton!) -> Bool { override func showNotesPopover(forRow row: Int, relativeTo positioningRect: NSRect, andButton target: NSButton!) -> Bool {
if morePopover == nil { if additionalOptionsPopover == nil {
morePopover = NSPopover() additionalOptionsPopover = NSPopover()
} }
guard let popover = morePopover else { guard let popover = additionalOptionsPopover else {
return false return false
} }

8
Clocker/Panel/ParentPanelController.swift

@ -33,7 +33,7 @@ class ParentPanelController: NSWindowController {
var previousPopoverRow: Int = -1 var previousPopoverRow: Int = -1
var morePopover: NSPopover? var additionalOptionsPopover: NSPopover?
var datasource: TimezoneDataSource? var datasource: TimezoneDataSource?
@ -366,7 +366,7 @@ class ParentPanelController: NSWindowController {
override func windowDidLoad() { override func windowDidLoad() {
super.windowDidLoad() super.windowDidLoad()
morePopover = NSPopover() additionalOptionsPopover = NSPopover()
} }
func screenHeight() -> CGFloat { func screenHeight() -> CGFloat {
@ -640,7 +640,7 @@ class ParentPanelController: NSWindowController {
func showNotesPopover(forRow row: Int, relativeTo _: NSRect, andButton target: NSButton!) -> Bool { func showNotesPopover(forRow row: Int, relativeTo _: NSRect, andButton target: NSButton!) -> Bool {
let defaults = DataStore.shared().timezones() let defaults = DataStore.shared().timezones()
guard let popover = morePopover else { guard let popover = additionalOptionsPopover else {
assertionFailure("Data was unexpectedly nil") assertionFailure("Data was unexpectedly nil")
return false return false
} }
@ -834,7 +834,7 @@ class ParentPanelController: NSWindowController {
if notePopover != nil, let isShown = notePopover?.popover?.isShown, isShown { if notePopover != nil, let isShown = notePopover?.popover?.isShown, isShown {
notePopover?.popover?.close() notePopover?.popover?.close()
} }
morePopover = nil additionalOptionsPopover = nil
} }
// MARK: Review // MARK: Review

Loading…
Cancel
Save