Revision: 2664
http://skim-app.svn.sourceforge.net/skim-app/?rev=2664&view=rev
Author: hofman
Date: 2007-08-15 11:10:41 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Add accessory view to print layout panel to auto rotate pages.
Modified Paths:
--------------
trunk/Dutch.lproj/Localizable.strings
trunk/SKDocument.h
trunk/SKDocument.m
Modified: trunk/Dutch.lproj/Localizable.strings
===================================================================
(Binary files differ)
Modified: trunk/SKDocument.h
===================================================================
--- trunk/SKDocument.h 2007-08-15 17:36:38 UTC (rev 2663)
+++ trunk/SKDocument.h 2007-08-15 18:10:41 UTC (rev 2664)
@@ -66,6 +66,9 @@
IBOutlet NSProgressIndicator *progressBar;
IBOutlet NSTextField *progressField;
+ IBOutlet NSButton *autoRotateButton;
+ BOOL autoRotate;
+
// variables to be saved:
NSData *pdfData;
Modified: trunk/SKDocument.m
===================================================================
--- trunk/SKDocument.m 2007-08-15 17:36:38 UTC (rev 2663)
+++ trunk/SKDocument.m 2007-08-15 18:10:41 UTC (rev 2664)
@@ -97,6 +97,7 @@
[readNotesAccessoryView release];
[lastModifiedDate release];
[progressSheet release];
+ [autoRotateButton release];
[super dealloc];
}
@@ -507,7 +508,7 @@
#pragma mark Actions
- (IBAction)printDocument:(id)sender{
- [[self pdfView] printWithInfo:[self printInfo] autoRotate:NO];
+ [[self pdfView] printWithInfo:[self printInfo] autoRotate:autoRotate];
}
- (void)openPanelDidEnd:(NSOpenPanel *)oPanel returnCode:(int)returnCode
contextInfo:(void *)contextInfo{
@@ -1154,9 +1155,24 @@
- (void)setPrintInfo:(NSPrintInfo *)printInfo {
[super setPrintInfo:printInfo];
+ if (autoRotateButton)
+ autoRotate = [autoRotateButton state] == NSOnState;
[self updateChangeCount:[[self undoManager] isUndoing] ? NSChangeDone :
NSChangeUndone];
}
+- (BOOL)preparePageLayout:(NSPageLayout *)pageLayout {
+ if (autoRotateButton == nil) {
+ autoRotateButton = [[NSButton alloc] init];
+ [autoRotateButton setBezelStyle:NSRoundedBezelStyle];
+ [autoRotateButton setButtonType:NSSwitchButton];
+ [autoRotateButton setTitle:NSLocalizedString(@"Auto Rotate Pages",
@"Print layout sheet button title")];
+ [autoRotateButton sizeToFit];
+ }
+ [autoRotateButton setState:autoRotate ? NSOnState : NSOffState];
+ [pageLayout setAccessoryView:autoRotateButton];
+ return YES;
+}
+
#pragma mark Scripting support
- (unsigned int)countOfPages {
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: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit