Revision: 6660
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6660&view=rev
Author:   hofman
Date:     2010-07-29 09:04:27 +0000 (Thu, 29 Jul 2010)

Log Message:
-----------
use string constants for notification keys

Modified Paths:
--------------
    trunk/PDFPage_SKExtensions.m
    trunk/SKDocumentController.h
    trunk/SKDocumentController.m
    trunk/SKMainWindowController_UI.m

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2010-07-27 11:48:10 UTC (rev 6659)
+++ trunk/PDFPage_SKExtensions.m        2010-07-29 09:04:27 UTC (rev 6660)
@@ -373,7 +373,7 @@
         [self setRotation:angle];
         
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFPageBoundsDidChangeNotification 
-                object:[self document] userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:@"rotate", @"action", self, @"page", nil]];
+                object:[self document] userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:@"rotate", SKPDFPageActionKey, self, 
SKPDFPagePageKey, nil]];
     }
 }
 
@@ -397,7 +397,7 @@
         [self setBounds:newBounds forBox:kPDFDisplayBoxCropBox];
         
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFPageBoundsDidChangeNotification 
-                object:[self document] userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:@"crop", @"action", self, @"page", nil]];
+                object:[self document] userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:@"crop", SKPDFPageActionKey, self, 
SKPDFPagePageKey, nil]];
     }
 }
 
@@ -421,7 +421,7 @@
         [self setBounds:newBounds forBox:kPDFDisplayBoxMediaBox];
         
         [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFPageBoundsDidChangeNotification 
-                object:[self document] userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:@"crop", @"action", self, @"page", nil]];
+                object:[self document] userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:@"crop", SKPDFPageActionKey, self, 
SKPDFPagePageKey, nil]];
     }
 }
 

Modified: trunk/SKDocumentController.h
===================================================================
--- trunk/SKDocumentController.h        2010-07-27 11:48:10 UTC (rev 6659)
+++ trunk/SKDocumentController.h        2010-07-29 09:04:27 UTC (rev 6660)
@@ -81,6 +81,8 @@
 extern NSString *SKDocumentControllerDidRemoveDocumentNotification;
 extern NSString *SKDocumentDidShowNotification;
 
+NSString *SKDocumentControllerDocumentKey;
+
 @interface SKDocumentController : NSDocumentController {
     NSArray *customExportTemplateFiles;
 }

Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m        2010-07-27 11:48:10 UTC (rev 6659)
+++ trunk/SKDocumentController.m        2010-07-29 09:04:27 UTC (rev 6660)
@@ -95,6 +95,8 @@
 NSString *SKDocumentControllerDidRemoveDocumentNotification = 
@"SKDocumentControllerDidRemoveDocumentNotification";
 NSString *SKDocumentDidShowNotification = @"SKDocumentDidShowNotification";
 
+NSString *SKDocumentControllerDocumentKey = @"document";
+
 @implementation SKDocumentController
 
 + (void)initialize {
@@ -119,13 +121,13 @@
 - (void)addDocument:(NSDocument *)document {
     [super addDocument:document];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKDocumentControllerDidAddDocumentNotification 
-            object:self userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:document, @"document", nil]];
+            object:self userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:document, SKDocumentControllerDocumentKey, nil]];
 }
 
 - (void)removeDocument:(NSDocument *)document {
     [super removeDocument:[[document retain] autorelease]];
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKDocumentControllerDidRemoveDocumentNotification 
-            object:self userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:document, @"document", nil]];
+            object:self userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:document, SKDocumentControllerDocumentKey, nil]];
 }
 
 

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2010-07-27 11:48:10 UTC (rev 6659)
+++ trunk/SKMainWindowController_UI.m   2010-07-29 09:04:27 UTC (rev 6660)
@@ -1642,7 +1642,7 @@
 }
 
 - (void)handleDidRemoveDocumentNotification:(NSNotification *)notification {
-    if ([[notification userInfo] objectForKey:@"document"] == 
presentationNotesDocument)
+    if ([[notification userInfo] objectForKey:SKDocumentControllerDocumentKey] 
== presentationNotesDocument)
         [self setPresentationNotesDocument:nil];
 }
 


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

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to