]> granicus.if.org Git - graphviz/commitdiff
Page Setup changes graph page and margin attributes, Print respects Page Setup
authorglenlow <devnull@localhost>
Tue, 27 May 2008 14:26:29 +0000 (14:26 +0000)
committerglenlow <devnull@localhost>
Tue, 27 May 2008 14:26:29 +0000 (14:26 +0000)
macosx/GVWindowController.h
macosx/GVWindowController.m

index 800175964f2ab518d8d4d8548cc70870266db50e..2d69bc0915ea5126409b780396217e45561c1686 100644 (file)
@@ -34,6 +34,8 @@
 - (IBAction)zoomInView:(id)sender;
 - (IBAction)zoomOutView:(id)sender;
 
+- (IBAction)printGraphDocument:(id)sender;
+
 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem;
 
 - (void)dealloc;
index ddf5cb03569350219c2a29c3729c218e055bd768..b43c9070d1a089e2cf2df97bcc241af6baf79398 100644 (file)
        [documentView zoomOut:sender];
 }
 
+- (IBAction)printGraphDocument:(id)sender
+{
+       [documentView printWithInfo:[[self document] printInfo] autoRotate:NO];
+}
+
 - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)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;
 }