Revision: 6745
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6745&view=rev
Author:   hofman
Date:     2010-08-27 14:29:42 +0000 (Fri, 27 Aug 2010)

Log Message:
-----------
declare presentationNotesDocument as NSDocument so we don't need to refer to 
the SKMainDocument class

Modified Paths:
--------------
    trunk/NSDocument_SKExtensions.h
    trunk/NSDocument_SKExtensions.m
    trunk/SKMainWindowController.h
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_UI.m
    trunk/SKPresentationOptionsSheetController.h
    trunk/SKPresentationOptionsSheetController.m

Modified: trunk/NSDocument_SKExtensions.h
===================================================================
--- trunk/NSDocument_SKExtensions.h     2010-08-27 11:41:11 UTC (rev 6744)
+++ trunk/NSDocument_SKExtensions.h     2010-08-27 14:29:42 UTC (rev 6745)
@@ -95,6 +95,7 @@
 - (PDFPage *)objectInPagesAtIndex:(NSUInteger)theIndex;
 
 - (PDFPage *)currentPage;
+- (void)setCurrentPage:(PDFPage *)page;
 - (id)activeNote;
 - (NSTextStorage *)richText;
 - (id)selectionSpecifier;

Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m     2010-08-27 11:41:11 UTC (rev 6744)
+++ trunk/NSDocument_SKExtensions.m     2010-08-27 14:29:42 UTC (rev 6745)
@@ -253,6 +253,8 @@
 
 - (PDFPage *)currentPage { return nil; }
 
+- (void)setCurrentPage:(PDFPage *)page {}
+
 - (id)activeNote { return nil; }
 
 - (NSTextStorage *)richText { return nil; }

Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h      2010-08-27 11:41:11 UTC (rev 6744)
+++ trunk/SKMainWindowController.h      2010-08-27 14:29:42 UTC (rev 6745)
@@ -68,7 +68,7 @@
 
 @class PDFAnnotation, PDFSelection, SKGroupedSearchResult, SKFloatMapTable;
 @class SKPDFView, SKSecondaryPDFView, SKStatusBar, SKSplitView, SKSideWindow;
-...@class SKMainDocument, SKLeftSideViewController, SKRightSideViewController, 
SKMainToolbarController, SKProgressController, 
SKPresentationOptionsSheetController, SKNoteTypeSheetController;
+...@class SKLeftSideViewController, SKRightSideViewController, 
SKMainToolbarController, SKProgressController, 
SKPresentationOptionsSheetController, SKNoteTypeSheetController;
 
 @interface SKMainWindowController : NSWindowController 
<SKSnapshotWindowControllerDelegate, SKThumbnailDelegate> {
     SKSplitView                         *splitView;
@@ -124,7 +124,7 @@
     
     SKPresentationOptionsSheetController *presentationSheetController;
     
-    SKMainDocument                      *presentationNotesDocument;
+    NSDocument                          *presentationNotesDocument;
     
     NSButton                            *colorAccessoryView;
     NSButton                            *textColorAccessoryView;
@@ -251,7 +251,7 @@
 
 @property (nonatomic, copy) NSDictionary *presentationOptions;
 
-...@property (nonatomic, retain) SKMainDocument *presentationNotesDocument;
+...@property (nonatomic, retain) NSDocument *presentationNotesDocument;
 
 @property (nonatomic, copy) NSArray *tags;
 @property (nonatomic) double rating;

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2010-08-27 11:41:11 UTC (rev 6744)
+++ trunk/SKMainWindowController.m      2010-08-27 14:29:42 UTC (rev 6745)
@@ -1299,9 +1299,7 @@
     if ([pdfView hasReadingBar])
         [pdfView toggleReadingBar];
     
-    SKPDFView *notesPdfView = [[self presentationNotesDocument] pdfView];
-    if (notesPdfView)
-        [notesPdfView goToPage:[[notesPdfView document] pageAtIndex:[[pdfView 
currentPage] pageIndex]]];
+    [[self presentationNotesDocument] setCurrentPage:[[[self 
presentationNotesDocument] pdfDocument] pageAtIndex:[[pdfView currentPage] 
pageIndex]]];
     
     // prevent sleep
     if (activityAssertionID == kIOPMNullAssertionID && kIOReturnSuccess != 
IOPMAssertionCreate(kIOPMAssertionTypeNoDisplaySleep, kIOPMAssertionLevelOn, 
&activityAssertionID))

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2010-08-27 11:41:11 UTC (rev 6744)
+++ trunk/SKMainWindowController_UI.m   2010-08-27 14:29:42 UTC (rev 6745)
@@ -1550,11 +1550,8 @@
     [self synchronizeWindowTitleWithDocumentName];
     [self updateLeftStatus];
     
-    if ([self interactionMode] == SKPresentationMode) {
-        SKPDFView *notesPdfView = [[self presentationNotesDocument] pdfView];
-        if (notesPdfView)
-            [notesPdfView goToPage:[[notesPdfView document] pageAtIndex:[page 
pageIndex]]];
-    }
+    if ([self interactionMode] == SKPresentationMode)
+        [[self presentationNotesDocument] setCurrentPage:[[[self 
presentationNotesDocument] pdfDocument] pageAtIndex:[page pageIndex]]];
 }
 
 - (void)handleDisplayBoxChangedNotification:(NSNotification *)notification {

Modified: trunk/SKPresentationOptionsSheetController.h
===================================================================
--- trunk/SKPresentationOptionsSheetController.h        2010-08-27 11:41:11 UTC 
(rev 6744)
+++ trunk/SKPresentationOptionsSheetController.h        2010-08-27 14:29:42 UTC 
(rev 6745)
@@ -41,7 +41,7 @@
 #import "SKTransitionController.h"
 #import "SKThumbnailTableView.h"
 
-...@class SKMainWindowController, SKMainDocument, SKThumbnail, 
SKTransitionInfo;
+...@class SKMainWindowController, SKThumbnail, SKTransitionInfo;
 
 @interface SKPresentationOptionsSheetController : SKWindowController 
<NSWindowDelegate, SKThumbnailTableViewDelegate, NSTableViewDataSource> {
     NSPopUpButton *notesDocumentPopUpButton;
@@ -70,7 +70,7 @@
 @property (nonatomic, readonly) SKTransitionInfo *transition;
 @property (nonatomic, copy) NSArray *transitions;
 @property (nonatomic, readonly) NSArray *pageTransitions;
-...@property (nonatomic, readonly) SKMainDocument *notesDocument;
+...@property (nonatomic, readonly) NSDocument *notesDocument;
 @property (nonatomic, readonly) BOOL isScrolling;
 @property (nonatomic, readonly) NSUndoManager *undoManager;
 

Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m        2010-08-27 11:41:11 UTC 
(rev 6744)
+++ trunk/SKPresentationOptionsSheetController.m        2010-08-27 14:29:42 UTC 
(rev 6745)
@@ -39,7 +39,6 @@
 #import "SKPresentationOptionsSheetController.h"
 #import <Quartz/Quartz.h>
 #import "SKMainWindowController.h"
-#import "SKMainDocument.h"
 #import "SKDocumentController.h"
 #import "SKTransitionInfo.h"
 #import "SKThumbnail.h"
@@ -308,7 +307,7 @@
         return nil;
 }
 
-- (SKMainDocument *)notesDocument {
+- (NSDocument *)notesDocument {
     [self window];
     return [[notesDocumentPopUpButton selectedItem] representedObject];
 }


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

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to