Rewire contextual menu in timeline view.
This commit is contained in:
parent
076df956f9
commit
19023f9168
|
@ -17,6 +17,16 @@ final class TimelineContainerViewController: NSViewController {
|
|||
|
||||
@IBOutlet var containerView: TimelineContainerView!
|
||||
|
||||
var currentTimelineViewController: TimelineViewController? {
|
||||
didSet {
|
||||
let view = currentTimelineViewController?.view
|
||||
if containerView.contentView === view {
|
||||
return
|
||||
}
|
||||
containerView.contentView = view
|
||||
}
|
||||
}
|
||||
|
||||
weak var delegate: TimelineContainerViewControllerDelegate?
|
||||
|
||||
private lazy var regularTimelineViewController = {
|
||||
|
@ -39,7 +49,7 @@ final class TimelineContainerViewController: NSViewController {
|
|||
}
|
||||
|
||||
func showTimeline(_ mode: TimelineSourceMode) {
|
||||
containerView.contentView = timelineViewController(for: mode).view
|
||||
currentTimelineViewController = timelineViewController(for: mode)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<connections>
|
||||
<outlet property="dataSource" destination="-2" id="zir-Wd-WsF"/>
|
||||
<outlet property="delegate" destination="-2" id="nbI-3q-mrc"/>
|
||||
<outlet property="menu" destination="zCu-LD-kHw" id="nNl-iz-nVl"/>
|
||||
<outlet property="menu" destination="MjV-3b-ZXR" id="kCm-mz-dAV"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</subviews>
|
||||
|
@ -57,20 +57,20 @@
|
|||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<menu id="zCu-LD-kHw">
|
||||
<menu id="MjV-3b-ZXR">
|
||||
<items>
|
||||
<menuItem title="Item 1" id="AJc-Qw-NnP">
|
||||
<menuItem title="Item 1" id="xfn-qr-Hmg">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Item 2" id="YKj-q3-QDG">
|
||||
<menuItem title="Item 2" id="CKG-yd-eyo">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem title="Item 3" id="IJ0-IS-a6R">
|
||||
<menuItem title="Item 3" id="SwU-HI-Iqz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
</items>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="opA-RM-DKR" id="QpK-G8-xCm"/>
|
||||
<outlet property="delegate" destination="-2" id="t1E-bi-ix5"/>
|
||||
</connections>
|
||||
</menu>
|
||||
</objects>
|
||||
|
|
Loading…
Reference in New Issue