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