mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Pass menuForEvent: to the enclosing tableview. This gets contextual menus to appear in e timeline.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
// Copyright © 2016 Ranchero Software, LLC. All rights reserved.
|
||||
//
|
||||
|
||||
@import RSCore;
|
||||
#import "RSMultiLineView.h"
|
||||
#import "RSMultiLineRenderer.h"
|
||||
#import "RSMultiLineRendererMeasurements.h"
|
||||
@@ -137,6 +138,16 @@ static NSAttributedString *emptyAttributedString = nil;
|
||||
}
|
||||
|
||||
|
||||
- (NSMenu *)menuForEvent:(NSEvent *)event {
|
||||
|
||||
NSTableView *tableView = [self rs_enclosingTableView];
|
||||
if (tableView) {
|
||||
return [tableView menuForEvent:event];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (void)drawRect:(NSRect)r {
|
||||
|
||||
if (self.selected) {
|
||||
|
||||
@@ -124,6 +124,14 @@ static NSAttributedString *emptyAttributedString = nil;
|
||||
return self.intrinsicSize;
|
||||
}
|
||||
|
||||
- (NSMenu *)menuForEvent:(NSEvent *)event {
|
||||
|
||||
NSTableView *tableView = [self rs_enclosingTableView];
|
||||
if (tableView) {
|
||||
return [tableView menuForEvent:event];
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)r {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user