Revision: 3859
http://skim-app.svn.sourceforge.net/skim-app/?rev=3859&view=rev
Author: hofman
Date: 2008-05-07 05:09:45 -0700 (Wed, 07 May 2008)
Log Message:
-----------
Add defaults for text note font color. Make font color and its default
scriptable.
Modified Paths:
--------------
trunk/InitialUserDefaults.plist
trunk/SKApplicationController.m
trunk/SKPDFAnnotationFreeText.m
trunk/SKStringConstants.h
trunk/SKStringConstants.m
trunk/Skim.sdef
Modified: trunk/InitialUserDefaults.plist
===================================================================
--- trunk/InitialUserDefaults.plist 2008-05-06 22:23:18 UTC (rev 3858)
+++ trunk/InitialUserDefaults.plist 2008-05-07 12:09:45 UTC (rev 3859)
@@ -139,6 +139,11 @@
BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMDhAJm
ZgAAhg==
</data>
+ <key>SKFreeTextNoteFontColor</key>
+ <data>
+ BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm
+ ZmZmAAAAAYY=
+ </data>
<key>SKFreeTextNoteLineWidth</key>
<real>1.0</real>
<key>SKFreeTextNoteLineStyle</key>
@@ -304,6 +309,7 @@
<string>SKLineNoteColor</string>
<string>SKCircleNoteInteriorColor</string>
<string>SKSquareNoteInteriorColor</string>
+ <string>SKFreeTextNoteFontColor</string>
<string>SKTextNoteFontName</string>
<string>SKTextNoteFontSize</string>
<string>SKAnchoredNoteFontName</string>
Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m 2008-05-06 22:23:18 UTC (rev 3858)
+++ trunk/SKApplicationController.m 2008-05-07 12:09:45 UTC (rev 3859)
@@ -575,41 +575,45 @@
- (NSDictionary *)defaultNoteColors {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
return [NSDictionary dictionaryWithObjectsAndKeys:
- [sud colorForKey:SKFreeTextNoteColorKey], @"textNote",
- [sud colorForKey:SKAnchoredNoteColorKey], @"anchoredNote",
- [sud colorForKey:SKCircleNoteColorKey], @"circleNote",
- [sud colorForKey:SKSquareNoteColorKey], @"squareNote",
- [sud colorForKey:SKHighlightNoteColorKey], @"highlightNote",
- [sud colorForKey:SKUnderlineNoteColorKey], @"underlineNote",
- [sud colorForKey:SKStrikeOutNoteColorKey], @"strikeOutNote",
- [sud colorForKey:SKLineNoteColorKey], @"lineNote",
- [sud colorForKey:SKCircleNoteInteriorColorKey], @"circleNoteInterior",
- [sud colorForKey:SKSquareNoteInteriorColorKey], @"squareNoteInterior",
nil];
+ [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",
+ nil];
}
- (void)setDefaultNoteColors:(NSDictionary *)colorDict {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
NSColor *color;
- if (color = [colorDict objectForKey:@"textNote"])
+ if (color = [colorDict objectForKey:@"textNoteColor"])
[sud setColor:color forKey:SKFreeTextNoteColorKey];
- if (color = [colorDict objectForKey:@"anchoredNote"])
+ if (color = [colorDict objectForKey:@"anchoredNoteColor"])
[sud setColor:color forKey:SKAnchoredNoteColorKey];
- if (color = [colorDict objectForKey:@"circleNote"])
+ if (color = [colorDict objectForKey:@"circleNoteColor"])
[sud setColor:color forKey:SKCircleNoteColorKey];
- if (color = [colorDict objectForKey:@"squareNote"])
+ if (color = [colorDict objectForKey:@"squareNoteColor"])
[sud setColor:color forKey:SKSquareNoteColorKey];
- if (color = [colorDict objectForKey:@"highlightNote"])
+ if (color = [colorDict objectForKey:@"highlightNoteColor"])
[sud setColor:color forKey:SKHighlightNoteColorKey];
- if (color = [colorDict objectForKey:@"underlineNote"])
+ if (color = [colorDict objectForKey:@"underlineNoteColor"])
[sud setColor:color forKey:SKUnderlineNoteColorKey];
- if (color = [colorDict objectForKey:@"strikeOutNote"])
+ if (color = [colorDict objectForKey:@"strikeOutNoteColor"])
[sud setColor:color forKey:SKStrikeOutNoteColorKey];
- if (color = [colorDict objectForKey:@"lineNote"])
+ if (color = [colorDict objectForKey:@"lineNoteColor"])
[sud setColor:color forKey:SKLineNoteColorKey];
- if (color = [colorDict objectForKey:@"circleNoteInterior"])
+ if (color = [colorDict objectForKey:@"circleNoteInteriorColor"])
[sud setColor:color forKey:SKCircleNoteInteriorColorKey];
- if (color = [colorDict objectForKey:@"squareNoteInterior"])
+ if (color = [colorDict objectForKey:@"squareNoteInteriorColor"])
[sud setColor:color forKey:SKSquareNoteInteriorColorKey];
+ if (color = [colorDict objectForKey:@"textNoteFontColor"])
+ [sud setColor:color forKey:SKFreeTextNoteFontColorKey];
}
- (NSDictionary *)defaultLineWidths {
Modified: trunk/SKPDFAnnotationFreeText.m
===================================================================
--- trunk/SKPDFAnnotationFreeText.m 2008-05-06 22:23:18 UTC (rev 3858)
+++ trunk/SKPDFAnnotationFreeText.m 2008-05-07 12:09:45 UTC (rev 3859)
@@ -66,6 +66,8 @@
if (font)
[self setFont:font];
[self setColor:[[NSUserDefaults standardUserDefaults]
colorForKey:SKFreeTextNoteColorKey]];
+ if ([self respondsToSelector:@selector(setFontColor:)])
+ [self setFontColor:[[NSUserDefaults standardUserDefaults]
colorForKey:SKFreeTextNoteFontColorKey]];
PDFBorder *border = [[PDFBorder allocWithZone:[self zone]] init];
[border setLineWidth:[[NSUserDefaults standardUserDefaults]
floatForKey:SKFreeTextNoteLineWidthKey]];
[border setDashPattern:[[NSUserDefaults standardUserDefaults]
arrayForKey:SKFreeTextNoteDashPatternKey]];
Modified: trunk/SKStringConstants.h
===================================================================
--- trunk/SKStringConstants.h 2008-05-06 22:23:18 UTC (rev 3858)
+++ trunk/SKStringConstants.h 2008-05-07 12:09:45 UTC (rev 3859)
@@ -76,6 +76,7 @@
extern NSString *SKLineNoteColorKey;
extern NSString *SKCircleNoteInteriorColorKey;
extern NSString *SKSquareNoteInteriorColorKey;
+extern NSString *SKFreeTextNoteFontColorKey;
extern NSString *SKAnchoredNoteIconTypeKey;
extern NSString *SKFreeTextNoteLineWidthKey;
extern NSString *SKFreeTextNoteLineStyleKey;
Modified: trunk/SKStringConstants.m
===================================================================
--- trunk/SKStringConstants.m 2008-05-06 22:23:18 UTC (rev 3858)
+++ trunk/SKStringConstants.m 2008-05-07 12:09:45 UTC (rev 3859)
@@ -77,6 +77,7 @@
NSString *SKLineNoteColorKey = @"SKLineNoteColor";
NSString *SKCircleNoteInteriorColorKey = @"SKCircleNoteInteriorColor";
NSString *SKSquareNoteInteriorColorKey = @"SKSquareNoteInteriorColor";
+NSString *SKFreeTextNoteFontColorKey = @"SKFreeTextNoteFontColor";
NSString *SKFreeTextNoteLineWidthKey = @"SKFreeTextNoteLineWidth";
NSString *SKAnchoredNoteIconTypeKey = @"SKAnchoredNoteIconType";
NSString *SKFreeTextNoteLineStyleKey = @"SKFreeTextNoteLineStyle";
Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef 2008-05-06 22:23:18 UTC (rev 3858)
+++ trunk/Skim.sdef 2008-05-07 12:09:45 UTC (rev 3859)
@@ -672,6 +672,10 @@
description="The font size in points of a text note.">
<cocoa key="fontSize"/>
</property>
+ <property name="font color" code="FntC" type="RGBA color"
+ description="The text color of a text note.">
+ <cocoa key="fontColor"/>
+ </property>
<property name="extended text" code="XTxt" type="rich text"
description="The rich extended text of an anchored note.">
<cocoa key="richText"/>
@@ -851,7 +855,7 @@
<record-type name="note colors" code="NClr">
<property name="text note color" code="CTxt" type="RGBA color"
description="Default text note color.">
- <cocoa key="textNote"/>
+ <cocoa key="textNoteColor"/>
</property>
<property name="anchored note color" code="CAnc" type="RGBA color"
description="Default anchored note color.">
@@ -859,36 +863,40 @@
</property>
<property name="circle note color" code="CCir" type="RGBA color"
description="Default circle color.">
- <cocoa key="circleNote"/>
+ <cocoa key="circleNoteColor"/>
</property>
<property name="box note color" code="CSqu" type="RGBA color"
description="Default box color.">
- <cocoa key="squareNote"/>
+ <cocoa key="squareNoteColor"/>
</property>
<property name="highlight note color" code="CHil" type="RGBA color"
description="Default highlight color.">
- <cocoa key="highlightNote"/>
+ <cocoa key="highlightNoteColor"/>
</property>
<property name="underline note color" code="CUnd" type="RGBA color"
description="Default underline highlight color.">
- <cocoa key="underlineNote"/>
+ <cocoa key="underlineNoteColor"/>
</property>
<property name="strike out note color" code="CStr" type="RGBA
color"
description="Default strike out highlight color.">
- <cocoa key="strikeOutNote"/>
+ <cocoa key="strikeOutNoteColor"/>
</property>
<property name="line note color" code="CLin" type="RGBA color"
description="Default line color.">
- <cocoa key="lineNote"/>
+ <cocoa key="lineNoteColor"/>
</property>
<property name="circle note interior color" code="CCiI" type="RGBA
color"
description="Default circle fill color.">
- <cocoa key="circleNoteInterior"/>
+ <cocoa key="circleNoteInteriorColor"/>
</property>
<property name="box note interior color" code="CSqI" type="RGBA
color"
description="Default box fill color.">
- <cocoa key="squareNoteInterior"/>
+ <cocoa key="squareNoteInteriorColor"/>
</property>
+ <property name="text note font color" code="CTxF" type="RGBA color"
+ description="Default text note font color.">
+ <cocoa key="textNoteFontColor"/>
+ </property>
</record-type>
<record-type name="note line widths" code="NLWd">
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 the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit