From: glenlow Date: Tue, 27 May 2008 14:26:29 +0000 (+0000) Subject: Page Setup changes graph page and margin attributes, Print respects Page Setup X-Git-Tag: LAST_LIBGRAPH~32^2~3991 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eae03b4ccb2e83dc2bf78f18ad0ad021b46b3b41;p=graphviz Page Setup changes graph page and margin attributes, Print respects Page Setup --- diff --git a/macosx/GVWindowController.h b/macosx/GVWindowController.h index 800175964..2d69bc091 100644 --- a/macosx/GVWindowController.h +++ b/macosx/GVWindowController.h @@ -34,6 +34,8 @@ - (IBAction)zoomInView:(id)sender; - (IBAction)zoomOutView:(id)sender; +- (IBAction)printGraphDocument:(id)sender; + - (BOOL)validateUserInterfaceItem:(id )anItem; - (void)dealloc; diff --git a/macosx/GVWindowController.m b/macosx/GVWindowController.m index ddf5cb035..b43c9070d 100644 --- a/macosx/GVWindowController.m +++ b/macosx/GVWindowController.m @@ -81,6 +81,11 @@ [documentView zoomOut:sender]; } +- (IBAction)printGraphDocument:(id)sender +{ + [documentView printWithInfo:[[self document] printInfo] autoRotate:NO]; +} + - (BOOL)validateUserInterfaceItem:(id )anItem { /* validate toolbar or menu items */ @@ -90,6 +95,8 @@ return [documentView canZoomIn]; else if ([anItem action] == @selector(zoomOutView:)) return [documentView canZoomOut]; + else if ([anItem action] == @selector(printGraphDocument:)) + return YES; else return NO; }