[macos] enable printing
This commit is contained in:
@@ -261,6 +261,14 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask";
|
||||
[self.preferencesWindow makeKeyAndOrderFront:sender];
|
||||
}
|
||||
|
||||
- (IBAction)print:(id)sender {
|
||||
NSDocument *currentDocument = [NSDocumentController sharedDocumentController].currentDocument;
|
||||
if ([currentDocument isKindOfClass:[MapDocument class]]) {
|
||||
MGLMapView *mapView = [(MapDocument *)currentDocument mapView];
|
||||
[mapView print:sender];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)openAccessTokenManager:(id)sender {
|
||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://www.mapbox.com/studio/account/tokens/"]];
|
||||
}
|
||||
@@ -277,6 +285,9 @@ NSString * const MGLLastMapDebugMaskDefaultsKey = @"MGLLastMapDebugMask";
|
||||
if (menuItem.action == @selector(showOfflinePacksPanel:)) {
|
||||
return YES;
|
||||
}
|
||||
if (menuItem.action == @selector(print:)) {
|
||||
return YES;
|
||||
}
|
||||
if (menuItem.action == @selector(delete:)) {
|
||||
return self.offlinePacksArrayController.selectedObjects.count;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="-1" id="qaZ-4w-aoO"/>
|
||||
<action selector="print:" target="Voe-Tx-rLC" id="rXg-Pd-AG8"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
|
||||
Reference in New Issue
Block a user