Revision: 6545
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6545&view=rev
Author:   hofman
Date:     2010-05-19 11:58:08 +0000 (Wed, 19 May 2010)

Log Message:
-----------
include window frame for note document in setup

Modified Paths:
--------------
    trunk/SKNotesDocument.m

Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m     2010-05-19 11:44:48 UTC (rev 6544)
+++ trunk/SKNotesDocument.m     2010-05-19 11:58:08 UTC (rev 6545)
@@ -72,6 +72,8 @@
 
 #define SKLastExportedNotesTypeKey @"SKLastExportedNotesType"
 
+#define SKWindowFrameKey @"windowFrame"
+
 #define NOTES_KEY @"notes"
 #define PAGES_KEY @"pages"
 
@@ -317,6 +319,21 @@
     [outlineView reloadData];
 }
 
+- (NSDictionary *)currentDocumentSetup {
+    NSMutableDictionary *setup = [[[super currentDocumentSetup] mutableCopy] 
autorelease];
+    NSWindow *window = [[[self windowControllers] lastObject] window];
+    if (window)
+        [setup setObject:NSStringFromRect([window frame]) 
forKey:SKWindowFrameKey];
+    return setup;
+}
+
+- (void)applySetup:(NSDictionary *)setup {
+    NSWindow *window = [[[self windowControllers] lastObject] window];
+    NSString *rectString = [setup objectForKey:SKWindowFrameKey];
+    if (rectString && window)
+        [window setFrame:NSRectFromString(rectString) display:YES];
+}
+
 #pragma mark Printing
 
 - (NSPrintOperation *)printOperationWithSettings:(NSDictionary *)printSettings 
error:(NSError **)outError {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------

_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to