Revision: 3932
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3932&view=rev
Author:   hofman
Date:     2008-05-29 08:09:26 -0700 (Thu, 29 May 2008)

Log Message:
-----------
use note types as cocoa keys in record-types for note default settings.

Modified Paths:
--------------
    trunk/SKApplicationController.m
    trunk/Skim.sdef

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2008-05-29 12:18:53 UTC (rev 3931)
+++ trunk/SKApplicationController.m     2008-05-29 15:09:26 UTC (rev 3932)
@@ -590,110 +590,110 @@
 - (NSDictionary *)defaultNoteColors {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [sud colorForKey:SKFreeTextNoteColorKey], @"textNoteColor", 
-        [sud colorForKey:SKAnchoredNoteColorKey], @"anchoredNoteColor", 
-        [sud colorForKey:SKCircleNoteColorKey], @"circleNoteColor", 
-        [sud colorForKey:SKSquareNoteColorKey], @"squareNoteColor", 
-        [sud colorForKey:SKHighlightNoteColorKey], @"highlightNoteColor", 
-        [sud colorForKey:SKUnderlineNoteColorKey], @"underlineNoteColor", 
-        [sud colorForKey:SKStrikeOutNoteColorKey], @"strikeOutNoteColor", 
-        [sud colorForKey:SKLineNoteColorKey], @"lineNoteColor", 
-        [sud colorForKey:SKCircleNoteInteriorColorKey], 
@"circleNoteInteriorColor", 
-        [sud colorForKey:SKSquareNoteInteriorColorKey], 
@"squareNoteInteriorColor", 
-        [sud colorForKey:SKFreeTextNoteFontColorKey], @"textNoteFontColor", 
+        [sud colorForKey:SKFreeTextNoteColorKey], SKFreeTextString, 
+        [sud colorForKey:SKAnchoredNoteColorKey], SKNoteString, 
+        [sud colorForKey:SKCircleNoteColorKey], SKCircleString, 
+        [sud colorForKey:SKSquareNoteColorKey], SKSquareString, 
+        [sud colorForKey:SKHighlightNoteColorKey], SKHighlightString, 
+        [sud colorForKey:SKUnderlineNoteColorKey], SKUnderlineString, 
+        [sud colorForKey:SKStrikeOutNoteColorKey], SKStrikeOutString, 
+        [sud colorForKey:SKLineNoteColorKey], SKLineString, 
+        [sud colorForKey:SKCircleNoteInteriorColorKey], @"CircleInterior", 
+        [sud colorForKey:SKSquareNoteInteriorColorKey], @"SquareInterior", 
+        [sud colorForKey:SKFreeTextNoteFontColorKey], @"FreeTextFont", 
         nil];
 }
 
 - (void)setDefaultNoteColors:(NSDictionary *)colorDict {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     NSColor *color;
-    if (color = [colorDict objectForKey:@"textNoteColor"])
+    if (color = [colorDict objectForKey:SKFreeTextString])
         [sud setColor:color forKey:SKFreeTextNoteColorKey];
-    if (color = [colorDict objectForKey:@"anchoredNoteColor"])
+    if (color = [colorDict objectForKey:SKNoteString])
         [sud setColor:color forKey:SKAnchoredNoteColorKey];
-    if (color = [colorDict objectForKey:@"circleNoteColor"])
+    if (color = [colorDict objectForKey:SKCircleString])
         [sud setColor:color forKey:SKCircleNoteColorKey];
-    if (color = [colorDict objectForKey:@"squareNoteColor"])
+    if (color = [colorDict objectForKey:SKSquareString])
         [sud setColor:color forKey:SKSquareNoteColorKey];
-    if (color = [colorDict objectForKey:@"highlightNoteColor"])
+    if (color = [colorDict objectForKey:SKHighlightString])
         [sud setColor:color forKey:SKHighlightNoteColorKey];
-    if (color = [colorDict objectForKey:@"underlineNoteColor"])
+    if (color = [colorDict objectForKey:SKUnderlineString])
         [sud setColor:color forKey:SKUnderlineNoteColorKey];
-    if (color = [colorDict objectForKey:@"strikeOutNoteColor"])
+    if (color = [colorDict objectForKey:SKStrikeOutString])
         [sud setColor:color forKey:SKStrikeOutNoteColorKey];
-    if (color = [colorDict objectForKey:@"lineNoteColor"])
+    if (color = [colorDict objectForKey:SKLineString])
         [sud setColor:color forKey:SKLineNoteColorKey];
-    if (color = [colorDict objectForKey:@"circleNoteInteriorColor"])
+    if (color = [colorDict objectForKey:@"CircleInterior"])
         [sud setColor:color forKey:SKCircleNoteInteriorColorKey];
-    if (color = [colorDict objectForKey:@"squareNoteInteriorColor"])
+    if (color = [colorDict objectForKey:@"SquareInterior"])
         [sud setColor:color forKey:SKSquareNoteInteriorColorKey];
-    if (color = [colorDict objectForKey:@"textNoteFontColor"])
+    if (color = [colorDict objectForKey:@"FreeTextFont"])
         [sud setColor:color forKey:SKFreeTextNoteFontColorKey];
 }
 
 - (NSDictionary *)defaultLineWidths {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [NSNumber numberWithFloat:[sud 
floatForKey:SKFreeTextNoteLineWidthKey]], @"textNote", 
-        [NSNumber numberWithFloat:[sud floatForKey:SKCircleNoteLineWidthKey]], 
@"circleNote", 
-        [NSNumber numberWithFloat:[sud floatForKey:SKSquareNoteLineWidthKey]], 
@"squareNote", 
-        [NSNumber numberWithFloat:[sud floatForKey:SKLineNoteLineWidthKey]], 
@"lineNote", nil];
+        [NSNumber numberWithFloat:[sud 
floatForKey:SKFreeTextNoteLineWidthKey]], SKFreeTextString, 
+        [NSNumber numberWithFloat:[sud floatForKey:SKCircleNoteLineWidthKey]], 
SKCircleString, 
+        [NSNumber numberWithFloat:[sud floatForKey:SKSquareNoteLineWidthKey]], 
SKSquareString, 
+        [NSNumber numberWithFloat:[sud floatForKey:SKLineNoteLineWidthKey]], 
SKLineString, nil];
 }
 
 - (void)setDefaultLineWidth:(NSDictionary *)dict {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     NSNumber *number;
-    if (number = [dict objectForKey:@"textNote"])
+    if (number = [dict objectForKey:SKFreeTextString])
         [sud setFloat:[number floatValue] forKey:SKFreeTextNoteLineWidthKey];
-    if (number = [dict objectForKey:@"circleNote"])
+    if (number = [dict objectForKey:SKCircleString])
         [sud setFloat:[number floatValue] forKey:SKCircleNoteLineWidthKey];
-    if (number = [dict objectForKey:@"squareNote"])
+    if (number = [dict objectForKey:SKSquareString])
         [sud setFloat:[number floatValue] forKey:SKSquareNoteLineWidthKey];
-    if (number = [dict objectForKey:@"lineNote"])
+    if (number = [dict objectForKey:SKLineString])
         [sud setFloat:[number floatValue] forKey:SKLineNoteLineWidthKey];
 }
 
 - (NSDictionary *)defaultLineStyles {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKFreeTextNoteLineStyleKey])], @"textNote", 
