Revision: 7003
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7003&view=rev
Author:   hofman
Date:     2010-12-22 11:42:02 +0000 (Wed, 22 Dec 2010)

Log Message:
-----------
Use cocoa equivalents for scripting enumerators, so we don't need to work with 
four char codes in code

Modified Paths:
--------------
    trunk/PDFAnnotationCircle_SKExtensions.m
    trunk/PDFAnnotationFreeText_SKExtensions.h
    trunk/PDFAnnotationFreeText_SKExtensions.m
    trunk/PDFAnnotationInk_SKExtensions.m
    trunk/PDFAnnotationLine_SKExtensions.h
    trunk/PDFAnnotationLine_SKExtensions.m
    trunk/PDFAnnotationMarkup_SKExtensions.m
    trunk/PDFAnnotationSquare_SKExtensions.m
    trunk/PDFAnnotationText_SKExtensions.h
    trunk/PDFAnnotationText_SKExtensions.m
    trunk/PDFAnnotation_SKExtensions.h
    trunk/PDFAnnotation_SKExtensions.m
    trunk/PDFPage_SKExtensions.m
    trunk/SKApplicationController.h
    trunk/SKApplicationController.m
    trunk/SKBookmark.h
    trunk/SKBookmark.m
    trunk/SKBoundsCommand.m
    trunk/SKMainDocument.h
    trunk/SKMainDocument.m
    trunk/Skim.sdef

Modified: trunk/PDFAnnotationCircle_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationCircle_SKExtensions.m    2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationCircle_SKExtensions.m    2010-12-22 11:42:02 UTC (rev 
7003)
@@ -104,10 +104,6 @@
     return customCircleScriptingKeys;
 }
 
-- (FourCharCode)scriptingNoteType {
-    return SKScriptingCircleNote;
-}
-
 - (NSColor *)scriptingInteriorColor {
     return [self interiorColor];
 }

Modified: trunk/PDFAnnotationFreeText_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationFreeText_SKExtensions.h  2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationFreeText_SKExtensions.h  2010-12-22 11:42:02 UTC (rev 
7003)
@@ -40,16 +40,6 @@
 #import <Quartz/Quartz.h>
 
 
-enum {
-    SKScriptingAlignmentLeft = 'LeTA',
-    SKScriptingAlignmentRight = 'RiTA',
-    SKScriptingAlignmentCenter = 'CeTA'
-};
-
-extern FourCharCode SKScriptingAlignmentFromAlignment(NSTextAlignment 
alignment);
-extern NSTextAlignment SKAlignmentFromScriptingAlignment(FourCharCode 
alignment);
-
-
 extern NSString *SKPDFAnnotationScriptingFontColorKey;
 
 
@@ -58,6 +48,6 @@
 - (void)setFontName:(NSString *)fontName;
 - (void)setFontSize:(CGFloat)pointSize;
 - (void)setScriptingFontColor:(NSColor *)newScriptingFontColor;
-- (void)setScriptingAlignment:(FourCharCode)alignment;
+- (void)setScriptingAlignment:(NSTextAlignment)alignment;
 
 @end

Modified: trunk/PDFAnnotationFreeText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationFreeText_SKExtensions.m  2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationFreeText_SKExtensions.m  2010-12-22 11:42:02 UTC (rev 
7003)
@@ -45,25 +45,6 @@
 #import "NSUserDefaults_SKExtensions.h"
 
 
-FourCharCode SKScriptingAlignmentFromAlignment(NSTextAlignment alignment) {
-    switch (alignment) {
-        case NSLeftTextAlignment: return SKScriptingAlignmentLeft;
-        case NSRightTextAlignment: return SKScriptingAlignmentRight;
-        case NSCenterTextAlignment: return SKScriptingAlignmentCenter;
-        default: return SKScriptingAlignmentLeft;
-    }
-}
-
-NSTextAlignment SKAlignmentFromScriptingAlignment(FourCharCode alignment) {
-    switch (alignment) {
-        case SKScriptingAlignmentLeft: return NSLeftTextAlignment;
-        case SKScriptingAlignmentRight: return NSRightTextAlignment;
-        case SKScriptingAlignmentCenter: return NSCenterTextAlignment;
-        default: return NSLeftTextAlignment;
-    }
-}
-
-
 NSString *SKPDFAnnotationScriptingFontColorKey = @"scriptingFontColor";
 
 
@@ -150,10 +131,6 @@
     return customFreeTextScriptingKeys;
 }
 
-- (FourCharCode)scriptingNoteType {
-    return SKScriptingTextNote;
-}
-
 - (id)textContents {
     NSTextStorage *textContents = [super textContents];
     if ([self font])
@@ -197,13 +174,13 @@
     }
 }
 
-- (FourCharCode)scriptingAlignment {
-    return SKScriptingAlignmentFromAlignment([self alignment]);
+- (NSTextAlignment)scriptingAlignment {
+    return [self alignment];
 }
 
-- (void)setScriptingAlignment:(FourCharCode)alignment {
+- (void)setScriptingAlignment:(NSTextAlignment)alignment {
     if ([self isEditable]) {
-        [self setAlignment:SKAlignmentFromScriptingAlignment(alignment)];
+        [self setAlignment:alignment];
     }
 }
 

Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m       2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationInk_SKExtensions.m       2010-12-22 11:42:02 UTC (rev 
7003)
@@ -179,10 +179,6 @@
     return customInkScriptingKeys;
 }
 
-- (FourCharCode)scriptingNoteType {
-    return SKScriptingInkNote;
-}
-
 - (NSArray *)scriptingPointLists {
     NSPoint origin = [self bounds].origin;
     NSMutableArray *pointLists = [NSMutableArray array];

Modified: trunk/PDFAnnotationLine_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.h      2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationLine_SKExtensions.h      2010-12-22 11:42:02 UTC (rev 
7003)
@@ -40,19 +40,6 @@
 #import <Quartz/Quartz.h>
 
 
-enum {
-    SKScriptingLineStyleNone = 'LSNo',
-    SKScriptingLineStyleSquare = 'LSSq',
-    SKScriptingLineStyleCircle = 'LSCi',
-    SKScriptingLineStyleDiamond = 'LSDi',
-    SKScriptingLineStyleOpenArrow = 'LSOA',
-    SKScriptingLineStyleClosedArrow = 'LSCA'
-};
-
-extern FourCharCode SKScriptingLineStyleFromLineStyle(PDFLineStyle lineStyle);
-extern PDFLineStyle SKLineStyleFromScriptingLineStyle(FourCharCode lineStyle);
-
-
 extern NSString *SKPDFAnnotationStartPointAsQDPointKey;
 extern NSString *SKPDFAnnotationEndPointAsQDPointKey;
 extern NSString *SKPDFAnnotationScriptingStartLineStyleKey;
@@ -63,8 +50,8 @@
 
 - (void)setStartPointAsQDPoint:(NSData *)inQDPointAsData;
 - (void)setEndPointAsQDPoint:(NSData *)inQDPointAsData;
-- (void)setScriptingStartLineStyle:(FourCharCode)style;
-- (void)setScriptingEndLineStyle:(FourCharCode)style;
+- (void)setScriptingStartLineStyle:(PDFLineStyle)style;
+- (void)setScriptingEndLineStyle:(PDFLineStyle)style;
 - (void)setScriptingInteriorColor:(NSColor *)newColor;
 
 @end

Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m      2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationLine_SKExtensions.m      2010-12-22 11:42:02 UTC (rev 
7003)
@@ -48,31 +48,6 @@
 #import "NSData_SKExtensions.h"
 
 
-FourCharCode SKScriptingLineStyleFromLineStyle(PDFLineStyle lineStyle) {
-    switch (lineStyle) {
-        case kPDFLineStyleNone: return SKScriptingLineStyleNone;
-        case kPDFLineStyleSquare: return SKScriptingLineStyleSquare;
-        case kPDFLineStyleCircle: return SKScriptingLineStyleCircle;
-        case kPDFLineStyleDiamond: return SKScriptingLineStyleDiamond;
-        case kPDFLineStyleOpenArrow: return SKScriptingLineStyleOpenArrow;
-        case kPDFLineStyleClosedArrow: return SKScriptingLineStyleClosedArrow;
-        default: return SKScriptingLineStyleNone;
-    }
-}
-
-PDFLineStyle SKLineStyleFromScriptingLineStyle(FourCharCode lineStyle) {
-    switch (lineStyle) {
-        case kPDFLineStyleNone: return SKScriptingLineStyleNone;
-        case kPDFLineStyleSquare: return SKScriptingLineStyleSquare;
-        case kPDFLineStyleCircle: return SKScriptingLineStyleCircle;
-        case kPDFLineStyleDiamond: return SKScriptingLineStyleDiamond;
-        case kPDFLineStyleOpenArrow: return SKScriptingLineStyleOpenArrow;
-        case kPDFLineStyleClosedArrow: return SKScriptingLineStyleClosedArrow;
-        default: return SKScriptingLineStyleNone;
-    }
-}
-
-
 NSString *SKPDFAnnotationStartPointAsQDPointKey = @"startPointAsQDPoint";
 NSString *SKPDFAnnotationEndPointAsQDPointKey = @"endPointAsQDPoint";
 NSString *SKPDFAnnotationScriptingStartLineStyleKey = 
@"scriptingStartLineStyle";
@@ -170,10 +145,6 @@
     return customLineScriptingKeys;
 }
 
-- (FourCharCode)scriptingNoteType {
-    return SKScriptingLineNote;
-}
-
 - (void)setStartPointAsQDPoint:(NSData *)inQDPointAsData {
     if ([self isEditable] && inQDPointAsData && [inQDPointAsData 
isEqual:[NSNull null]] == NO) {
         NSPoint startPoint = [inQDPointAsData pointValueAsQDPoint];
@@ -246,23 +217,23 @@
     return [NSData dataWithPointAsQDPoint:endPoint];
 }
 
-- (FourCharCode)scriptingStartLineStyle {
-    return SKScriptingLineStyleFromLineStyle([self startLineStyle]);
+- (PDFLineStyle)scriptingStartLineStyle {
+    return [self startLineStyle];
 }
 
-- (FourCharCode)scriptingEndLineStyle {
-    return SKScriptingLineStyleFromLineStyle([self endLineStyle]);
+- (PDFLineStyle)scriptingEndLineStyle {
+    return [self endLineStyle];
 }
 
-- (void)setScriptingStartLineStyle:(FourCharCode)style {
+- (void)setScriptingStartLineStyle:(PDFLineStyle)style {
     if ([self isEditable]) {
-        [self setStartLineStyle:SKLineStyleFromScriptingLineStyle(style)];
+        [self setStartLineStyle:style];
     }
 }
 
-- (void)setScriptingEndLineStyle:(FourCharCode)style {
+- (void)setScriptingEndLineStyle:(PDFLineStyle)style {
     if ([self isEditable]) {
-        [self setEndLineStyle:SKLineStyleFromScriptingLineStyle(style)];
+        [self setEndLineStyle:style];
     }
 }
 

Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m    2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m    2010-12-22 11:42:02 UTC (rev 
7003)
@@ -315,18 +315,6 @@
     return customMarkupScriptingKeys;
 }
 
-- (FourCharCode)scriptingNoteType {
-    switch ([self markupType]) {
-        case kPDFMarkupTypeUnderline:
-            return SKScriptingUnderlineNote;
-        case kPDFMarkupTypeStrikeOut:
-            return SKScriptingStrikeOutNote;
-        case kPDFMarkupTypeHighlight:
-        default:
-            return SKScriptingHighlightNote;
-    }
-}
-
 - (id)selectionSpecifier {
     PDFSelection *sel = [self selection];
     return [sel hasCharacters] ? [sel objectSpecifier] : [NSArray array];

Modified: trunk/PDFAnnotationSquare_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationSquare_SKExtensions.m    2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationSquare_SKExtensions.m    2010-12-22 11:42:02 UTC (rev 
7003)
@@ -104,10 +104,6 @@
     return customSquareScriptingKeys;
 }
 
-- (FourCharCode)scriptingNoteType {
-    return SKScriptingSquareNote;
-}
-
 - (NSColor *)scriptingInteriorColor {
     return [self interiorColor];
 }

Modified: trunk/PDFAnnotationText_SKExtensions.h
===================================================================
--- trunk/PDFAnnotationText_SKExtensions.h      2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationText_SKExtensions.h      2010-12-22 11:42:02 UTC (rev 
7003)
@@ -40,24 +40,9 @@
 #import <Quartz/Quartz.h>
 
 
-enum {
-    SKScriptingTextAnnotationIconComment = 'ICmt',
-    SKScriptingTextAnnotationIconKey = 'IKey',
-    SKScriptingTextAnnotationIconNote = 'INot',
-    SKScriptingTextAnnotationIconHelp = 'IHlp',
-    SKScriptingTextAnnotationIconNewParagraph = 'INPa',
-    SKScriptingTextAnnotationIconParagraph = 'IPar',
-    SKScriptingTextAnnotationIconInsert = 'IIns'
-};
-
-
-extern FourCharCode SKScriptingIconTypeFromIconType(PDFTextAnnotationIconType 
iconType);
-extern PDFTextAnnotationIconType SKIconTypeFromScriptingIconType(FourCharCode 
iconType);
-
-
 extern NSString *SKPDFAnnotationScriptingIconTypeKey;
 
 
 @interface PDFAnnotationText (SKExtensions)
-- (void)setScriptingIconType:(FourCharCode)type;
+- (void)setScriptingIconType:(PDFTextAnnotationIconType)iconType;
 @end

Modified: trunk/PDFAnnotationText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationText_SKExtensions.m      2010-12-21 19:15:52 UTC (rev 
7002)
+++ trunk/PDFAnnotationText_SKExtensions.m      2010-12-22 11:42:02 UTC (rev 
7003)
@@ -43,33 +43,6 @@
 #import "SKFDFParser.h"
 
 
-FourCharCode SKScriptingIconTypeFromIconType(PDFTextAnnotationIconType 
iconType) {
-    switch (iconType) {
-        case kPDFTextAnnotationIconComment: return 
SKScriptingTextAnnotationIconComment;
-        case kPDFTextAnnotationIconKey: return 
SKScriptingTextAnnotationIconKey;
-        case kPDFTextAnnotationIconNote: return 
SKScriptingTextAnnotationIconNote;
-        case kPDFTextAnnotationIconHelp: return 
SKScriptingTextAnnotationIconHelp;
-        case kPDFTextAnnotationIconNewParagraph: return 
SKScriptingTextAnnotationIconNewParagraph;
-        case kPDFTextAnnotationIconParagraph: return 
SKScriptingTextAnnotationIconParagraph;
-        case kPDFTextAnnotationIconInsert: return 
SKScriptingTextAnnotationIconInsert;
-        default: return kPDFTextAnnotationIconNote;
-    }
-}
-
-PDFTextAnnotationIconType SKIconTypeFromScriptingIconType(FourCharCode 
iconType) {
-    switch (iconType) {
-        case SKScriptingTextAnnotationIconComment: return 
kPDFTextAnnotationIconComment;
-        case SKScriptingTextAnnotationIconKey: return 
kPDFTextAnnotationIconKey;
-        case SKScriptingTextAnnotationIconNote: return 
kPDFTextAnnotationIconNote;
-        case SKScriptingTextAnnotationIconHelp: return 
kPDFTextAnnotationIconHelp;
-        case SKScriptingTextAnnotationIconNewParagraph: return 
kPDFTextAnnotationIconNewParagraph;
-        case SKScriptingTextAnnotationIconParagraph: return 
kPDFTextAnnotationIconParagraph;
-        case SKScriptingTextAnnotationIconInsert: return 
kPDFTextAnnotationIconInsert;
-        default: return kPDFTextAnnotationIconNote;
-    }
-}
-
-
 NSString *SKPDFAnnotationScriptingIconTypeKey = @"scriptingIconType";
 
 @implementation PDFAnnotationText (SKExtensions)
@@ -123,17 +96,13 @@
     return customTextScriptingKeys;
 }
 
-- (FourCharCode)scriptingNoteType {
-    return SKScriptingAnchoredNote;
+- (PDFTextAnnotationIconType)scriptingIconType {
+    return [self iconType];
 }
 
-- (FourCharCode)scriptingIconType {
-    return SKScriptingIconTypeFromIconType([self iconType]);
-}
-
-- (void)setScriptingIconType:(FourCharCode)type {
+- (void)setScriptingIconType:(PDFTextAnnotationIconType)iconType {
     if ([self isEditable]) {
-        [self setIconType:SKIconTypeFromScriptingIconType(type)];
+        [self setIconType:iconType];
     }
 }
 

Modified: trunk/PDFAnnotation_SKExtensions.h
===================================================================
--- trunk/PDFAnnotation_SKExtensions.h  2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/PDFAnnotation_SKExtensions.h  2010-12-22 11:42:02 UTC (rev 7003)
@@ -40,31 +40,6 @@
 #import <Quartz/Quartz.h>
 
 
-enum {
-    SKScriptingTextNote = 'NTxt',
-    SKScriptingAnchoredNote = 'NAnc',
-    SKScriptingCircleNote = 'NCir',
-    SKScriptingSquareNote = 'NSqu',
-    SKScriptingHighlightNote = 'NHil',
-    SKScriptingUnderlineNote = 'NUnd',
-    SKScriptingStrikeOutNote = 'NStr',
-    SKScriptingLineNote = 'NLin',
-    SKScriptingInkNote = 'NInk'
-};
-
-enum {
-    SKScriptingBorderStyleSolid = 'Soli',
-    SKScriptingBorderStyleDashed = 'Dash',
-    SKScriptingBorderStyleBeveled = 'Bevl',
-    SKScriptingBorderStyleInset = 'Inst',
-    SKScriptingBorderStyleUnderline = 'Undl'
-};
-
-
-extern FourCharCode SKScriptingBorderStyleFromBorderStyle(PDFBorderStyle 
borderStyle);
-extern PDFBorderStyle SKBorderStyleFromScriptingBorderStyle(FourCharCode 
borderStyle);
-
-extern NSString *SKPDFAnnotationScriptingNoteTypeKey;
 extern NSString *SKPDFAnnotationScriptingBorderStyleKey;
 extern NSString *SKPDFAnnotationScriptingColorKey;
 extern NSString *SKPDFAnnotationScriptingModificationDateKey;
@@ -114,7 +89,6 @@
 
 + (NSSet *)customScriptingKeys;
 - (NSScriptObjectSpecifier *)objectSpecifier;
-- (FourCharCode)scriptingNoteType;
 - (NSColor *)scriptingColor;
 - (void)setScriptingColor:(NSColor *)newColor;
 - (PDFPage *)scriptingPage;
@@ -122,23 +96,23 @@
 - (void)setScriptingModificationDate:(NSDate *)date;
 - (NSString *)scriptingUserName;
 - (void)setScriptingUserName:(NSString *)name;
-- (FourCharCode)scriptingIconType;
+- (PDFTextAnnotationIconType)scriptingIconType;
 - (id)textContents;
 - (void)setTextContents:(id)text;
 - (id)richText;
 - (void)setBoundsAsQDRect:(NSData *)inQDBoundsAsData;
 - (NSData *)boundsAsQDRect;
-- (FourCharCode)scriptingAlignment;
+- (NSTextAlignment)scriptingAlignment;
 - (NSString *)fontName;
 - (CGFloat)fontSize;
 - (NSColor *)scriptingFontColor;
 - (NSColor *)scriptingInteriorColor;
-- (FourCharCode)scriptingBorderStyle;
-- (void)setScriptingBorderStyle:(NSInteger)style;
+- (PDFBorderStyle)scriptingBorderStyle;
+- (void)setScriptingBorderStyle:(PDFBorderStyle)style;
 - (NSData *)startPointAsQDPoint;
 - (NSData *)endPointAsQDPoint;
-- (FourCharCode)scriptingStartLineStyle;
-- (FourCharCode)scriptingEndLineStyle;
+- (PDFLineStyle)scriptingStartLineStyle;
+- (PDFLineStyle)scriptingEndLineStyle;
 - (id)selectionSpecifier;
 - (NSArray *)scriptingPointLists;
 

Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m  2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/PDFAnnotation_SKExtensions.m  2010-12-22 11:42:02 UTC (rev 7003)
@@ -62,30 +62,6 @@
 #define SKUserNameKey @"SKUserName"
 
 
-FourCharCode SKScriptingBorderStyleFromBorderStyle(PDFBorderStyle borderStyle) 
{
-    switch (borderStyle) {
-        case kPDFBorderStyleSolid: return SKScriptingBorderStyleSolid;
-        case kPDFBorderStyleDashed: return SKScriptingBorderStyleDashed;
-        case kPDFBorderStyleBeveled: return SKScriptingBorderStyleBeveled;
-        case kPDFBorderStyleInset: return SKScriptingBorderStyleInset;
-        case kPDFBorderStyleUnderline: return SKScriptingBorderStyleUnderline;
-        default: return SKScriptingBorderStyleSolid;
-    }
-}
-
-PDFBorderStyle SKBorderStyleFromScriptingBorderStyle(FourCharCode borderStyle) 
{
-    switch (borderStyle) {
-        case SKScriptingBorderStyleSolid: return kPDFBorderStyleSolid;
-        case SKScriptingBorderStyleDashed: return kPDFBorderStyleDashed;
-        case SKScriptingBorderStyleBeveled: return kPDFBorderStyleBeveled;
-        case SKScriptingBorderStyleInset: return kPDFBorderStyleInset;
-        case SKScriptingBorderStyleUnderline: return kPDFBorderStyleUnderline;
-        default: return kPDFBorderStyleSolid;
-    }
-}
-
-
-NSString *SKPDFAnnotationScriptingNoteTypeKey = @"scriptingNoteType";
 NSString *SKPDFAnnotationScriptingBorderStyleKey = @"scriptingBorderStyle";
 NSString *SKPDFAnnotationScriptingColorKey = @"scriptingColor";
 NSString *SKPDFAnnotationScriptingModificationDateKey = 
@"scriptingModificationDate";
@@ -93,10 +69,6 @@
 
 BOOL SKPDFAnnotationLeaksBorder = NO;
 
-enum {
-    SKPDFAnnotationScriptingNoteClassCode = 'Note'
-};
-
 @implementation PDFAnnotation (SKExtensions)
 
 + (void)checkPDFKit {
@@ -319,6 +291,7 @@
     // remove all custom properties that are not valid for this class
     NSMutableDictionary *properties = [[[super scriptingProperties] 
mutableCopy] autorelease];
     NSMutableSet *customKeys = [allCustomScriptingKeys mutableCopy];
+    [customKeys minusSet:[[self class] customScriptingKeys]];
     [properties removeObjectsForKeys:[customKeys allObjects]];
     [customKeys release];
     return properties;
@@ -332,10 +305,6 @@
         [self setScriptingBorderStyle:[style integerValue]];
 }
 
-- (FourCharCode)scriptingNoteType {
-    return 0;
-}
-
 - (NSColor *)scriptingColor {
     return [self color];
 }
@@ -370,8 +339,8 @@
     }
 }
 
-- (FourCharCode)scriptingIconType {
-    return SKScriptingTextAnnotationIconNote;
+- (PDFTextAnnotationIconType)scriptingIconType {
+    return kPDFTextAnnotationIconNote;
 }
 
 - (id)textContents;
@@ -430,17 +399,17 @@
     return nil;
 }
 
-- (FourCharCode)scriptingAlignment {
-    return SKScriptingAlignmentLeft;
+- (NSTextAlignment)scriptingAlignment {
+    return NSLeftTextAlignment;
 }
 
-- (FourCharCode)scriptingBorderStyle {
-    return SKScriptingBorderStyleFromBorderStyle([self borderStyle]);
+- (PDFBorderStyle)scriptingBorderStyle {
+    return [self borderStyle];
 }
 
-- (void)setScriptingBorderStyle:(NSInteger)borderStyle {
+- (void)setScriptingBorderStyle:(PDFBorderStyle)borderStyle {
     if ([self isEditable]) {
-        [self 
setBorderStyle:SKBorderStyleFromScriptingBorderStyle(borderStyle)];
+        [self setBorderStyle:borderStyle];
     }
 }
 
@@ -452,12 +421,12 @@
     return nil;
 }
 
-- (FourCharCode)scriptingStartLineStyle {
-    return SKScriptingLineStyleNone;
+- (PDFLineStyle)scriptingStartLineStyle {
+    return kPDFLineStyleNone;
 }
 
-- (FourCharCode)scriptingEndLineStyle {
-    return SKScriptingLineStyleNone;
+- (PDFLineStyle)scriptingEndLineStyle {
+    return kPDFLineStyleNone;
 }
 
 - (id)selectionSpecifier {

Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m        2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/PDFPage_SKExtensions.m        2010-12-22 11:42:02 UTC (rev 7003)
@@ -483,10 +483,10 @@
         bounds.size.height = [[NSUserDefaults standardUserDefaults] 
floatForKey:SKDefaultNoteHeightKey];
         bounds = 
NSIntegralRect(SKRectFromCenterAndSize(SKIntegralPoint(SKCenterPoint([self 
boundsForBox:kPDFDisplayBoxCropBox])), bounds.size));
         
-        FourCharCode type = [[properties 
objectForKey:SKPDFAnnotationScriptingNoteTypeKey] unsignedIntValue];
-        [props removeObjectForKey:SKPDFAnnotationScriptingNoteTypeKey];
+        NSString *type = [properties objectForKey:SKNPDFAnnotationTypeKey];
+        [props removeObjectForKey:SKNPDFAnnotationTypeKey];
         
-        if (type == SKScriptingHighlightNote || type == 
SKScriptingStrikeOutNote || type == SKScriptingUnderlineNote) {
+        if ([type isEqualToString:SKNHighlightString] || [type 
isEqualToString:SKNStrikeOutString] || [type isEqualToString:SKNUnderlineString 
]) {
             id selSpec = [properties 
objectForKey:SKPDFAnnotationSelectionSpecifierKey];
             PDFSelection *selection;
             NSInteger markupType = 0;
@@ -495,15 +495,15 @@
                 [[NSScriptCommand currentCommand] 
setScriptErrorNumber:NSRequiredArgumentsMissingScriptError]; 
                 [[NSScriptCommand currentCommand] 
setScriptErrorString:NSLocalizedString(@"New markup notes need a selection.", 
@"Error description")];
             } else if (selection = [PDFSelection 
selectionWithSpecifier:selSpec]) {
-                if (type == SKScriptingHighlightNote)
+                if ([type isEqualToString:SKNHighlightString])
                     markupType = kPDFMarkupTypeHighlight;
-                else if (type == SKScriptingUnderlineNote)
+                else if ([type isEqualToString:SKNUnderlineString])
                     markupType = kPDFMarkupTypeUnderline;
-                else if (type == SKScriptingStrikeOutNote)
+                else if ([type isEqualToString:SKNStrikeOutString])
                     markupType = kPDFMarkupTypeStrikeOut;
                 annotation = [[PDFAnnotationMarkup alloc] 
initSkimNoteWithSelection:selection markupType:markupType];
             }
-        } else if (type == SKScriptingInkNote) {
+        } else if ([type isEqualToString:SKNInkString]) {
             NSArray *pointLists = [properties 
objectForKey:SKPDFAnnotationScriptingPointListsKey];
             [props removeObjectForKey:SKPDFAnnotationScriptingPointListsKey];
             if ([pointLists isKindOfClass:[NSArray class]] == NO) {
@@ -537,16 +537,16 @@
                 annotation = [[PDFAnnotationInk alloc] 
initSkimNoteWithPaths:paths];
                 [paths release];
             }
-        } else if (type == SKScriptingTextNote) {
+        } else if ([type isEqualToString:SKNFreeTextString]) {
             annotation = [[PDFAnnotationFreeText alloc] 
initSkimNoteWithBounds:bounds];
-        } else if (type == SKScriptingAnchoredNote) {
+        } else if ([type isEqualToString:SKNNoteString]) {
             bounds.size = SKNPDFAnnotationNoteSize;
             annotation = [[SKNPDFAnnotationNote alloc] 
initSkimNoteWithBounds:bounds];
-        } else if (type == SKScriptingCircleNote) {
+        } else if ([type isEqualToString:SKNCircleString]) {
             annotation = [[PDFAnnotationCircle alloc] 
initSkimNoteWithBounds:bounds];
-        } else if (type == SKScriptingSquareNote) {
+        } else if ([type isEqualToString:SKNSquareString]) {
             annotation = [[PDFAnnotationSquare alloc] 
initSkimNoteWithBounds:bounds];
-        } else if (type == SKScriptingLineNote) {
+        } else if ([type isEqualToString:SKNLineString]) {
             annotation = [[PDFAnnotationLine alloc] 
initSkimNoteWithBounds:bounds];
         } else if (contentsValue) {
             annotation = [[PDFAnnotationFreeText alloc] 
initSkimNoteWithBounds:bounds];

Modified: trunk/SKApplicationController.h
===================================================================
--- trunk/SKApplicationController.h     2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/SKApplicationController.h     2010-12-22 11:42:02 UTC (rev 7003)
@@ -61,7 +61,9 @@
 @property (nonatomic, copy) NSDictionary *defaultPdfViewSettings, 
*defaultFullScreenPdfViewSettings;
 @property (nonatomic, copy) NSColor *backgroundColor, 
*fullScreenBackgroundColor, *pageBackgroundColor, *defaultTextNoteFontColor;
 @property (nonatomic, copy) NSDictionary *defaultNoteColors, 
*defaultLineWidths, *defaultLineStyles, *defaultDashPatterns, 
*defaultFontNames, *defaultFontSizes;
-...@property (nonatomic) FourCharCode defaultStartLineStyle, 
defaultEndLineStyle, defaultAlignment, defaultIconType;
+...@property (nonatomic) PDFLineStyle defaultStartLineStyle, 
defaultEndLineStyle;
+...@property (nonatomic) NSTextAlignment defaultAlignment;
+...@property (nonatomic) PDFTextAnnotationIconType defaultIconType;
 
 - (NSArray *)bookmarks;
 - (void)insertObject:(SKBookmark *)bookmark 
inBookmarksAtIndex:(NSUInteger)anIndex;

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/SKApplicationController.m     2010-12-22 11:42:02 UTC (rev 7003)
@@ -459,7 +459,7 @@
 }
 
 - (NSDictionary *)defaultPdfViewSettings {
-    return SKScriptingPDFViewSettingsFromPDFViewSettings([[NSUserDefaults 
standardUserDefaults] dictionaryForKey:SKDefaultPDFDisplaySettingsKey]);
+    return [[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultPDFDisplaySettingsKey];
 }
 
 - (void)setDefaultPdfViewSettings:(NSDictionary *)settings {
@@ -467,12 +467,12 @@
         return;
     NSMutableDictionary *setup = [NSMutableDictionary dictionary];
     [setup addEntriesFromDictionary:[[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultPDFDisplaySettingsKey]];
-    [setup 
addEntriesFromDictionary:SKPDFViewSettingsFromScriptingPDFViewSettings(settings)];
+    [setup addEntriesFromDictionary:settings];
     [[NSUserDefaults standardUserDefaults] setObject:setup 
forKey:SKDefaultPDFDisplaySettingsKey];
 }
 
 - (NSDictionary *)defaultFullScreenPdfViewSettings {
-    return SKScriptingPDFViewSettingsFromPDFViewSettings([[NSUserDefaults 
standardUserDefaults] 
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey]);
+    return [[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey];
 }
 
 - (void)setDefaultFullScreenPdfViewSettings:(NSDictionary *)settings {
@@ -482,7 +482,7 @@
     if ([settings count]) {
         [setup addEntriesFromDictionary:[[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultPDFDisplaySettingsKey]];
         [setup addEntriesFromDictionary:[[NSUserDefaults standardUserDefaults] 
dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey]];
-        [setup 
addEntriesFromDictionary:SKPDFViewSettingsFromScriptingPDFViewSettings(settings)];
+        [setup addEntriesFromDictionary:settings];
     }
     [[NSUserDefaults standardUserDefaults] setObject:setup 
forKey:SKDefaultFullScreenPDFDisplaySettingsKey];
 }
@@ -593,11 +593,11 @@
 - (NSDictionary *)defaultLineStyles {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [NSNumber 
numberWithUnsignedInt:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKFreeTextNoteLineStyleKey])], SKNFreeTextString, 
-        [NSNumber 
numberWithUnsignedInt:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKCircleNoteLineStyleKey])], SKNCircleString, 
-        [NSNumber 
numberWithUnsignedInt:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKSquareNoteLineStyleKey])], SKNSquareString, 
-        [NSNumber 
numberWithUnsignedInt:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKLineNoteLineStyleKey])], SKNLineString,
-        [NSNumber 
numberWithUnsignedInt:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKInkNoteLineStyleKey])], SKNInkString,
+        [NSNumber numberWithInteger:[sud 
integerForKey:SKFreeTextNoteLineStyleKey]], SKNFreeTextString, 
+        [NSNumber numberWithInteger:[sud 
integerForKey:SKCircleNoteLineStyleKey]], SKNCircleString, 
+        [NSNumber numberWithInteger:[sud 
integerForKey:SKSquareNoteLineStyleKey]], SKNSquareString, 
+        [NSNumber numberWithInteger:[sud 
integerForKey:SKLineNoteLineStyleKey]], SKNLineString,
+        [NSNumber numberWithInteger:[sud 
integerForKey:SKInkNoteLineStyleKey]], SKNInkString,
         nil];
 }
 
@@ -605,15 +605,15 @@
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     NSNumber *number;
     if (number = [dict objectForKey:SKNFreeTextString])
-        [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedIntValue]) forKey:SKFreeTextNoteLineStyleKey];
+        [sud setInteger:[number integerValue] 
forKey:SKFreeTextNoteLineStyleKey];
     if (number = [dict objectForKey:SKNCircleString])
-        [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedIntValue]) forKey:SKCircleNoteLineStyleKey];
+        [sud setInteger:[number integerValue] forKey:SKCircleNoteLineStyleKey];
     if (number = [dict objectForKey:SKNSquareString])
-        [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedIntValue]) forKey:SKSquareNoteLineStyleKey];
+        [sud setInteger:[number integerValue] forKey:SKSquareNoteLineStyleKey];
     if (number = [dict objectForKey:SKNLineString])
-        [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedIntValue]) forKey:SKLineNoteLineStyleKey];
+        [sud setInteger:[number integerValue] forKey:SKLineNoteLineStyleKey];
     if (number = [dict objectForKey:SKNInkString])
-        [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedIntValue]) forKey:SKInkNoteLineStyleKey];
+        [sud setInteger:[number integerValue] forKey:SKInkNoteLineStyleKey];
 }
 
 - (NSDictionary *)defaultDashPatterns {
@@ -684,36 +684,36 @@
     [[NSUserDefaults standardUserDefaults] setColor:color 
forKey:SKFreeTextNoteFontColorKey];
 }
 
-- (FourCharCode)defaultStartLineStyle {
-    return SKScriptingLineStyleFromLineStyle([[NSUserDefaults 
standardUserDefaults] integerForKey:SKLineNoteStartLineStyleKey]);
+- (PDFLineStyle)defaultStartLineStyle {
+    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteStartLineStyleKey];
 }
 
