|
|
|
@ -434,8 +434,7 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
newHeight += 20 |
|
|
|
|
} else if DataStore.shared().shouldDisplay(.dstTransitionInfo), |
|
|
|
|
let obj = object, |
|
|
|
|
TimezoneDataOperations(with: obj).nextDaylightSavingsTransitionIfAvailable(with: futureSliderValue) != nil |
|
|
|
|
{ |
|
|
|
|
TimezoneDataOperations(with: obj).nextDaylightSavingsTransitionIfAvailable(with: futureSliderValue) != nil { |
|
|
|
|
newHeight += 20 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -507,8 +506,6 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
scrollViewHeight.constant = (screenHeight() - 200) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -625,8 +622,7 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
|
|
|
|
|
if $0 < mainTableView.numberOfRows, |
|
|
|
|
let cellView = mainTableView.view(atColumn: 0, row: $0, makeIfNecessary: false) as? TimezoneCellView, |
|
|
|
|
let model = TimezoneData.customObject(from: current) |
|
|
|
|
{ |
|
|
|
|
let model = TimezoneData.customObject(from: current) { |
|
|
|
|
if let futureSliderCell = futureSlider.cell as? CustomSliderCell, futureSliderCell.tracking == true { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -646,8 +642,7 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
if let note = model.note, !note.isEmpty { |
|
|
|
|
cellView.noteLabel.stringValue = note |
|
|
|
|
} else if DataStore.shared().shouldDisplay(.dstTransitionInfo), |
|
|
|
|
let value = TimezoneDataOperations(with: model).nextDaylightSavingsTransitionIfAvailable(with: futureSliderValue) |
|
|
|
|
{ |
|
|
|
|
let value = TimezoneDataOperations(with: model).nextDaylightSavingsTransitionIfAvailable(with: futureSliderValue) { |
|
|
|
|
cellView.noteLabel.stringValue = value |
|
|
|
|
} else { |
|
|
|
|
cellView.noteLabel.stringValue = CLEmptyString |
|
|
|
@ -752,8 +747,7 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
|
|
|
|
|
@IBAction func calendarButtonAction(_: NSButton) { |
|
|
|
|
if calendarButton.title == NSLocalizedString("Click here to start.", |
|
|
|
|
comment: "Button Title for no Calendar access") |
|
|
|
|
{ |
|
|
|
|
comment: "Button Title for no Calendar access") { |
|
|
|
|
showPermissionsWindow() |
|
|
|
|
} else { |
|
|
|
|
retrieveCalendarEvents() |
|
|
|
@ -850,7 +844,6 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guard let upcomingEvent = eventCenter.nextOccuring(events) else { |
|
|
|
|
self.setPlaceholdersForUpcomingCalendarView() |
|
|
|
|
if #available(OSX 10.14, *) { |
|
|
|
@ -882,9 +875,9 @@ class ParentPanelController: NSWindowController {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if self.upcomingEventCollectionView != nil { |
|
|
|
|
self.upcomingEventsDataSource.updateEventsDataSource([]) |
|
|
|
|
self.upcomingEventCollectionView.reloadData() |
|
|
|
|
if upcomingEventCollectionView != nil { |
|
|
|
|
upcomingEventsDataSource.updateEventsDataSource([]) |
|
|
|
|
upcomingEventCollectionView.reloadData() |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1154,8 +1147,7 @@ extension ParentPanelController: NSSharingServicePickerDelegate {
|
|
|
|
|
let timezones = DataStore.shared().timezones() |
|
|
|
|
stride(from: 0, to: timezones.count, by: 1).forEach { |
|
|
|
|
if $0 < mainTableView.numberOfRows, |
|
|
|
|
let cellView = mainTableView.view(atColumn: 0, row: $0, makeIfNecessary: false) as? TimezoneCellView |
|
|
|
|
{ |
|
|
|
|
let cellView = mainTableView.view(atColumn: 0, row: $0, makeIfNecessary: false) as? TimezoneCellView { |
|
|
|
|
clipboardCopy.append("\(cellView.customName.stringValue) - \(cellView.time.stringValue)\n") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|