-        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKCircleNoteLineStyleKey])], @"circleNote", 
-        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKSquareNoteLineStyleKey])], @"squareNote", 
-        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKLineNoteLineStyleKey])], @"lineNote", nil];
+        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKFreeTextNoteLineStyleKey])], SKFreeTextString, 
+        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKCircleNoteLineStyleKey])], SKCircleString, 
+        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKSquareNoteLineStyleKey])], SKSquareString, 
+        [NSNumber 
numberWithUnsignedLong:SKScriptingBorderStyleFromBorderStyle([sud 
integerForKey:SKLineNoteLineStyleKey])], SKLineString, nil];
 }
 
 - (void)setDefaultLineStyles:(NSDictionary *)dict {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     NSNumber *number;
-    if (number = [dict objectForKey:@"textNote"])
+    if (number = [dict objectForKey:SKFreeTextString])
         [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedLongValue]) forKey:SKFreeTextNoteLineStyleKey];
-    if (number = [dict objectForKey:@"circleNote"])
+    if (number = [dict objectForKey:SKCircleString])
         [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedLongValue]) forKey:SKCircleNoteLineStyleKey];
-    if (number = [dict objectForKey:@"squareNote"])
+    if (number = [dict objectForKey:SKSquareString])
         [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedLongValue]) forKey:SKSquareNoteLineStyleKey];