-- (void)setDefaultStartLineStyle:(FourCharCode)style {
-    [[NSUserDefaults standardUserDefaults] 
setInteger:SKLineStyleFromScriptingLineStyle(style) 
forKey:SKLineNoteStartLineStyleKey];
+- (void)setDefaultStartLineStyle:(PDFLineStyle)style {
+    [[NSUserDefaults standardUserDefaults] setInteger:style 
forKey:SKLineNoteStartLineStyleKey];
 }
 
-- (FourCharCode)defaultEndLineStyle {
-    return SKScriptingLineStyleFromLineStyle([[NSUserDefaults 
standardUserDefaults] integerForKey:SKLineNoteEndLineStyleKey]);
+- (PDFLineStyle)defaultEndLineStyle {
+    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKLineNoteEndLineStyleKey];
 }
 
-- (void)setDefaultEndLineStyle:(FourCharCode)style {
-    [[NSUserDefaults standardUserDefaults] 
setInteger:SKLineStyleFromScriptingLineStyle(style) 
forKey:SKLineNoteEndLineStyleKey];
+- (void)setDefaultEndLineStyle:(PDFLineStyle)style {
+    [[NSUserDefaults standardUserDefaults] setInteger:style 
forKey:SKLineNoteEndLineStyleKey];
 }
 
-- (FourCharCode)defaultAlignment {
-    return SKScriptingAlignmentFromAlignment([[NSUserDefaults 
standardUserDefaults] integerForKey:SKFreeTextNoteAlignmentKey]);
+- (NSTextAlignment)defaultAlignment {
+    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKFreeTextNoteAlignmentKey];
 }
 
-- (void)setDefaultAlignment:(FourCharCode)alignment {
-    [[NSUserDefaults standardUserDefaults] 
setInteger:SKAlignmentFromScriptingAlignment(alignment) 
forKey:SKFreeTextNoteAlignmentKey];
+- (void)setDefaultAlignment:(NSTextAlignment)alignment {
+    [[NSUserDefaults standardUserDefaults] setInteger:alignment 
forKey:SKFreeTextNoteAlignmentKey];
 }
 
-- (FourCharCode)defaultIconType {
-    return SKScriptingIconTypeFromIconType([[NSUserDefaults 
standardUserDefaults] integerForKey:SKAnchoredNoteIconTypeKey]);
+- (PDFTextAnnotationIconType)defaultIconType {
+    return [[NSUserDefaults standardUserDefaults] 
integerForKey:SKAnchoredNoteIconTypeKey];
 }
 
-- (void)setDefaultIconType:(FourCharCode)type {
-    [[NSUserDefaults standardUserDefaults] 
setInteger:SKIconTypeFromScriptingIconType(type) 
forKey:SKAnchoredNoteIconTypeKey];
+- (void)setDefaultIconType:(PDFTextAnnotationIconType)type {
+    [[NSUserDefaults standardUserDefaults] setInteger:type 
forKey:SKAnchoredNoteIconTypeKey];
 }
 
 @end

Modified: trunk/SKBookmark.h
===================================================================
--- trunk/SKBookmark.h  2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/SKBookmark.h  2010-12-22 11:42:02 UTC (rev 7003)
@@ -89,7 +89,6 @@
 - (void)insertObject:(SKBookmark *)child inChildrenAtIndex:(NSUInteger)anIndex;
 - (void)removeObjectFromChildrenAtIndex:(NSUInteger)anIndex;
 
-...@property (nonatomic, readonly) FourCharCode scriptingBookmarkType;
 @property (nonatomic, readonly) NSURL *scriptingFile;
 @property (nonatomic, readonly) SKBookmark *scriptingParent;
 @property (nonatomic, readonly) NSArray *entireContents;

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/SKBookmark.m  2010-12-22 11:42:02 UTC (rev 7003)
@@ -90,7 +90,7 @@
 @implementation SKBookmark
 
 @synthesize parent;
-...@dynamic properties, bookmarkType, label, icon, path, pageIndex, 
pageNumber, scriptingBookmarkType, scriptingFile, scriptingParent, 
entireContents;
+...@dynamic properties, bookmarkType, label, icon, path, pageIndex, 
pageNumber, scriptingFile, scriptingParent, entireContents;
 
 static SKPlaceholderBookmark *defaultPlaceholderBookmark = nil;
 static Class SKBookmarkClass = Nil;
@@ -237,8 +237,6 @@
     }
 }
 
-- (FourCharCode)scriptingBookmarkType { return 0; }
-
 - (NSURL *)scriptingFile {
     NSString *path = [self path];
     return path ? [NSURL fileURLWithPath:path] : nil;
@@ -502,10 +500,6 @@
     }
 }
 
-- (FourCharCode)scriptingBookmarkType {
-    return SKScriptingBookmarkTypeBookmark;
-}
-
 @end
 
 #pragma mark -
@@ -576,10 +570,6 @@
     [children removeObjectAtIndex:anIndex];
 }
 
-- (FourCharCode)scriptingBookmarkType {
-    return SKScriptingBookmarkTypeFolder;
-}
-
 - (NSArray *)entireContents {
     NSMutableArray *contents = [NSMutableArray array];
     for (SKBookmark *bookmark in [self children]) {
@@ -595,17 +585,17 @@
         NSURL *aURL = [properties objectForKey:@"scriptingFile"] ?: 
contentsValue;
         NSString *aPath = [aURL respondsToSelector:@selector(path)] ? [aURL 
path] : nil;
         NSString *aLabel = [properties objectForKey:@"label"];
-        FourCharCode type = [[properties 
objectForKey:@"scriptingBookmarkType"] unsignedIntValue];
+        NSInteger type = [[properties objectForKey:@"scriptingBookmarkType"] 
integerValue];
         if (type == 0) {
             if (aURL == nil)
-                type = SKScriptingBookmarkTypeSession;
+                type = SKBookmarkTypeSession;
             else if ([[NSWorkspace sharedWorkspace] type:[[NSWorkspace 
sharedWorkspace] typeOfFile:aPath error:NULL] conformsToType:(NSString 
*)kUTTypeFolder])
-                type = SKScriptingBookmarkTypeFolder;
+                type = SKBookmarkTypeFolder;
             else
-                type = SKScriptingBookmarkTypeBookmark;
+                type = SKBookmarkTypeBookmark;
         }
         switch (type) {
-            case SKScriptingBookmarkTypeBookmark:
+            case SKBookmarkTypeBookmark:
             {
                 Class docClass;
                 if (aPath == nil) {
@@ -629,7 +619,7 @@
                 }
                 break;
             }
-            case SKScriptingBookmarkTypeFolder:
+            case SKBookmarkTypeFolder:
             {
                 NSArray *aChildren = nil;
                 if (aPath) {
@@ -640,13 +630,13 @@
                 bookmark = [[SKBookmark alloc] 
initFolderWithChildren:aChildren label:aLabel ?: @""];
                 break;
             }
-            case SKScriptingBookmarkTypeSession:
+            case SKBookmarkTypeSession:
             {
                 NSArray *setups = [[NSApp orderedDocuments] 
valueForKey:@"currentDocumentSetup"];
                 bookmark = [[SKBookmark alloc] initSessionWithSetups:setups 
label:aLabel ?: @""];
                 break;
             }
-            case SKScriptingBookmarkTypeSeparator:
+            case SKBookmarkTypeSeparator:
                 bookmark = [[SKBookmark alloc] initSeparator];
                 break;
             default:
@@ -730,9 +720,6 @@
 - (NSImage *)icon {
     return [NSImage imageNamed:NSImageNameMultipleDocuments];
 }
-- (FourCharCode)scriptingBookmarkType {
-    return SKScriptingBookmarkTypeSession;
-}
 
 - (void)insertObject:(SKBookmark *)child inChildrenAtIndex:(NSUInteger)anIndex 
{}
 - (void)removeObjectFromChildrenAtIndex:(NSUInteger)anIndex {}
@@ -766,8 +753,4 @@
     return SKBookmarkTypeSeparator;
 }
 
-- (FourCharCode)scriptingBookmarkType {
-    return SKScriptingBookmarkTypeSeparator;
-}
-
 @end

Modified: trunk/SKBoundsCommand.m
===================================================================
--- trunk/SKBoundsCommand.m     2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/SKBoundsCommand.m     2010-12-22 11:42:02 UTC (rev 7003)
@@ -55,7 +55,7 @@
     NSDictionary *args = [self evaluatedArguments];
     PDFPage *page = [args objectForKey:@"Page"];
     NSNumber *boxNumber = [args objectForKey:@"Box"];
-    PDFDisplayBox box = [boxNumber integerValue] == SKScriptingMediaBox ? 
kPDFDisplayBoxMediaBox : kPDFDisplayBoxCropBox;
+    PDFDisplayBox box = boxNumber ? [boxNumber integerValue] : 
kPDFDisplayBoxCropBox;
     NSRect bounds = NSZeroRect;
     
     if ([dPO isKindOfClass:[NSDocument class]]) {

Modified: trunk/SKMainDocument.h
===================================================================
--- trunk/SKMainDocument.h      2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/SKMainDocument.h      2010-12-22 11:42:02 UTC (rev 7003)
@@ -41,23 +41,6 @@
 
 extern NSString *SKSkimFileDidSaveNotification;
 
-enum {
-    SKScriptingDisplaySinglePage = '1Pg ',
-    SKScriptingDisplaySinglePageContinuous = '1PgC',
-    SKScriptingDisplayTwoUp = '2Up ',
-    SKScriptingDisplayTwoUpContinuous = '2UpC'
-};
-
-enum {
-    SKScriptingMediaBox = 'Mdia',
-    SKScriptingCropBox = 'Crop'
-};
-
-
-extern NSDictionary 
*SKScriptingPDFViewSettingsFromPDFViewSettings(NSDictionary *settings);
-extern NSDictionary 
*SKPDFViewSettingsFromScriptingPDFViewSettings(NSDictionary *settings);
-
-
 @class PDFDocument, SKMainWindowController, SKPDFView, SKLine, 
SKProgressController, SKTemporaryData;
 
 @interface SKMainDocument : NSDocument <SKPDFSynchronizerDelegate>

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/SKMainDocument.m      2010-12-22 11:42:02 UTC (rev 7003)
@@ -1980,11 +1980,11 @@
 }
 
 - (NSDictionary *)pdfViewSettings {
-    return SKScriptingPDFViewSettingsFromPDFViewSettings([[self 
mainWindowController] currentPDFSettings]);
+    return [[self mainWindowController] currentPDFSettings];
 }
 
 - (void)setPdfViewSettings:(NSDictionary *)pdfViewSettings {
-    [[self mainWindowController] 
applyPDFSettings:SKPDFViewSettingsFromScriptingPDFViewSettings(pdfViewSettings)];
+    [[self mainWindowController] applyPDFSettings:pdfViewSettings];
 }
 
 - (BOOL)isPDFDocument {
@@ -2173,56 +2173,6 @@
 @end
 
 
-NSDictionary *SKScriptingPDFViewSettingsFromPDFViewSettings(NSDictionary 
*settings) {
-    NSMutableDictionary *setup = [[settings mutableCopy] autorelease];
-    
-    FourCharCode displayMode = 0;
-    switch ([[setup objectForKey:@"displayMode"] integerValue]) {
-        case kPDFDisplaySinglePage: displayMode = 
SKScriptingDisplaySinglePage; break;
-        case kPDFDisplaySinglePageContinuous: displayMode = 
SKScriptingDisplaySinglePageContinuous; break;
-        case kPDFDisplayTwoUp: displayMode = SKScriptingDisplayTwoUp; break;
-        case kPDFDisplayTwoUpContinuous: displayMode = 
SKScriptingDisplayTwoUpContinuous; break;
-    }
-    [setup setObject:[NSNumber numberWithUnsignedInt:displayMode] 
forKey:@"displayMode"];
-    
-    FourCharCode displayBox = 0;
-    switch ([[setup objectForKey:@"displayBox"] integerValue]) {
-        case kPDFDisplayBoxMediaBox: displayBox = SKScriptingMediaBox; break;
-        case kPDFDisplayBoxCropBox: displayBox = SKScriptingCropBox; break;
-    }
-    [setup setObject:[NSNumber numberWithUnsignedInt:displayBox] 
forKey:@"displayBox"];
-    
-    return setup;
-}
-
-NSDictionary *SKPDFViewSettingsFromScriptingPDFViewSettings(NSDictionary 
*settings) {
-    NSMutableDictionary *setup = [[settings mutableCopy] autorelease];
-    NSNumber *number;
-    
-    if (number = [setup objectForKey:@"displayMode"]) {
-        NSInteger displayMode = 0;
-        switch ([number unsignedIntValue]) {
-            case SKScriptingDisplaySinglePage: displayMode = 
kPDFDisplaySinglePage; break;
-            case SKScriptingDisplaySinglePageContinuous: displayMode = 
kPDFDisplaySinglePageContinuous; break;
-            case SKScriptingDisplayTwoUp: displayMode = kPDFDisplayTwoUp; 
break;
-            case SKScriptingDisplayTwoUpContinuous: displayMode = 
kPDFDisplayTwoUpContinuous; break;
-        }
-        [setup setObject:[NSNumber numberWithInteger:displayMode] 
forKey:@"displayMode"];
-    }
-    
-    if (number = [setup objectForKey:@"displayBox"]) {
-        NSInteger displayBox = 0;
-        switch ([number unsignedIntValue]) {
-            case SKScriptingMediaBox: displayBox = kPDFDisplayBoxMediaBox; 
break;
-            case SKScriptingCropBox: displayBox = kPDFDisplayBoxCropBox; break;
-        }
-        [setup setObject:[NSNumber numberWithInteger:displayBox] 
forKey:@"displayBox"];
-    }
-    
-    return setup;
-}
-
-
 @implementation SKTemporaryData
 
 @synthesize pdfDocument, noteDicts, presentationOptions, openMetaTags, 
openMetaRating;

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2010-12-21 19:15:52 UTC (rev 7002)
+++ trunk/Skim.sdef     2010-12-22 11:42:02 UTC (rev 7003)
@@ -1026,7 +1026,7 @@
             </element>
             <property name="type" code="NTyp" type="note type" access="r"
                 description="The type of note.">
-                <cocoa key="scriptingNoteType"/>
+                <cocoa key="type"/>
             </property>
             <contents name="text" code="ctxt" type="rich text"
                 description="The text of the note. Attributes are ignored.">
@@ -1154,7 +1154,7 @@
             </property>
             <property name="type" code="rtyp" type="bookmark type" access="r"
                 description="The bookmark type.">
-                <cocoa key="scriptingBookmarkType"/>
+                <cocoa key="bookmarkType"/>
             </property>
             <contents name="file" code="file" type="file" access="r"
                 description="The file for the bookmark.">
@@ -1521,106 +1521,186 @@
 
         <enumeration name="note type" code="NTpE">
             <enumerator name="text note" code="NTxt"
-                description="Text note."/>
+                description="Text note.">
+                <cocoa string-value="FreeText"/>
+            </enumerator>
             <enumerator name="anchored note" code="NAnc"
-                description="Anchored note."/>
+                description="Anchored note.">
+                <cocoa string-value="Note"/>
+            </enumerator>
             <enumerator name="circle note" code="NCir"
-                description="Circle."/>
+                description="Circle.">
+                <cocoa string-value="Circle"/>
+            </enumerator>
             <enumerator name="box note" code="NSqu"
-                description="Box."/>
+                description="Box.">
+                <cocoa string-value="Square"/>
+            </enumerator>
             <enumerator name="highlight note" code="NHil"
-                description="Highlight."/>
+                description="Highlight.">
+                <cocoa string-value="Highlight"/>
+            </enumerator>
             <enumerator name="underline note" code="NUnd"
-                description="Underline highlight."/>
+                description="Underline highlight.">
+                <cocoa string-value="Underline"/>
+            </enumerator>
             <enumerator name="strike out note" code="NStr"
-                description="Strike out highlight."/>
+                description="Strike out highlight.">
+                <cocoa string-value="StrikeOut"/>
+            </enumerator>
             <enumerator name="line note" code="NLin"
-                description="Line."/>
+                description="Line.">
+                <cocoa string-value="Line"/>
+            </enumerator>
             <enumerator name="freehand note" code="NInk"
-                description="Freehand."/>
+                description="Freehand.">
+                <cocoa string-value="Ink"/>
+            </enumerator>
         </enumeration>
 
         <enumeration name="text alignment" code="TAlE">
             <enumerator name="left alignment" code="LeTA"
-                description="Left text alignment."/>
+                description="Left text alignment.">
+                <cocoa integer-value="0"/>
+            </enumerator>
             <enumerator name="right alignment" code="RiTA"
-                description="Right text alignment."/>
+                description="Right text alignment.">
+                <cocoa integer-value="1"/>
+            </enumerator>
             <enumerator name="center alignment" code="CeTA"
-                description="Center text alignment."/>
+                description="Center text alignment.">
+                <cocoa integer-value="2"/>
+            </enumerator>
         </enumeration>
 
         <enumeration name="icon type" code="ITpE">
             <enumerator name="comment icon" code="ICmt"
-                description="Comment icon."/>
+                description="Comment icon.">
+                <cocoa integer-value="0"/>
+            </enumerator>
             <enumerator name="key icon" code="IKey"
-                description="Key icon."/>
+                description="Key icon.">
+                <cocoa integer-value="1"/>
+            </enumerator>
             <enumerator name="note icon" code="INot"
-                description="Note icon."/>
+                description="Note icon.">
+                <cocoa integer-value="2"/>
+            </enumerator>
             <enumerator name="help icon" code="IHlp"
-                description="Help icon."/>
+                description="Help icon.">
+                <cocoa integer-value="3"/>
+            </enumerator>
             <enumerator name="new paragraph icon" code="INPa"
-                description="New paragraph icon."/>
+                description="New paragraph icon.">
+                <cocoa integer-value="4"/>
+            </enumerator>
             <enumerator name="paragraph icon" code="IPar"
-                description="Paragraph icon."/>
+                description="Paragraph icon.">
+                <cocoa integer-value="5"/>
+            </enumerator>
             <enumerator name="insert icon" code="IIns"
-                description="Insert icon."/>
+                description="Insert icon.">
+                <cocoa integer-value="6"/>
+            </enumerator>
         </enumeration>
 
         <enumeration name="line ending style" code="LESE">
             <enumerator name="no line ending" code="LSNo"
-                description="No line ending."/>
+                description="No line ending.">
+                <cocoa integer-value="0"/>
+            </enumerator>
             <enumerator name="square line ending" code="LSSq"
-                description="Square line ending."/>
+                description="Square line ending.">
+                <cocoa integer-value="1"/>
+            </enumerator>
             <enumerator name="circle line ending" code="LSCi"
-                description="Circle line ending."/>
+                description="Circle line ending.">
+                <cocoa integer-value="2"/>
+            </enumerator>
             <enumerator name="diamond line ending" code="LSDi"
-                description="Diamond line ending."/>
+                description="Diamond line ending.">
+                <cocoa integer-value="3"/>
+            </enumerator>
             <enumerator name="open arrow line ending" code="LSOA"
-                description="Open arrow line ending."/>
+                description="Open arrow line ending.">
+                <cocoa integer-value="4"/>
+            </enumerator>
             <enumerator name="closed arrow line ending" code="LSCA"
-                description="Closed arrow line ending."/>
+                description="Closed arrow line ending.">
+                <cocoa integer-value="5"/>
+            </enumerator>
         </enumeration>
 
         <enumeration name="note line style" code="LnSE">
             <enumerator name="solid line" code="Soli"
-                description="Solid line."/>
+                description="Solid line.">
+                <cocoa integer-value="0"/>
+            </enumerator>
             <enumerator name="dashed line" code="Dash"
-                description="Dashed line."/>
+                description="Dashed line.">
+                <cocoa integer-value="1"/>
+            </enumerator>
             <enumerator name="beveled line" code="Bevl"
-                description="Beveled line."/>
+                description="Beveled line.">
+                <cocoa integer-value="2"/>
+            </enumerator>
             <enumerator name="inset line" code="Inst"
-                description="Inset line."/>
+                description="Inset line.">
+                <cocoa integer-value="3"/>
+            </enumerator>
             <enumerator name="underline line" code="Undl"
-                description="Underline line."/>
+                description="Underline line.">
+                <cocoa integer-value="4"/>
+            </enumerator>
         </enumeration>
 
         <enumeration name="PDF display box" code="BoxE">
             <enumerator name="media box" code="Mdia"
-                description="Media box."/>
+                description="Media box.">
+                <cocoa integer-value="0"/>
+            </enumerator>
             <enumerator name="crop box" code="Crop"
-                description="Crop box."/>
+                description="Crop box.">
+                <cocoa integer-value="1"/>
+            </enumerator>
         </enumeration>
 
         <enumeration name="PDF display mode" code="ModE">
             <enumerator name="single page" code="1Pg "
-                description="Display single pages."/>
+                description="Display single pages.">
+                <cocoa integer-value="0"/>
+            </enumerator>
             <enumerator name="single page continuous" code="1PgC"
-                description="Display single pages vertically continuously."/>
+                description="Display single pages vertically continuously.">
+                <cocoa integer-value="1"/>
+            </enumerator>
             <enumerator name="two up" code="2Up "
-                description="Display pages side-by-side."/>
+                description="Display pages side-by-side.">
+                <cocoa integer-value="2"/>
+            </enumerator>
             <enumerator name="two up continuous" code="2UpC"
-                description="Display pages side-by-side vertically 
continuously."/>
+                description="Display pages side-by-side vertically 
continuously.">
+                <cocoa integer-value="3"/>
+            </enumerator>
         </enumeration>
 
         <enumeration name="bookmark type" code="BmkE">
             <enumerator name="file bookmark" code="BmFl"
-                description="File bookmark."/>
+                description="File bookmark.">
+                <cocoa integer-value="0"/>
+            </enumerator>
             <enumerator name="folder bookmark" code="BmFd"
-                description="Bookmark folder."/>
+                description="Bookmark folder.">
+                <cocoa integer-value="1"/>
+            </enumerator>
             <enumerator name="session bookmark" code="BmSs"
-                description="Session bookmark."/>
+                description="Session bookmark.">
+                <cocoa integer-value="2"/>
+            </enumerator>
             <enumerator name="separator bookmark" code="BmSp"
-                description="Bookmark separator."/>
+                description="Bookmark separator.">
+                <cocoa integer-value="3"/>
+            </enumerator>
         </enumeration>
 
     </suite>


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

------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to