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 {
guard let popover = morePopover else {
guard let popover = additionalOptionsPopover else {
return false
}

8
Clocker/Panel/PanelController.swift

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

8
Clocker/Panel/ParentPanelController.swift

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

Loading…
Cancel
Save