-    if (number = [dict objectForKey:@"lineNote"])
+    if (number = [dict objectForKey:SKLineString])
         [sud setInteger:SKBorderStyleFromScriptingBorderStyle([number 
unsignedLongValue]) forKey:SKLineNoteLineStyleKey];
 }
 
 - (NSDictionary *)defaultDashPatterns {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     return [NSDictionary dictionaryWithObjectsAndKeys: 
-        [sud arrayForKey:SKFreeTextNoteDashPatternKey], @"textNote", 
-        [sud arrayForKey:SKCircleNoteDashPatternKey], @"circleNote", 
-        [sud arrayForKey:SKSquareNoteDashPatternKey], @"squareNote", 
-        [sud arrayForKey:SKLineNoteDashPatternKey], @"lineNote", nil];
+        [sud arrayForKey:SKFreeTextNoteDashPatternKey], SKFreeTextString, 
+        [sud arrayForKey:SKCircleNoteDashPatternKey], SKCircleString, 
+        [sud arrayForKey:SKSquareNoteDashPatternKey], SKSquareString, 
+        [sud arrayForKey:SKLineNoteDashPatternKey], SKLineString, nil];
 }
 
 - (void)setDefaultDashPattern:(NSDictionary *)dict {
     NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
     NSArray *array;
-    if (array = [dict objectForKey:@"textNote"])
+    if (array = [dict objectForKey:SKFreeTextString])
         [sud setObject:array forKey:SKFreeTextNoteDashPatternKey];
-    if (array = [dict objectForKey:@"circleNote"])
+    if (array = [dict objectForKey:SKCircleString])
         [sud setObject:array forKey:SKCircleNoteDashPatternKey];
-    if (array = [dict objectForKey:@"squareNote"])
+    if (array = [dict objectForKey:SKSquareString])
         [sud setObject:array forKey:SKSquareNoteDashPatternKey];
-    if (array = [dict objectForKey:@"lineNote"])
+    if (array = [dict objectForKey:SKLineString])
         [sud setObject:array forKey:SKLineNoteDashPatternKey];
 }
 

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2008-05-29 12:18:53 UTC (rev 3931)
+++ trunk/Skim.sdef     2008-05-29 15:09:26 UTC (rev 3932)
@@ -855,85 +855,85 @@
         <record-type name="note colors" code="NClr">
             <property name="text note color" code="CTxt" type="RGBA color"
                 description="Default text note color.">
-                <cocoa key="textNoteColor"/>
+                <cocoa key="FreeText"/>
             </property>
             <property name="anchored note color" code="CAnc" type="RGBA color"
                 description="Default anchored note color.">
-                <cocoa key="anchoredNote"/>
+                <cocoa key="Note"/>
             </property>
             <property name="circle note color" code="CCir" type="RGBA color"
                 description="Default circle color.">
-                <cocoa key="circleNoteColor"/>
+                <cocoa key="Circle"/>
             </property>
             <property name="box note color" code="CSqu" type="RGBA color"
                 description="Default box color.">
-                <cocoa key="squareNoteColor"/>
+                <cocoa key="Square"/>
             </property>
             <property name="highlight note color" code="CHil" type="RGBA color"
                 description="Default highlight color.">
-                <cocoa key="highlightNoteColor"/>
+                <cocoa key="Highlight"/>
             </property>
             <property name="underline note color" code="CUnd" type="RGBA color"
                 description="Default underline highlight color.">
-                <cocoa key="underlineNoteColor"/>
+                <cocoa key="Underline"/>
             </property>
             <property name="strike out note color" code="CStr" type="RGBA 
color"
                 description="Default strike out highlight color.">
-                <cocoa key="strikeOutNoteColor"/>
+                <cocoa key="StrikeOut"/>
             </property>
             <property name="line note color" code="CLin" type="RGBA color"
                 description="Default line color.">
-                <cocoa key="lineNoteColor"/>
+                <cocoa key="Line"/>
             </property>
             <property name="circle note interior color" code="CCiI" type="RGBA 
color"
                 description="Default circle fill color.">
-                <cocoa key="circleNoteInteriorColor"/>
+                <cocoa key="CircleInterior"/>
             </property>
             <property name="box note interior color" code="CSqI" type="RGBA 
color"
                 description="Default box fill color.">
-                <cocoa key="squareNoteInteriorColor"/>
+                <cocoa key="SquareInterior"/>
             </property>
             <property name="text note font color" code="CTxF" type="RGBA color"
                 description="Default text note font color.">
-                <cocoa key="textNoteFontColor"/>
+                <cocoa key="FreeTextFont"/>
             </property>
         </record-type>
 
         <record-type name="note line widths" code="NLWd">
             <property name="text note line width" code="WTxt" type="real"
                 description="Default text note line width.">
-                <cocoa key="textNote"/>
+                <cocoa key="FreeText"/>
             </property>
             <property name="circle note line width" code="WCir" type="real"
                 description="Default circle line width.">
-                <cocoa key="circleNote"/>
+                <cocoa key="Circle"/>
             </property>
             <property name="box note line width" code="WSqu" type="real"
                 description="Default box line width.">
-                <cocoa key="squareNote"/>
+                <cocoa key="Square"/>
             </property>
             <property name="line note line width" code="WLin" type="real"
                 description="Default line line width.">
-                <cocoa key="lineNote"/>
+                <cocoa key="Line"/>
             </property>
         </record-type>
 
         <record-type name="note line styles" code="NLSt">
             <property name="text note line style" code="STxt" type="note line 
style"
                 description="Default text note line width.">
-                <cocoa key="textNote"/>
+                <cocoa key="FreeText"/>
             </property>
             <property name="circle note line style" code="SCir" type="note 
line style"
                 description="Default circle line width.">
-                <cocoa key="circleNote"/>
+                <cocoa key="Circle"/>
             </property>
             <property name="box note line style" code="SSqu" type="note line 
style"
                 description="Default box line width.">
-                <cocoa key="squareNote"/>
+                <cocoa key="Square"/>
             </property>
             <property name="line note line style" code="SLin" type="note line 
style"
                 description="Default line line width.">
-                <cocoa key="lineNote"/>
+                <cocoa key="Line"/>
             </property>
         </record-type>
 
@@ -941,22 +941,22 @@
             <property name="text note dash pattern" code="DTxt"
                 description="Default text note dash pattern.">
                 <type type="real" list="yes"/>
-                <cocoa key="textNote"/>
+                <cocoa key="FreeText"/>
             </property>
             <property name="circle note dash pattern" code="DCir"
                 description="Default circle dash pattern.">
                 <type type="real" list="yes"/>
-                <cocoa key="circleNote"/>
+                <cocoa key="Circle"/>
             </property>
             <property name="box note dash pattern" code="DSqu"
                 description="Default box dash pattern.">
                 <type type="real" list="yes"/>
-                <cocoa key="squareNote"/>
+                <cocoa key="Square"/>
             </property>
             <property name="line note dash pattern" code="DLin"
                 description="Default line dash pattern.">
                 <type type="real" list="yes"/>
-                <cocoa key="lineNote"/>
+                <cocoa key="Line"/>
             </property>
         </record-type>
 


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to