Revision: 2468 http://skim-app.svn.sourceforge.net/skim-app/?rev=2468&view=rev Author: hofman Date: 2007-07-10 10:49:21 -0700 (Tue, 10 Jul 2007)
Log Message: ----------- Redirect printing from PDFView back to document, so it uses the printInfo from the document. Modified Paths: -------------- trunk/SKDocument.m trunk/SKMainWindowController.m trunk/SKPDFView.m Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-07-10 17:09:00 UTC (rev 2467) +++ trunk/SKDocument.m 2007-07-10 17:49:21 UTC (rev 2468) @@ -482,6 +482,10 @@ #pragma mark Actions +- (IBAction)printDocument:(id)sender{ + [[self pdfView] printWithInfo:[self printInfo] autoRotate:NO]; +} + - (void)openPanelDidEnd:(NSOpenPanel *)oPanel returnCode:(int)returnCode contextInfo:(void *)contextInfo{ if (returnCode == NSOKButton) { NSURL *notesURL = [[oPanel URLs] objectAtIndex:0]; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-07-10 17:09:00 UTC (rev 2467) +++ trunk/SKMainWindowController.m 2007-07-10 17:49:21 UTC (rev 2468) @@ -2005,10 +2005,6 @@ [[NSUserDefaults standardUserDefaults] setObject:[self currentPDFSettings] forKey:SKDefaultPDFDisplaySettingsKey]; } -- (IBAction)printDocument:(id)sender{ - [pdfView printWithInfo:[[self document] printInfo] autoRotate:NO]; -} - #pragma mark Swapping tables - (void)replaceSideView:(NSView *)oldView withView:(NSView *)newView animate:(BOOL)animate { Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-07-10 17:09:00 UTC (rev 2467) +++ trunk/SKPDFView.m 2007-07-10 17:49:21 UTC (rev 2468) @@ -557,6 +557,14 @@ #pragma mark Actions +- (IBAction)printDocument:(id)sender{ + id document = [[[self window] windowController] document]; + if ([document respondsToSelector:_cmd]) + [document printDocument:sender]; + else if ([[self superclass] instancesRespondToSelector:_cmd]) + [(id)super printDocument:sender]; +} + - (void)delete:(id)sender { if ([activeAnnotation isNoteAnnotation]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit