Revision: 2770 http://skim-app.svn.sourceforge.net/skim-app/?rev=2770&view=rev Author: hofman Date: 2007-08-29 05:30:28 -0700 (Wed, 29 Aug 2007)
Log Message: ----------- Add new preferences for default anchored note font. Update Dutch localization. Modified Paths: -------------- trunk/Dutch.lproj/BookmarksWindow.nib/info.nib trunk/Dutch.lproj/BookmarksWindow.nib/keyedobjects.nib trunk/Dutch.lproj/Localizable.strings trunk/Dutch.lproj/MainMenu.nib/info.nib trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib trunk/Dutch.lproj/MainWindow.nib/data.dependency trunk/Dutch.lproj/MainWindow.nib/info.nib trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib trunk/Dutch.lproj/NoteWindow.nib/classes.nib trunk/Dutch.lproj/NoteWindow.nib/info.nib trunk/Dutch.lproj/NoteWindow.nib/keyedobjects.nib trunk/Dutch.lproj/PreferenceWindow.nib/info.nib trunk/Dutch.lproj/PreferenceWindow.nib/keyedobjects.nib trunk/English.lproj/NoteWindow.nib/classes.nib trunk/English.lproj/NoteWindow.nib/info.nib trunk/English.lproj/NoteWindow.nib/keyedobjects.nib trunk/English.lproj/PreferenceWindow.nib/keyedobjects.nib trunk/French.lproj/NoteWindow.nib/classes.nib trunk/French.lproj/NoteWindow.nib/info.nib trunk/French.lproj/NoteWindow.nib/keyedobjects.nib trunk/French.lproj/PreferenceWindow.nib/keyedobjects.nib trunk/InitialUserDefaults.plist trunk/Italian.lproj/NoteWindow.nib/classes.nib trunk/Italian.lproj/NoteWindow.nib/info.nib trunk/Italian.lproj/NoteWindow.nib/keyedobjects.nib trunk/Italian.lproj/PreferenceWindow.nib/keyedobjects.nib trunk/SKNoteWindowController.h trunk/SKNoteWindowController.m trunk/SKStringConstants.h trunk/SKStringConstants.m Modified: trunk/Dutch.lproj/BookmarksWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/BookmarksWindow.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Dutch.lproj/BookmarksWindow.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -6,10 +6,6 @@ <string>69 58 356 240 0 0 1440 938 </string> <key>IBFramework Version</key> <string>446.1</string> - <key>IBOpenObjects</key> - <array> - <integer>5</integer> - </array> <key>IBSystem Version</key> <string>8R218</string> </dict> Modified: trunk/Dutch.lproj/BookmarksWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainMenu.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Dutch.lproj/MainMenu.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -7,14 +7,10 @@ <key>IBEditorPositions</key> <dict> <key>29</key> - <string>140 614 635 44 0 0 1440 938 </string> + <string>140 614 542 44 0 0 1440 938 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> - <key>IBOpenObjects</key> - <array> - <integer>29</integer> - </array> <key>IBSystem Version</key> <string>8R218</string> </dict> Modified: trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainWindow.nib/data.dependency =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Dutch.lproj/MainWindow.nib/data.dependency 2007-08-29 12:30:28 UTC (rev 2770) @@ -5,6 +5,7 @@ <key>IBPaletteDependency</key> <array> <string>PDFKit</string> + <string>Controllers</string> </array> </dict> </plist> Modified: trunk/Dutch.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -7,7 +7,7 @@ <key>IBEditorPositions</key> <dict> <key>168</key> - <string>601 495 237 265 0 0 1440 938 </string> + <string>601 508 237 265 0 0 1440 938 </string> <key>224</key> <string>610 420 220 442 0 0 1440 938 </string> <key>256</key> @@ -29,12 +29,6 @@ <array> <integer>208</integer> </array> - <key>IBOpenObjects</key> - <array> - <integer>314</integer> - <integer>502</integer> - <integer>224</integer> - </array> <key>IBSystem Version</key> <string>8R218</string> </dict> Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/NoteWindow.nib/classes.nib =================================================================== --- trunk/Dutch.lproj/NoteWindow.nib/classes.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Dutch.lproj/NoteWindow.nib/classes.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -13,7 +13,7 @@ { CLASS = SKNoteWindowController; LANGUAGE = ObjC; - OUTLETS = {imageView = BDSKDragImageView; }; + OUTLETS = {imageView = BDSKDragImageView; textView = NSTextView; }; SUPERCLASS = NSWindowController; }, { Modified: trunk/Dutch.lproj/NoteWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/NoteWindow.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Dutch.lproj/NoteWindow.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -7,15 +7,10 @@ <key>IBEditorPositions</key> <dict> <key>114</key> - <string>69 303 79 87 0 0 1440 938 </string> + <string>69 303 79 106 0 0 1440 938 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> - <key>IBOpenObjects</key> - <array> - <integer>114</integer> - <integer>7</integer> - </array> <key>IBSystem Version</key> <string>8R218</string> </dict> Modified: trunk/Dutch.lproj/NoteWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/PreferenceWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/PreferenceWindow.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Dutch.lproj/PreferenceWindow.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -8,6 +8,10 @@ <string>446.1</string> <key>IBLockedObjects</key> <array/> + <key>IBOpenObjects</key> + <array> + <integer>5</integer> + </array> <key>IBSystem Version</key> <string>8R218</string> </dict> Modified: trunk/Dutch.lproj/PreferenceWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/NoteWindow.nib/classes.nib =================================================================== --- trunk/English.lproj/NoteWindow.nib/classes.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/English.lproj/NoteWindow.nib/classes.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -13,7 +13,7 @@ { CLASS = SKNoteWindowController; LANGUAGE = ObjC; - OUTLETS = {imageView = BDSKDragImageView; }; + OUTLETS = {imageView = BDSKDragImageView; textView = NSTextView; }; SUPERCLASS = NSWindowController; }, { Modified: trunk/English.lproj/NoteWindow.nib/info.nib =================================================================== --- trunk/English.lproj/NoteWindow.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/English.lproj/NoteWindow.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -7,14 +7,14 @@ <key>IBEditorPositions</key> <dict> <key>114</key> - <string>69 303 79 87 0 0 1440 938 </string> + <string>69 303 79 106 0 0 1440 938 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> <key>IBOpenObjects</key> <array> + <integer>114</integer> <integer>7</integer> - <integer>114</integer> </array> <key>IBSystem Version</key> <string>8R218</string> Modified: trunk/English.lproj/NoteWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/PreferenceWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/French.lproj/NoteWindow.nib/classes.nib =================================================================== --- trunk/French.lproj/NoteWindow.nib/classes.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/French.lproj/NoteWindow.nib/classes.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -13,7 +13,7 @@ { CLASS = SKNoteWindowController; LANGUAGE = ObjC; - OUTLETS = {imageView = BDSKDragImageView; }; + OUTLETS = {imageView = BDSKDragImageView; textView = NSTextView; }; SUPERCLASS = NSWindowController; }, { Modified: trunk/French.lproj/NoteWindow.nib/info.nib =================================================================== --- trunk/French.lproj/NoteWindow.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/French.lproj/NoteWindow.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -3,7 +3,7 @@ <plist version="1.0"> <dict> <key>IBDocumentLocation</key> - <string>79 78 356 240 0 0 1600 1178 </string> + <string>69 58 356 240 0 0 1440 938 </string> <key>IBEditorPositions</key> <dict> <key>114</key> @@ -11,7 +11,11 @@ </dict> <key>IBFramework Version</key> <string>446.1</string> + <key>IBOpenObjects</key> + <array> + <integer>7</integer> + </array> <key>IBSystem Version</key> - <string>8R2218</string> + <string>8R218</string> </dict> </plist> Modified: trunk/French.lproj/NoteWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/French.lproj/PreferenceWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/InitialUserDefaults.plist =================================================================== --- trunk/InitialUserDefaults.plist 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/InitialUserDefaults.plist 2007-08-29 12:30:28 UTC (rev 2770) @@ -79,6 +79,10 @@ </data> <key>SKReadingBarInvert</key> <false/> + <key>SKAnchoredNoteFontName</key> + <string>Helvetica</string> + <key>SKAnchoredNoteFontSize</key> + <real>12.0</real> <key>SKTextNoteFontName</key> <string>LucidaGrande</string> <key>SKTextNoteFontSize</key> @@ -276,6 +280,8 @@ <string>SKSquareNoteInteriorColor</string> <string>SKTextNoteFontName</string> <string>SKTextNoteFontSize</string> + <string>SKAnchoredNoteFontName</string> + <string>SKAnchoredNoteFontSize</string> <string>SKFreeTextNoteLineWidth</string> <string>SKFreeTextNoteLineStyle</string> <string>SKFreeTextNoteDashPattern</string> Modified: trunk/Italian.lproj/NoteWindow.nib/classes.nib =================================================================== --- trunk/Italian.lproj/NoteWindow.nib/classes.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Italian.lproj/NoteWindow.nib/classes.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -13,7 +13,7 @@ { CLASS = SKNoteWindowController; LANGUAGE = ObjC; - OUTLETS = {imageView = BDSKDragImageView; }; + OUTLETS = {imageView = BDSKDragImageView; textView = NSTextView; }; SUPERCLASS = NSWindowController; }, { Modified: trunk/Italian.lproj/NoteWindow.nib/info.nib =================================================================== --- trunk/Italian.lproj/NoteWindow.nib/info.nib 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/Italian.lproj/NoteWindow.nib/info.nib 2007-08-29 12:30:28 UTC (rev 2770) @@ -7,14 +7,14 @@ <key>IBEditorPositions</key> <dict> <key>114</key> - <string>70 300 79 106 0 0 1440 938 </string> + <string>70 300 85 106 0 0 1440 938 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> <key>IBOpenObjects</key> <array> + <integer>114</integer> <integer>7</integer> - <integer>114</integer> </array> <key>IBSystem Version</key> <string>8R218</string> Modified: trunk/Italian.lproj/NoteWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/PreferenceWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/SKNoteWindowController.h =================================================================== --- trunk/SKNoteWindowController.h 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/SKNoteWindowController.h 2007-08-29 12:30:28 UTC (rev 2770) @@ -42,6 +42,7 @@ @class PDFAnnotation, BDSKDragImageView; @interface SKNoteWindowController : NSWindowController { + IBOutlet NSTextView *textView; IBOutlet BDSKDragImageView *imageView; PDFAnnotation *note; Modified: trunk/SKNoteWindowController.m =================================================================== --- trunk/SKNoteWindowController.m 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/SKNoteWindowController.m 2007-08-29 12:30:28 UTC (rev 2770) @@ -42,6 +42,7 @@ #import "SKPDFAnnotationNote.h" #import "SKDocument.h" #import "NSWindowController_SKExtensions.h" +#import "SKStringConstants.h" static NSString *SKNoteWindowFrameAutosaveName = @"SKNoteWindow"; @@ -84,6 +85,12 @@ [[self window] setLevel:keepOnTop || forceOnTop ? NSFloatingWindowLevel : NSNormalWindowLevel]; [[self window] setHidesOnDeactivate:keepOnTop || forceOnTop]; + if ([self isNoteType] && [[textView string] length] == 0) { + NSFont *font = [NSFont fontWithName:[[NSUserDefaults standardUserDefaults] stringForKey:SKAnchoredNoteFontNameKey] + size:[[NSUserDefaults standardUserDefaults] floatForKey:SKAnchoredNoteFontSizeKey]]; + [textView setFont:font]; + } + [self setWindowFrameAutosaveNameOrCascade:SKNoteWindowFrameAutosaveName]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDocumentWillSaveNotification:) @@ -220,6 +227,20 @@ return nil; } +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (object == [NSUserDefaultsController sharedUserDefaultsController]) { + if (NO == [keyPath hasPrefix:@"values."]) + return; + NSString *key = [keyPath substringFromIndex:7]; + if ([key isEqualToString:SKAnchoredNoteFontNameKey] || [key isEqualToString:SKAnchoredNoteFontSizeKey] && [self isNoteType] && [[textView string] length] == 0) { + NSFont *font = [NSFont fontWithName:[[NSUserDefaults standardUserDefaults] stringForKey:SKAnchoredNoteFontNameKey] + size:[[NSUserDefaults standardUserDefaults] floatForKey:SKAnchoredNoteFontSizeKey]]; + [textView setFont:font]; + } + } else { + [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; + } +} @end Modified: trunk/SKStringConstants.h =================================================================== --- trunk/SKStringConstants.h 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/SKStringConstants.h 2007-08-29 12:30:28 UTC (rev 2770) @@ -64,6 +64,8 @@ extern NSString *SKReadingBarInvertKey; extern NSString *SKTextNoteFontNameKey; extern NSString *SKTextNoteFontSizeKey; +extern NSString *SKAnchoredNoteFontNameKey; +extern NSString *SKAnchoredNoteFontSizeKey; extern NSString *SKFreeTextNoteColorKey; extern NSString *SKAnchoredNoteColorKey; extern NSString *SKCircleNoteColorKey; Modified: trunk/SKStringConstants.m =================================================================== --- trunk/SKStringConstants.m 2007-08-29 09:51:52 UTC (rev 2769) +++ trunk/SKStringConstants.m 2007-08-29 12:30:28 UTC (rev 2770) @@ -65,6 +65,8 @@ NSString *SKReadingBarInvertKey = @"SKReadingBarInvert"; NSString *SKTextNoteFontNameKey = @"SKTextNoteFontName"; NSString *SKTextNoteFontSizeKey = @"SKTextNoteFontSize"; +NSString *SKAnchoredNoteFontNameKey = @"SKAnchoredNoteFontName"; +NSString *SKAnchoredNoteFontSizeKey = @"SKAnchoredNoteFontSize"; NSString *SKFreeTextNoteColorKey = @"SKFreeTextNoteColor"; NSString *SKAnchoredNoteColorKey = @"SKAnchoredNoteColor"; NSString *SKCircleNoteColorKey = @"SKCircleNoteColor"; 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: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit