You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(23) |
Apr
(254) |
May
(252) |
Jun
(209) |
Jul
(198) |
Aug
(192) |
Sep
(207) |
Oct
(120) |
Nov
(179) |
Dec
(52) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(48) |
Feb
(69) |
Mar
(129) |
Apr
(250) |
May
(113) |
Jun
(177) |
Jul
(228) |
Aug
(155) |
Sep
(218) |
Oct
(185) |
Nov
(109) |
Dec
(88) |
2009 |
Jan
(83) |
Feb
(39) |
Mar
(70) |
Apr
(47) |
May
(48) |
Jun
(67) |
Jul
(61) |
Aug
(97) |
Sep
(221) |
Oct
(141) |
Nov
(70) |
Dec
(61) |
2010 |
Jan
(45) |
Feb
(76) |
Mar
(178) |
Apr
(106) |
May
(57) |
Jun
(32) |
Jul
(64) |
Aug
(98) |
Sep
(96) |
Oct
(19) |
Nov
(34) |
Dec
(117) |
2011 |
Jan
(55) |
Feb
(48) |
Mar
(64) |
Apr
(21) |
May
(39) |
Jun
(53) |
Jul
(99) |
Aug
(56) |
Sep
(39) |
Oct
(26) |
Nov
(19) |
Dec
(69) |
2012 |
Jan
(17) |
Feb
(40) |
Mar
(17) |
Apr
|
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(10) |
Sep
(10) |
Oct
(38) |
Nov
(48) |
Dec
(70) |
2013 |
Jan
(43) |
Feb
(47) |
Mar
(39) |
Apr
(37) |
May
(25) |
Jun
(6) |
Jul
(20) |
Aug
(49) |
Sep
(33) |
Oct
(34) |
Nov
(75) |
Dec
(6) |
2014 |
Jan
(32) |
Feb
(10) |
Mar
(17) |
Apr
|
May
|
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(23) |
Nov
(80) |
Dec
(48) |
2015 |
Jan
(80) |
Feb
(50) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(16) |
Jul
(24) |
Aug
(27) |
Sep
(56) |
Oct
(30) |
Nov
(16) |
Dec
(6) |
2016 |
Jan
(31) |
Feb
(14) |
Mar
(23) |
Apr
(17) |
May
(40) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(32) |
Oct
(36) |
Nov
(23) |
Dec
(9) |
2017 |
Jan
(37) |
Feb
(23) |
Mar
(65) |
Apr
(22) |
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
(3) |
Oct
(22) |
Nov
(63) |
Dec
(71) |
2018 |
Jan
(83) |
Feb
(21) |
Mar
(35) |
Apr
(44) |
May
(14) |
Jun
(12) |
Jul
(8) |
Aug
(18) |
Sep
(10) |
Oct
(145) |
Nov
(144) |
Dec
(76) |
2019 |
Jan
(18) |
Feb
(28) |
Mar
(5) |
Apr
(208) |
May
(291) |
Jun
(158) |
Jul
(27) |
Aug
(8) |
Sep
(10) |
Oct
(83) |
Nov
(41) |
Dec
(31) |
2020 |
Jan
(16) |
Feb
(46) |
Mar
(100) |
Apr
(78) |
May
(69) |
Jun
(71) |
Jul
(28) |
Aug
(131) |
Sep
(176) |
Oct
(89) |
Nov
(147) |
Dec
(19) |
2021 |
Jan
(19) |
Feb
(25) |
Mar
(91) |
Apr
(98) |
May
(14) |
Jun
(44) |
Jul
(8) |
Aug
(3) |
Sep
(38) |
Oct
(57) |
Nov
(97) |
Dec
(74) |
2022 |
Jan
(89) |
Feb
(47) |
Mar
(15) |
Apr
(50) |
May
(54) |
Jun
(56) |
Jul
(80) |
Aug
(12) |
Sep
(11) |
Oct
(60) |
Nov
(48) |
Dec
(4) |
2023 |
Jan
(75) |
Feb
(49) |
Mar
(84) |
Apr
(24) |
May
(13) |
Jun
(74) |
Jul
(32) |
Aug
(66) |
Sep
(50) |
Oct
(38) |
Nov
(105) |
Dec
(181) |
2024 |
Jan
(21) |
Feb
(49) |
Mar
(77) |
Apr
(84) |
May
(20) |
Jun
(71) |
Jul
(53) |
Aug
(33) |
Sep
(54) |
Oct
(124) |
Nov
(151) |
Dec
(73) |
2025 |
Jan
(61) |
Feb
(17) |
Mar
(136) |
Apr
(72) |
May
(200) |
Jun
(238) |
Jul
(91) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ho...@us...> - 2007-06-17 23:34:39
|
Revision: 2332 http://skim-app.svn.sourceforge.net/skim-app/?rev=2332&view=rev Author: hofman Date: 2007-06-17 16:34:37 -0700 (Sun, 17 Jun 2007) Log Message: ----------- return 0 when no index is found in "get index for" script command. Modified Paths: -------------- trunk/PDFSelection_SKExtensions.m trunk/Skim.sdef Modified: trunk/PDFSelection_SKExtensions.m =================================================================== --- trunk/PDFSelection_SKExtensions.m 2007-06-17 21:02:55 UTC (rev 2331) +++ trunk/PDFSelection_SKExtensions.m 2007-06-17 23:34:37 UTC (rev 2332) @@ -466,7 +466,7 @@ } } - return [NSNumber numberWithInt:index == NSNotFound ? -1 : (int)index + 1]; + return [NSNumber numberWithInt:index == NSNotFound ? 0 : (int)index + 1]; } @end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-17 21:02:55 UTC (rev 2331) +++ trunk/Skim.sdef 2007-06-17 23:34:37 UTC (rev 2332) @@ -1090,7 +1090,7 @@ <cocoa key="Last"/> </parameter> <result type="integer" - description="The index for the object. Returns -1 if no index was found."> + description="The index for the object. Returns 0 if no index was found."> </result> </command> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 21:02:56
|
Revision: 2331 http://skim-app.svn.sourceforge.net/skim-app/?rev=2331&view=rev Author: hofman Date: 2007-06-17 14:02:55 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Avoid adding a selection to itself, as this does not work due to a PDFKit bug (I get really tired of it). Modified Paths: -------------- trunk/PDFSelection_SKExtensions.m Modified: trunk/PDFSelection_SKExtensions.m =================================================================== --- trunk/PDFSelection_SKExtensions.m 2007-06-17 20:23:11 UTC (rev 2330) +++ trunk/PDFSelection_SKExtensions.m 2007-06-17 21:02:55 UTC (rev 2331) @@ -337,7 +337,7 @@ if (selection == nil) selection = otherSelection; - if (otherSelection) + else if (otherSelection) [selection addSelection:otherSelection]; if (continuous) { @@ -348,7 +348,7 @@ int lastIndex = NSMaxRange([selection safeRangeAtIndex:[selection safeNumberOfRangesOnPage:lastPage] - 1 onPage:lastPage]) - 1; selection = [[firstPage document] selectionFromPage:firstPage atCharacterIndex:firstIndex toPage:lastPage atCharacterIndex:lastIndex]; } - + NSLog(@"%@",selection); return selection ? [selection objectSpecifier] : [NSArray array]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 20:23:12
|
Revision: 2330 http://skim-app.svn.sourceforge.net/skim-app/?rev=2330&view=rev Author: hofman Date: 2007-06-17 13:23:11 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Use different keys for the dictionary of default colors in AppleScript, because AppleScript sucks. Modified Paths: -------------- trunk/Skim.sdef Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-17 18:05:07 UTC (rev 2329) +++ trunk/Skim.sdef 2007-06-17 20:23:11 UTC (rev 2330) @@ -781,35 +781,35 @@ </record-type> <record-type name="note colors" code="NClr"> - <property name="text note" code="NTxt" type="RGBA color" + <property name="text note color" code="CTxt" type="RGBA color" description="Default text note color."> <cocoa key="textNote"/> </property> - <property name="anchored note" code="NAnc" type="RGBA color" + <property name="anchored note color" code="CAnc" type="RGBA color" description="Default anchored note color."> <cocoa key="anchoredNote"/> </property> - <property name="circle note" code="NCir" type="RGBA color" + <property name="circle note color" code="CCir" type="RGBA color" description="Default circle color."> <cocoa key="circleNote"/> </property> - <property name="box note" code="NSqu" type="RGBA color" + <property name="box note color" code="CSqu" type="RGBA color" description="Default box color."> <cocoa key="squareNote"/> </property> - <property name="highlight note" code="NHil" type="RGBA color" + <property name="highlight note color" code="CHil" type="RGBA color" description="Default highlight color."> <cocoa key="highlightNote"/> </property> - <property name="underline note" code="NUnd" type="RGBA color" + <property name="underline note color" code="CUnd" type="RGBA color" description="Default underline highlight color."> <cocoa key="underlineNote"/> </property> - <property name="strike out note" code="NStr" type="RGBA color" + <property name="strike out note color" code="CStr" type="RGBA color" description="Default strike out highlight color."> <cocoa key="strikeOutNote"/> </property> - <property name="arrow note" code="NArr" type="RGBA color" + <property name="arrow note color" code="CArr" type="RGBA color" description="Default arrow color."> <cocoa key="arrowNote"/> </property> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 18:05:19
|
Revision: 2329 http://skim-app.svn.sourceforge.net/skim-app/?rev=2329&view=rev Author: hofman Date: 2007-06-17 11:05:07 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Return only pdf documents in orderedDocuments for scripting. Modified Paths: -------------- trunk/SKApplication.m Modified: trunk/SKApplication.m =================================================================== --- trunk/SKApplication.m 2007-06-17 17:35:15 UTC (rev 2328) +++ trunk/SKApplication.m 2007-06-17 18:05:07 UTC (rev 2329) @@ -228,4 +228,17 @@ } } +#pragma mark Scripting support + +- (NSArray *)orderedDocuments { + NSMutableArray *orderedDocuments = [[[super orderedDocuments] mutableCopy] autorelease]; + int i = [orderedDocuments count]; + + while (i--) + if ([[orderedDocuments objectAtIndex:i] isKindOfClass:[SKDocument class]] == NO) + [orderedDocuments removeObjectAtIndex:i]; + + return orderedDocuments; +} + @end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 17:35:17
|
Revision: 2328 http://skim-app.svn.sourceforge.net/skim-app/?rev=2328&view=rev Author: hofman Date: 2007-06-17 10:35:15 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Some checks for scripting in case note documents are open. Modified Paths: -------------- trunk/PDFPage_SKExtensions.m trunk/SKDocument.h trunk/SKDocument.m trunk/SKInfoWindowController.m Modified: trunk/PDFPage_SKExtensions.m =================================================================== --- trunk/PDFPage_SKExtensions.m 2007-06-17 16:42:18 UTC (rev 2327) +++ trunk/PDFPage_SKExtensions.m 2007-06-17 17:35:15 UTC (rev 2328) @@ -291,7 +291,7 @@ SKDocument *document; while (document = [docEnum nextObject]) { - if ([[self document] isEqual:[document pdfDocument]]) + if ([document respondsToSelector:@selector(pdfDocument)] && [[self document] isEqual:[document pdfDocument]]) break; } Modified: trunk/SKDocument.h =================================================================== --- trunk/SKDocument.h 2007-06-17 16:42:18 UTC (rev 2327) +++ trunk/SKDocument.h 2007-06-17 17:35:15 UTC (rev 2328) @@ -107,7 +107,7 @@ - (void)setCurrentPage:(PDFPage *)page; - (id)activeNote; - (void)setActiveNote:(id)note; -- (NSString *)string; +- (NSString *)text; - (id)selectionSpecifier; - (void)setSelectionSpecifier:(id)specifier; - (id)handleRevertScriptCommand:(NSScriptCommand *)command; Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-06-17 16:42:18 UTC (rev 2327) +++ trunk/SKDocument.m 2007-06-17 17:35:15 UTC (rev 2328) @@ -963,7 +963,7 @@ [[self pdfView] setActiveAnnotation:note]; } -- (NSString *)string { +- (NSString *)text { return [[self pdfDocument] string]; } Modified: trunk/SKInfoWindowController.m =================================================================== --- trunk/SKInfoWindowController.m 2007-06-17 16:42:18 UTC (rev 2327) +++ trunk/SKInfoWindowController.m 2007-06-17 17:35:15 UTC (rev 2328) @@ -144,18 +144,21 @@ } - (NSDictionary *)infoForDocument:(SKDocument *)doc { - PDFDocument *pdfDoc = [doc pdfDocument]; - NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; - [dictionary setDictionary:[pdfDoc documentAttributes]]; - if (doc) { - unsigned long long logicalSize = 0, physicalSize = 0; - [dictionary setValue:[[doc fileName] lastPathComponent] forKey:@"FileName"]; - [dictionary setValue:[NSString stringWithFormat: @"%d.%d", [pdfDoc majorVersion], [pdfDoc minorVersion]] forKey:@"Version"]; - [dictionary setValue:[NSNumber numberWithInt:[pdfDoc pageCount]] forKey:@"PageCount"]; - [dictionary setValue:SKFileSizeStringForFileURL([doc fileURL], &physicalSize, &logicalSize) forKey:@"FileSize"]; - [dictionary setValue:[NSNumber numberWithUnsignedLongLong:physicalSize] forKey:@"PhysicalSize"]; - [dictionary setValue:[NSNumber numberWithUnsignedLongLong:logicalSize] forKey:@"LogicalSize"]; - [dictionary setValue:[[info valueForKey:@"KeyWords"] componentsJoinedByString:@" "] forKey:@"KeywordsString"]; + NSMutableDictionary *dictionary = nil; + if ([doc respondsToSelector:@selector(pdfDocument)]) { + PDFDocument *pdfDoc = [doc pdfDocument]; + dictionary = [NSMutableDictionary dictionary]; + [dictionary setDictionary:[pdfDoc documentAttributes]]; + if (doc) { + unsigned long long logicalSize = 0, physicalSize = 0; + [dictionary setValue:[[doc fileName] lastPathComponent] forKey:@"FileName"]; + [dictionary setValue:[NSString stringWithFormat: @"%d.%d", [pdfDoc majorVersion], [pdfDoc minorVersion]] forKey:@"Version"]; + [dictionary setValue:[NSNumber numberWithInt:[pdfDoc pageCount]] forKey:@"PageCount"]; + [dictionary setValue:SKFileSizeStringForFileURL([doc fileURL], &physicalSize, &logicalSize) forKey:@"FileSize"]; + [dictionary setValue:[NSNumber numberWithUnsignedLongLong:physicalSize] forKey:@"PhysicalSize"]; + [dictionary setValue:[NSNumber numberWithUnsignedLongLong:logicalSize] forKey:@"LogicalSize"]; + [dictionary setValue:[[info valueForKey:@"KeyWords"] componentsJoinedByString:@" "] forKey:@"KeywordsString"]; + } } return dictionary; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 16:42:25
|
Revision: 2327 http://skim-app.svn.sourceforge.net/skim-app/?rev=2327&view=rev Author: hofman Date: 2007-06-17 09:42:18 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Move NSColor category to separate files. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/Skim.xcodeproj/project.pbxproj Added Paths: ----------- trunk/NSColor_SKExtensions.h trunk/NSColor_SKExtensions.m Added: trunk/NSColor_SKExtensions.h =================================================================== --- trunk/NSColor_SKExtensions.h (rev 0) +++ trunk/NSColor_SKExtensions.h 2007-06-17 16:42:18 UTC (rev 2327) @@ -0,0 +1,77 @@ +// +// NSColor_SKExtensions.h +// Skim +// +// Created by Christiaan Hofman on 6/17/07. +/* + This software is Copyright (c) 2007 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import <Cocoa/Cocoa.h> + +enum { + SKASColorRed = 'Red ', + SKASColorGreen = 'Gren', + SKASColorBlue = 'Blue', + SKASColorYellow = 'Yelw', + SKASColorMagenta = 'Mgnt', + SKASColorCyan = 'Cyan', + SKASColorDarkRed = 'DRed', + SKASColorDarkGreen = 'DGrn', + SKASColorDarkBlue = 'DBlu', + SKASColorBanana = 'Bana', + SKASColorTurquoise = 'Turq', + SKASColorViolet = 'Viol', + SKASColorOrange = 'Orng', + SKASColorDeepPink = 'DpPk', + SKASColorSpringGreen = 'SprG', + SKASColorAqua = 'Aqua', + SKASColorLime = 'Lime', + SKASColorDarkViolet = 'DVio', + SKASColorPurple = 'Prpl', + SKASColorTeal = 'Teal', + SKASColorOlive = 'Oliv', + SKASColorBrown = 'Brwn', + SKASColorBlack = 'Blck', + SKASColorWhite = 'Whit', + SKASColorGray = 'Gray', + SKASColorLightGray = 'LGry', + SKASColorDarkGray = 'DGry', + SKASColorClear = 'Clea' +}; + +@interface NSColor (SKExtensions) + ++ (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor; +- (id)scriptingRgbaColorDescriptor; + +@end Added: trunk/NSColor_SKExtensions.m =================================================================== --- trunk/NSColor_SKExtensions.m (rev 0) +++ trunk/NSColor_SKExtensions.m 2007-06-17 16:42:18 UTC (rev 2327) @@ -0,0 +1,112 @@ +// +// NSColor_SKExtensions.m +// Skim +// +// Created by Christiaan Hofman on 6/17/07. +/* + This software is Copyright (c) 2007 + Christiaan Hofman. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Christiaan Hofman nor the names of any + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "NSColor_SKExtensions.h" + + +@implementation NSColor (SKExtensions) + ++ (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor { + float red, green, blue, alpha = 1.0; + switch ([descriptor numberOfItems]) { + case 0: + switch ([descriptor enumCodeValue]) { + case SKASColorRed: return [NSColor redColor]; + case SKASColorGreen: return [NSColor greenColor]; + case SKASColorBlue: return [NSColor blueColor]; + case SKASColorYellow: return [NSColor yellowColor]; + case SKASColorMagenta: return [NSColor magentaColor]; + case SKASColorCyan: return [NSColor cyanColor]; + case SKASColorDarkRed: return [NSColor colorWithDeviceRed:0.5 green:0.0 blue:0.0 alpha:1.0]; + case SKASColorDarkGreen: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:0.0 alpha:1.0]; + case SKASColorDarkBlue: return [NSColor colorWithDeviceRed:0.0 green:0.0 blue:0.5 alpha:1.0]; + case SKASColorBanana: return [NSColor colorWithDeviceRed:1.0 green:1.0 blue:0.5 alpha:1.0]; + case SKASColorTurquoise: return [NSColor colorWithDeviceRed:1.0 green:0.5 blue:1.0 alpha:1.0]; + case SKASColorViolet: return [NSColor colorWithDeviceRed:0.5 green:1.0 blue:1.0 alpha:1.0]; + case SKASColorOrange: return [NSColor orangeColor]; + case SKASColorDeepPink: return [NSColor colorWithDeviceRed:1.0 green:0.0 blue:0.5 alpha:1.0]; + case SKASColorSpringGreen: return [NSColor colorWithDeviceRed:0.0 green:1.0 blue:0.5 alpha:1.0]; + case SKASColorAqua: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:1.0 alpha:1.0]; + case SKASColorLime: return [NSColor colorWithDeviceRed:0.5 green:1.0 blue:0.0 alpha:1.0]; + case SKASColorDarkViolet: return [NSColor colorWithDeviceRed:0.5 green:0.0 blue:1.0 alpha:1.0]; + case SKASColorPurple: return [NSColor purpleColor]; + case SKASColorTeal: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:0.5 alpha:1.0]; + case SKASColorOlive: return [NSColor colorWithDeviceRed:0.5 green:0.5 blue:0.0 alpha:1.0]; + case SKASColorBrown: return [NSColor brownColor]; + case SKASColorBlack: return [NSColor blackColor]; + case SKASColorWhite: return [NSColor whiteColor]; + case SKASColorGray: return [NSColor grayColor]; + case SKASColorDarkGray: return [NSColor darkGrayColor]; + case SKASColorLightGray: return [NSColor lightGrayColor]; + case SKASColorClear: return [NSColor clearColor]; + default: return nil; + } + break; + case 4: + alpha = (float)[[descriptor descriptorAtIndex:4] int32Value] / 65535.0f; + case 3: + red = (float)[[descriptor descriptorAtIndex:1] int32Value] / 65535.0f; + green = (float)[[descriptor descriptorAtIndex:2] int32Value] / 65535.0f; + blue = (float)[[descriptor descriptorAtIndex:3] int32Value] / 65535.0f; + break; + case 2: + alpha = (float)[[descriptor descriptorAtIndex:2] int32Value] / 65535.0f; + case 1: + red = green = blue = (float)[[descriptor descriptorAtIndex:1] int32Value] / 65535.0f; + break; + default: + return nil; + } + return [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha]; +} + +- (id)scriptingRgbaColorDescriptor; +{ + float red, green, blue, alpha; + [[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha]; + + NSAppleEventDescriptor *descriptor = [NSAppleEventDescriptor listDescriptor]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * red)] atIndex:1]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * green)] atIndex:2]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * blue)] atIndex:3]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * alpha)] atIndex:4]; + + return descriptor; +} + +@end Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-17 14:03:16 UTC (rev 2326) +++ trunk/SKPDFAnnotationNote.m 2007-06-17 16:42:18 UTC (rev 2327) @@ -1468,115 +1468,3 @@ } @end - -#pragma mark - - -enum { - SKASColorRed = 'Red ', - SKASColorGreen = 'Gren', - SKASColorBlue = 'Blue', - SKASColorYellow = 'Yelw', - SKASColorMagenta = 'Mgnt', - SKASColorCyan = 'Cyan', - SKASColorDarkRed = 'DRed', - SKASColorDarkGreen = 'DGrn', - SKASColorDarkBlue = 'DBlu', - SKASColorBanana = 'Bana', - SKASColorTurquoise = 'Turq', - SKASColorViolet = 'Viol', - SKASColorOrange = 'Orng', - SKASColorDeepPink = 'DpPk', - SKASColorSpringGreen = 'SprG', - SKASColorAqua = 'Aqua', - SKASColorLime = 'Lime', - SKASColorDarkViolet = 'DVio', - SKASColorPurple = 'Prpl', - SKASColorTeal = 'Teal', - SKASColorOlive = 'Oliv', - SKASColorBrown = 'Brwn', - SKASColorBlack = 'Blck', - SKASColorWhite = 'Whit', - SKASColorGray = 'Gray', - SKASColorLightGray = 'LGry', - SKASColorDarkGray = 'DGry', - SKASColorClear = 'Clea' -}; - -@interface NSColor (SKExtensions) -+ (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor; -- (id)scriptingRgbaColorDescriptor; -@end - - -@implementation NSColor (SKExtensions) - -+ (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor; -{ - float red, green, blue, alpha = 1.0; - switch ([descriptor numberOfItems]) { - case 0: - switch ([descriptor enumCodeValue]) { - case SKASColorRed: return [NSColor redColor]; - case SKASColorGreen: return [NSColor greenColor]; - case SKASColorBlue: return [NSColor blueColor]; - case SKASColorYellow: return [NSColor yellowColor]; - case SKASColorMagenta: return [NSColor magentaColor]; - case SKASColorCyan: return [NSColor cyanColor]; - case SKASColorDarkRed: return [NSColor colorWithDeviceRed:0.5 green:0.0 blue:0.0 alpha:1.0]; - case SKASColorDarkGreen: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:0.0 alpha:1.0]; - case SKASColorDarkBlue: return [NSColor colorWithDeviceRed:0.0 green:0.0 blue:0.5 alpha:1.0]; - case SKASColorBanana: return [NSColor colorWithDeviceRed:1.0 green:1.0 blue:0.5 alpha:1.0]; - case SKASColorTurquoise: return [NSColor colorWithDeviceRed:1.0 green:0.5 blue:1.0 alpha:1.0]; - case SKASColorViolet: return [NSColor colorWithDeviceRed:0.5 green:1.0 blue:1.0 alpha:1.0]; - case SKASColorOrange: return [NSColor orangeColor]; - case SKASColorDeepPink: return [NSColor colorWithDeviceRed:1.0 green:0.0 blue:0.5 alpha:1.0]; - case SKASColorSpringGreen: return [NSColor colorWithDeviceRed:0.0 green:1.0 blue:0.5 alpha:1.0]; - case SKASColorAqua: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:1.0 alpha:1.0]; - case SKASColorLime: return [NSColor colorWithDeviceRed:0.5 green:1.0 blue:0.0 alpha:1.0]; - case SKASColorDarkViolet: return [NSColor colorWithDeviceRed:0.5 green:0.0 blue:1.0 alpha:1.0]; - case SKASColorPurple: return [NSColor purpleColor]; - case SKASColorTeal: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:0.5 alpha:1.0]; - case SKASColorOlive: return [NSColor colorWithDeviceRed:0.5 green:0.5 blue:0.0 alpha:1.0]; - case SKASColorBrown: return [NSColor brownColor]; - case SKASColorBlack: return [NSColor blackColor]; - case SKASColorWhite: return [NSColor whiteColor]; - case SKASColorGray: return [NSColor grayColor]; - case SKASColorDarkGray: return [NSColor darkGrayColor]; - case SKASColorLightGray: return [NSColor lightGrayColor]; - case SKASColorClear: return [NSColor clearColor]; - default: return nil; - } - break; - case 4: - alpha = (float)[[descriptor descriptorAtIndex:4] int32Value] / 65535.0f; - case 3: - red = (float)[[descriptor descriptorAtIndex:1] int32Value] / 65535.0f; - green = (float)[[descriptor descriptorAtIndex:2] int32Value] / 65535.0f; - blue = (float)[[descriptor descriptorAtIndex:3] int32Value] / 65535.0f; - break; - case 2: - alpha = (float)[[descriptor descriptorAtIndex:2] int32Value] / 65535.0f; - case 1: - red = green = blue = (float)[[descriptor descriptorAtIndex:1] int32Value] / 65535.0f; - break; - default: - return nil; - } - return [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha]; -} - -- (id)scriptingRgbaColorDescriptor; -{ - float red, green, blue, alpha; - [[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha]; - - NSAppleEventDescriptor *descriptor = [NSAppleEventDescriptor listDescriptor]; - [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * red)] atIndex:1]; - [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * green)] atIndex:2]; - [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * blue)] atIndex:3]; - [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * alpha)] atIndex:4]; - - return descriptor; -} - -@end Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-06-17 14:03:16 UTC (rev 2326) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-06-17 16:42:18 UTC (rev 2327) @@ -150,6 +150,7 @@ CE7468810B7F3C0000CBF969 /* zoomInCursor.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7467540B7F321100CBF969 /* zoomInCursor.tiff */; }; CE7468820B7F3C0000CBF969 /* zoomOutCursor.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7467550B7F321A00CBF969 /* zoomOutCursor.tiff */; }; CE7469180B7F40B700CBF969 /* Skim.icns in Resources */ = {isa = PBXBuildFile; fileRef = CE7469170B7F40B600CBF969 /* Skim.icns */; }; + CE7C20500C259A5D0059E08C /* NSColor_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE7C204E0C259A5D0059E08C /* NSColor_SKExtensions.m */; }; CE7C5D050BD8062C0011315D /* ArrowNoteAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7C5D040BD8062C0011315D /* ArrowNoteAdorn.tiff */; }; CE7C5D190BD8086C0011315D /* ToolbarArrowNote.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7C5D180BD8086C0011315D /* ToolbarArrowNote.tiff */; }; CE9A87930C0C9E9A004F1F97 /* ProgressSheet.nib in Resources */ = {isa = PBXBuildFile; fileRef = CE9A878D0C0C9E9A004F1F97 /* ProgressSheet.nib */; }; @@ -496,6 +497,8 @@ CE7467540B7F321100CBF969 /* zoomInCursor.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = zoomInCursor.tiff; path = Images/zoomInCursor.tiff; sourceTree = "<group>"; }; CE7467550B7F321A00CBF969 /* zoomOutCursor.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = zoomOutCursor.tiff; path = Images/zoomOutCursor.tiff; sourceTree = "<group>"; }; CE7469170B7F40B600CBF969 /* Skim.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = Skim.icns; path = Images/Skim.icns; sourceTree = "<group>"; }; + CE7C204D0C259A5D0059E08C /* NSColor_SKExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSColor_SKExtensions.h; sourceTree = "<group>"; }; + CE7C204E0C259A5D0059E08C /* NSColor_SKExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSColor_SKExtensions.m; sourceTree = "<group>"; }; CE7C5D040BD8062C0011315D /* ArrowNoteAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ArrowNoteAdorn.tiff; path = Images/ArrowNoteAdorn.tiff; sourceTree = "<group>"; }; CE7C5D180BD8086C0011315D /* ToolbarArrowNote.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarArrowNote.tiff; path = Images/ToolbarArrowNote.tiff; sourceTree = "<group>"; }; CE87EF690BA9FF5A0027BBDD /* skimhelp.css */ = {isa = PBXFileReference; explicitFileType = text; fileEncoding = 30; name = skimhelp.css; path = "English.lproj/Skim Help/sty/skimhelp.css"; sourceTree = "<group>"; }; @@ -720,6 +723,8 @@ F968C5A10C036E9D000BD1B2 /* NSBitmapImageRep_SKExtensions.m */, CE1E30260BDB9D8E0011D9DD /* NSCharacterSet_SKExtensions.h */, CE1E30270BDB9D8E0011D9DD /* NSCharacterSet_SKExtensions.m */, + CE7C204D0C259A5D0059E08C /* NSColor_SKExtensions.h */, + CE7C204E0C259A5D0059E08C /* NSColor_SKExtensions.m */, CE2DE4EC0B85DB6300D0DA12 /* NSCursor_SKExtensions.h */, CE2DE4ED0B85DB6300D0DA12 /* NSCursor_SKExtensions.m */, CE5487BA0B35A20A00F8AFB6 /* NSFileManager_ExtendedAttributes.h */, @@ -1335,6 +1340,7 @@ CE41B2CC0C08D17100E36EB7 /* NSValue_SKExtensions.m in Sources */, F9F220890C14BDFF00041284 /* UKFileWatcher.m in Sources */, F9F2208B0C14BDFF00041284 /* UKKQueue.m in Sources */, + CE7C20500C259A5D0059E08C /* NSColor_SKExtensions.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 14:03:25
|
Revision: 2326 http://skim-app.svn.sourceforge.net/skim-app/?rev=2326&view=rev Author: hofman Date: 2007-06-17 07:03:16 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Use note types as keys for default note colors. Remove default note color enum, accessing them as a property of the app makes more sense and allows to change them. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-17 13:51:35 UTC (rev 2325) +++ trunk/SKPDFAnnotationNote.m 2007-06-17 14:03:16 UTC (rev 2326) @@ -1502,17 +1502,6 @@ SKASColorClear = 'Clea' }; -enum { - SKASColorTextNote = 'CTxt', - SKASColorAnchoredNote = 'CAnc', - SKASColorCircleNote = 'CCir', - SKASColorSquareNote = 'CSqu', - SKASColorHighlightNote = 'CHil', - SKASColorUnderlineNote = 'CUnd', - SKASColorStrikeOutNote = 'CStr', - SKASColorArrowNote = 'CArr' -}; - @interface NSColor (SKExtensions) + (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor; - (id)scriptingRgbaColorDescriptor; @@ -1524,7 +1513,6 @@ + (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor; { float red, green, blue, alpha = 1.0; - NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; switch ([descriptor numberOfItems]) { case 0: switch ([descriptor enumCodeValue]) { @@ -1556,14 +1544,6 @@ case SKASColorDarkGray: return [NSColor darkGrayColor]; case SKASColorLightGray: return [NSColor lightGrayColor]; case SKASColorClear: return [NSColor clearColor]; - case SKASColorTextNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKFreeTextNoteColorKey]]; - case SKASColorAnchoredNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKAnchoredNoteColorKey]]; - case SKASColorCircleNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKCircleNoteColorKey]]; - case SKASColorSquareNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKSquareNoteColorKey]]; - case SKASColorHighlightNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKHighlightNoteColorKey]]; - case SKASColorUnderlineNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKUnderlineNoteColorKey]]; - case SKASColorStrikeOutNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKStrikeOutNoteColorKey]]; - case SKASColorArrowNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKArrowNoteColorKey]]; default: return nil; } break; Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-17 13:51:35 UTC (rev 2325) +++ trunk/Skim.sdef 2007-06-17 14:03:16 UTC (rev 2326) @@ -42,7 +42,7 @@ description="The default background color in full screen mode."> <cocoa key="fullScreenBackgroundColor"/> </property> - <property name="note colors" type="default colors" code="NotC" + <property name="default note colors" type="note colors" code="DNtC" description="The default colors used for new notes."> <cocoa key="defaultNoteColors"/> </property> @@ -780,36 +780,36 @@ </property> </record-type> - <record-type name="default colors" code="DClr"> - <property name="text note color" code="CTxt" type="RGBA color" + <record-type name="note colors" code="NClr"> + <property name="text note" code="NTxt" type="RGBA color" description="Default text note color."> <cocoa key="textNote"/> </property> - <property name="anchored note color" code="CAnc" type="RGBA color" + <property name="anchored note" code="NAnc" type="RGBA color" description="Default anchored note color."> <cocoa key="anchoredNote"/> </property> - <property name="circle note color" code="CCir" type="RGBA color" + <property name="circle note" code="NCir" type="RGBA color" description="Default circle color."> <cocoa key="circleNote"/> </property> - <property name="box note color" code="CSqu" type="RGBA color" + <property name="box note" code="NSqu" type="RGBA color" description="Default box color."> <cocoa key="squareNote"/> </property> - <property name="highlight note color" code="CHil" type="RGBA color" + <property name="highlight note" code="NHil" type="RGBA color" description="Default highlight color."> <cocoa key="highlightNote"/> </property> - <property name="underline note color" code="CUnd" type="RGBA color" + <property name="underline note" code="NUnd" type="RGBA color" description="Default underline highlight color."> <cocoa key="underlineNote"/> </property> - <property name="strike out note color" code="CStr" type="RGBA color" + <property name="strike out note" code="NStr" type="RGBA color" description="Default strike out highlight color."> <cocoa key="strikeOutNote"/> </property> - <property name="arrow note color" code="CArr" type="RGBA color" + <property name="arrow note" code="NArr" type="RGBA color" description="Default arrow color."> <cocoa key="arrowNote"/> </property> @@ -878,25 +878,6 @@ description="Clear color."/> </enumeration> - <enumeration name="default color" code="DClE"> - <enumerator name="text note color" code="CTxt" - description="Default text note color."/> - <enumerator name="anchored note color" code="CAnc" - description="Default anchored note color."/> - <enumerator name="circle note color" code="CCir" - description="Default circle color."/> - <enumerator name="box note color" code="CSqu" - description="Default box color."/> - <enumerator name="highlight note color" code="CHil" - description="Default highlight color."/> - <enumerator name="underline note color" code="CUnd" - description="Default underline highlight color."/> - <enumerator name="strike out note color" code="CStr" - description="Default strike out highlight color."/> - <enumerator name="arrow note color" code="CArr" - description="Default arrow color."/> - </enumeration> - <enumeration name="note type" code="NTpE"> <enumerator name="text note" code="NTxt" description="Text note."/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 13:51:38
|
Revision: 2325 http://skim-app.svn.sourceforge.net/skim-app/?rev=2325&view=rev Author: hofman Date: 2007-06-17 06:51:35 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Make some pref settings accessible to applescript. Modified Paths: -------------- trunk/SKApplicationController.h trunk/SKApplicationController.m trunk/SKDocument.h trunk/SKDocument.m trunk/Skim.sdef Modified: trunk/SKApplicationController.h =================================================================== --- trunk/SKApplicationController.h 2007-06-17 10:29:57 UTC (rev 2324) +++ trunk/SKApplicationController.h 2007-06-17 13:51:35 UTC (rev 2325) @@ -59,9 +59,30 @@ - (NSString *)applicationSupportPathForDomain:(int)domain create:(BOOL)create; - (NSString *)pathForApplicationSupportFile:(NSString *)file ofType:(NSString *)extension; +- (NSDictionary *)defaultPdfViewSettings; +- (void)setDefaultPdfViewSettings:(NSDictionary *)settings; +- (NSDictionary *)defaultFullScreenPdfViewSettings; +- (void)setDefaultFullScreenPdfViewSettings:(NSDictionary *)settings; +- (NSColor *)backgroundColor; +- (void)setBackgroundColor:(NSColor *)color; +- (NSColor *)fullScreenBackgroundColor; +- (void)setFullScreenBackgroundColor:(NSColor *)color; +- (NSDictionary *)defaultNoteColors; +- (void)setDefaultColors:(NSDictionary *)colorDict; + @end +#pragma mark - +@interface NSView (SKScrollingExtensions) +- (void)scrollLineUp; +- (void)scrollLineDown; +- (void)scrollLineRight; +- (void)scrollLineLeft; +@end + +#pragma mark - + enum { SKSplashTypeResize, SKSplashTypeScroll Modified: trunk/SKApplicationController.m =================================================================== --- trunk/SKApplicationController.m 2007-06-17 10:29:57 UTC (rev 2324) +++ trunk/SKApplicationController.m 2007-06-17 13:51:35 UTC (rev 2325) @@ -52,50 +52,6 @@ #import "NSBezierPath_BDSKExtensions.h" -@interface NSView (SKScrollingExtensions) -- (void)scrollLineUp; -- (void)scrollLineDown; -- (void)scrollLineRight; -- (void)scrollLineLeft; -@end - -@implementation NSView (SKScrollingExtensions) - -- (void)scrollLineUp { - NSScrollView *scrollView = [self enclosingScrollView]; - NSView *documentView = [scrollView documentView]; - NSPoint point = [documentView visibleRect].origin; - point.y -= [scrollView verticalLineScroll]; - [documentView scrollPoint:point]; -} - -- (void)scrollLineDown { - NSScrollView *scrollView = [self enclosingScrollView]; - NSView *documentView = [scrollView documentView]; - NSPoint point = [documentView visibleRect].origin; - point.y += [scrollView verticalLineScroll]; - [documentView scrollPoint:point]; -} - -- (void)scrollLineRight { - NSScrollView *scrollView = [self enclosingScrollView]; - NSView *documentView = [scrollView documentView]; - NSPoint point = [documentView visibleRect].origin; - point.x -= [scrollView horizontalLineScroll]; - [documentView scrollPoint:point]; -} - -- (void)scrollLineLeft { - NSScrollView *scrollView = [self enclosingScrollView]; - NSView *documentView = [scrollView documentView]; - NSPoint point = [documentView visibleRect].origin; - point.x += [scrollView horizontalLineScroll]; - [documentView scrollPoint:point]; -} - -@end - - @implementation SKApplicationController + (void)initialize{ @@ -161,6 +117,8 @@ [[NSColorPanel sharedColorPanel] setShowsAlpha:YES]; } +#pragma mark NSApplication delegate + - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender{ if ([[NSUserDefaults standardUserDefaults] boolForKey:SKReopenLastOpenFilesKey]) { @@ -217,6 +175,8 @@ } } +#pragma mark Actions + - (IBAction)visitWebSite:(id)sender{ if([[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://skim-app.sourceforge.net/"]] == NO) NSBeep(); @@ -247,6 +207,8 @@ [[document mainWindowController] setPageNumber:[[bm objectForKey:@"pageIndex"] unsignedIntValue] + 1]; } +#pragma mark Support + - (void)menuNeedsUpdate:(NSMenu *)menu { NSArray *bookmarks = [[SKBookmarkController sharedBookmarkController] bookmarks]; int i = [menu numberOfItems], iMax = [bookmarks count]; @@ -436,10 +398,137 @@ return fullPath; } +#pragma mark Scripting support + +- (BOOL)application:(NSApplication *)sender delegateHandlesKey:(NSString *)key { + static NSSet *applicationScriptingKeys = nil; + if (applicationScriptingKeys == nil) + applicationScriptingKeys = [[NSSet alloc] initWithObjects:@"defaultPdfViewSettings", @"defaultFullScreenPdfViewSettings", @"backgroundColor", @"fullScreenBackgroundColor", + @"defaultNoteColors",nil]; + return [applicationScriptingKeys containsObject:key]; +} + +- (NSDictionary *)defaultPdfViewSettings { + return [[[NSUserDefaults standardUserDefaults] dictionaryForKey:SKDefaultPDFDisplaySettingsKey] AppleScriptPDFViewSettingsFromPDFViewSettings]; +} + +- (void)setDefaultPdfViewSettings:(NSDictionary *)settings { + if (settings == nil) + return; + NSMutableDictionary *setup = [NSMutableDictionary dictionary]; + [setup addEntriesFromDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:SKDefaultPDFDisplaySettingsKey]]; + [setup addEntriesFromDictionary:settings]; + [[NSUserDefaults standardUserDefaults] setObject:[setup PDFViewSettingsFromAppleScriptPDFViewSettings] forKey:SKDefaultPDFDisplaySettingsKey]; +} + +- (NSDictionary *)defaultFullScreenPdfViewSettings { + return [[[NSUserDefaults standardUserDefaults] dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey] AppleScriptPDFViewSettingsFromPDFViewSettings]; +} + +- (void)setDefaultFullScreenPdfViewSettings:(NSDictionary *)settings { + if (settings == nil) + return; + NSMutableDictionary *setup = [NSMutableDictionary dictionary]; + if ([settings count]) { + [setup addEntriesFromDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:SKDefaultPDFDisplaySettingsKey]]; + [setup addEntriesFromDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey:SKDefaultFullScreenPDFDisplaySettingsKey]]; + [setup addEntriesFromDictionary:settings]; + } + [[NSUserDefaults standardUserDefaults] setObject:[setup PDFViewSettingsFromAppleScriptPDFViewSettings] forKey:SKDefaultFullScreenPDFDisplaySettingsKey]; +} + +- (NSColor *)backgroundColor { + return [NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] dataForKey:SKBackgroundColorKey]]; +} + +- (void)setBackgroundColor:(NSColor *)color { + return [[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKBackgroundColorKey]; +} + +- (NSColor *)fullScreenBackgroundColor { + return [NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] dataForKey:SKFullScreenBackgroundColorKey]]; +} + +- (void)setFullScreenBackgroundColor:(NSColor *)color { + return [[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKFullScreenBackgroundColorKey]; +} + +- (NSDictionary *)defaultNoteColors { + NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; + return [NSDictionary dictionaryWithObjectsAndKeys: + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKFreeTextNoteColorKey]], @"textNote", + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKAnchoredNoteColorKey]], @"anchoredNote", + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKCircleNoteColorKey]], @"circleNote", + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKSquareNoteColorKey]], @"squareNote", + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKHighlightNoteColorKey]], @"highlightNote", + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKUnderlineNoteColorKey]], @"underlineNote", + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKStrikeOutNoteColorKey]], @"strikeOutNote", + [NSUnarchiver unarchiveObjectWithData:[sud dataForKey:SKArrowNoteColorKey]], @"arrowNote", nil]; +} + +- (void)setDefaultColors:(NSDictionary *)colorDict { + NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; + NSColor *color; + if (color = [colorDict objectForKey:@"textNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKFreeTextNoteColorKey]; + if (color = [colorDict objectForKey:@"anchoredNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKAnchoredNoteColorKey]; + if (color = [colorDict objectForKey:@"circleNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKCircleNoteColorKey]; + if (color = [colorDict objectForKey:@"squareNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKSquareNoteColorKey]; + if (color = [colorDict objectForKey:@"highlightNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKHighlightNoteColorKey]; + if (color = [colorDict objectForKey:@"underlineNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKUnderlineNoteColorKey]; + if (color = [colorDict objectForKey:@"strikeOutNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKStrikeOutNoteColorKey]; + if (color = [colorDict objectForKey:@"arrowNote"]) + [sud setObject:[NSArchiver archivedDataWithRootObject:color] forKey:SKArrowNoteColorKey]; +} + @end #pragma mark - +@implementation NSView (SKScrollingExtensions) + +- (void)scrollLineUp { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.y -= [scrollView verticalLineScroll]; + [documentView scrollPoint:point]; +} + +- (void)scrollLineDown { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.y += [scrollView verticalLineScroll]; + [documentView scrollPoint:point]; +} + +- (void)scrollLineRight { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.x -= [scrollView horizontalLineScroll]; + [documentView scrollPoint:point]; +} + +- (void)scrollLineLeft { + NSScrollView *scrollView = [self enclosingScrollView]; + NSView *documentView = [scrollView documentView]; + NSPoint point = [documentView visibleRect].origin; + point.x += [scrollView horizontalLineScroll]; + [documentView scrollPoint:point]; +} + +@end + +#pragma mark - + @implementation SKSplashWindow - (id)initWithType:(int)splashType atPoint:(NSPoint)point screen:(NSScreen *)screen { Modified: trunk/SKDocument.h =================================================================== --- trunk/SKDocument.h 2007-06-17 10:29:57 UTC (rev 2324) +++ trunk/SKDocument.h 2007-06-17 13:51:35 UTC (rev 2325) @@ -120,3 +120,9 @@ @interface NSWindow (SKScriptingExtensions) - (id)handleRevertScriptCommand:(NSScriptCommand *)command; @end + + +@interface NSDictionary (SKScriptingExtensions) +- (NSDictionary *)AppleScriptPDFViewSettingsFromPDFViewSettings; +- (NSDictionary *)PDFViewSettingsFromAppleScriptPDFViewSettings; +@end Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-06-17 10:29:57 UTC (rev 2324) +++ trunk/SKDocument.m 2007-06-17 13:51:35 UTC (rev 2325) @@ -978,56 +978,11 @@ } - (NSDictionary *)pdfViewSettings { - NSMutableDictionary *setup = [[[[self mainWindowController] currentPDFSettings] mutableCopy] autorelease]; - - int displayMode; - switch ([[setup objectForKey:@"displayMode"] intValue]) { - case kPDFDisplaySinglePage: displayMode = SKASDisplaySinglePage; break; - case kPDFDisplaySinglePageContinuous: displayMode = SKASDisplaySinglePageContinuous; break; - case kPDFDisplayTwoUp: displayMode = SKASDisplayTwoUp; break; - case kPDFDisplayTwoUpContinuous: displayMode = SKASDisplayTwoUpContinuous; break; - default: displayMode = [[self pdfView] displayMode]; - } - [setup setObject:[NSNumber numberWithInt:displayMode] forKey:@"displayMode"]; - - int displayBox = [[self pdfView] displayBox]; - switch ([[setup objectForKey:@"displayBox"] intValue]) { - case kPDFDisplayBoxMediaBox: displayBox = SKASMediaBox; break; - case kPDFDisplayBoxCropBox: displayBox = SKASCropBox; break; - default: displayMode = [[self pdfView] displayBox]; - } - [setup setObject:[NSNumber numberWithInt:displayBox] forKey:@"displayBox"]; - - return setup; + return [[[self mainWindowController] currentPDFSettings] AppleScriptPDFViewSettingsFromPDFViewSettings]; } - (void)setPdfViewSettings:(NSDictionary *)pdfViewSettings { - NSMutableDictionary *setup = [[pdfViewSettings mutableCopy] autorelease]; - NSNumber *number; - - if (number = [setup objectForKey:@"displayMode"]) { - int displayMode; - switch ([number intValue]) { - case SKASDisplaySinglePage: displayMode = kPDFDisplaySinglePage; break; - case SKASDisplaySinglePageContinuous: displayMode = kPDFDisplaySinglePageContinuous; break; - case SKASDisplayTwoUp: displayMode = kPDFDisplayTwoUp; break; - case SKASDisplayTwoUpContinuous: displayMode = kPDFDisplayTwoUpContinuous; break; - default: displayMode = kPDFDisplaySinglePage; - } - [setup setObject:[NSNumber numberWithInt:displayMode] forKey:@"displayMode"]; - } - - if (number = [setup objectForKey:@"displayBox"]) { - int displayBox; - switch ([number intValue]) { - case SKASMediaBox: displayBox = kPDFDisplayBoxMediaBox; break; - case SKASCropBox: displayBox = kPDFDisplayBoxCropBox; break; - default: displayBox = kPDFDisplayBoxCropBox; - } - [setup setObject:[NSNumber numberWithInt:displayBox] forKey:@"displayBox"]; - } - - [[self mainWindowController] applyPDFSettings:setup]; + [[self mainWindowController] applyPDFSettings:[pdfViewSettings PDFViewSettingsFromAppleScriptPDFViewSettings]]; } - (NSDictionary *)documentAttributes { @@ -1143,3 +1098,57 @@ } @end + + +@implementation NSDictionary (SKScriptingExtensions) + +- (NSDictionary *)AppleScriptPDFViewSettingsFromPDFViewSettings { + NSMutableDictionary *setup = [[self mutableCopy] autorelease]; + + int displayMode = 0; + switch ([[setup objectForKey:@"displayMode"] intValue]) { + case kPDFDisplaySinglePage: displayMode = SKASDisplaySinglePage; break; + case kPDFDisplaySinglePageContinuous: displayMode = SKASDisplaySinglePageContinuous; break; + case kPDFDisplayTwoUp: displayMode = SKASDisplayTwoUp; break; + case kPDFDisplayTwoUpContinuous: displayMode = SKASDisplayTwoUpContinuous; break; + } + [setup setObject:[NSNumber numberWithInt:displayMode] forKey:@"displayMode"]; + + int displayBox = 0; + switch ([[setup objectForKey:@"displayBox"] intValue]) { + case kPDFDisplayBoxMediaBox: displayBox = SKASMediaBox; break; + case kPDFDisplayBoxCropBox: displayBox = SKASCropBox; break; + } + [setup setObject:[NSNumber numberWithInt:displayBox] forKey:@"displayBox"]; + + return setup; +} + +- (NSDictionary *)PDFViewSettingsFromAppleScriptPDFViewSettings { + NSMutableDictionary *setup = [[self mutableCopy] autorelease]; + NSNumber *number; + + if (number = [setup objectForKey:@"displayMode"]) { + int displayMode = 0; + switch ([number intValue]) { + case SKASDisplaySinglePage: displayMode = kPDFDisplaySinglePage; break; + case SKASDisplaySinglePageContinuous: displayMode = kPDFDisplaySinglePageContinuous; break; + case SKASDisplayTwoUp: displayMode = kPDFDisplayTwoUp; break; + case SKASDisplayTwoUpContinuous: displayMode = kPDFDisplayTwoUpContinuous; break; + } + [setup setObject:[NSNumber numberWithInt:displayMode] forKey:@"displayMode"]; + } + + if (number = [setup objectForKey:@"displayBox"]) { + int displayBox = 0; + switch ([number intValue]) { + case SKASMediaBox: displayBox = kPDFDisplayBoxMediaBox; break; + case SKASCropBox: displayBox = kPDFDisplayBoxCropBox; break; + } + [setup setObject:[NSNumber numberWithInt:displayBox] forKey:@"displayBox"]; + } + + return setup; +} + +@end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-17 10:29:57 UTC (rev 2324) +++ trunk/Skim.sdef 2007-06-17 13:51:35 UTC (rev 2325) @@ -26,6 +26,26 @@ </property> <property name="version" code="vers" type="text" access="r" description="The version of the application."/> + <property name="default view settings" type="PDF view settings" code="DVSt" + description="The default PDF view settings for normal mode."> + <cocoa key="defaultPdfViewSettings"/> + </property> + <property name="default full screen view settings" type="PDF view settings" code="DVSt" + description="The default PDF view settings for full screen mode. An empty dictionary indicates that default view settings for normal mode are used."> + <cocoa key="defaultFullScreenPdfViewSettings"/> + </property> + <property name="background color" type="RGBA color" code="NBgC" + description="The default background color in normal mode."> + <cocoa key="backgroundColor"/> + </property> + <property name="full screen background color" type="RGBA color" code="FBgC" + description="The default background color in full screen mode."> + <cocoa key="fullScreenBackgroundColor"/> + </property> + <property name="note colors" type="default colors" code="NotC" + description="The default colors used for new notes."> + <cocoa key="defaultNoteColors"/> + </property> <responds-to name="open"> <cocoa method="handleOpenScriptCommand:"/> </responds-to> @@ -760,6 +780,41 @@ </property> </record-type> + <record-type name="default colors" code="DClr"> + <property name="text note color" code="CTxt" type="RGBA color" + description="Default text note color."> + <cocoa key="textNote"/> + </property> + <property name="anchored note color" code="CAnc" type="RGBA color" + description="Default anchored note color."> + <cocoa key="anchoredNote"/> + </property> + <property name="circle note color" code="CCir" type="RGBA color" + description="Default circle color."> + <cocoa key="circleNote"/> + </property> + <property name="box note color" code="CSqu" type="RGBA color" + description="Default box color."> + <cocoa key="squareNote"/> + </property> + <property name="highlight note color" code="CHil" type="RGBA color" + description="Default highlight color."> + <cocoa key="highlightNote"/> + </property> + <property name="underline note color" code="CUnd" type="RGBA color" + description="Default underline highlight color."> + <cocoa key="underlineNote"/> + </property> + <property name="strike out note color" code="CStr" type="RGBA color" + description="Default strike out highlight color."> + <cocoa key="strikeOutNote"/> + </property> + <property name="arrow note color" code="CArr" type="RGBA color" + description="Default arrow color."> + <cocoa key="arrowNote"/> + </property> + </record-type> + <value-type name="RGBA color" code="RGBA"> <cocoa class="NSColor"/> </value-type> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 10:29:58
|
Revision: 2324 http://skim-app.svn.sourceforge.net/skim-app/?rev=2324&view=rev Author: hofman Date: 2007-06-17 03:29:57 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Change order of properties. Modified Paths: -------------- trunk/Skim.sdef Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-17 09:32:48 UTC (rev 2323) +++ trunk/Skim.sdef 2007-06-17 10:29:57 UTC (rev 2324) @@ -682,6 +682,10 @@ description="Does the PDF zoom automatically?"> <cocoa key="autoScales"/> </property> + <property name="display mode" code="DMod" type="PDF display mode" + description="The display mode for the PDF."> + <cocoa key="displayMode"/> + </property> <property name="displays page breaks" code="PgBr" type="boolean" description="Does the PDF display page breaks?"> <cocoa key="displaysPageBreaks"/> @@ -690,10 +694,6 @@ description="Is the first page in two-up displayed as in book mode?"> <cocoa key="displaysAsBook"/> </property> - <property name="display mode" code="DMod" type="PDF display mode" - description="The display mode for the PDF."> - <cocoa key="displayMode"/> - </property> <property name="display box" code="DBox" type="PDF display box" description="The display box for the PDF."> <cocoa key="displayBox"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-17 09:32:50
|
Revision: 2323 http://skim-app.svn.sourceforge.net/skim-app/?rev=2323&view=rev Author: hofman Date: 2007-06-17 02:32:48 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Add script command to get the first/last index of a selection. Modified Paths: -------------- trunk/PDFSelection_SKExtensions.h trunk/PDFSelection_SKExtensions.m trunk/Skim.sdef Modified: trunk/PDFSelection_SKExtensions.h =================================================================== --- trunk/PDFSelection_SKExtensions.h 2007-06-16 23:57:27 UTC (rev 2322) +++ trunk/PDFSelection_SKExtensions.h 2007-06-17 09:32:48 UTC (rev 2323) @@ -54,19 +54,28 @@ @end +#pragma mark - + +@interface SKJoinCommand : NSScriptCommand +@end + +#pragma mark - // We cannot set properties for a list of specifiers, so we get properties using some script commands @interface SKBoundsCommand : NSScriptCommand @end +#pragma mark - @interface SKTextCommand : NSScriptCommand @end +#pragma mark - @interface SKPagesCommand : NSScriptCommand @end +#pragma mark - -@interface SKJoinCommand : NSScriptCommand +@interface SKIndexCommand : NSScriptCommand @end Modified: trunk/PDFSelection_SKExtensions.m =================================================================== --- trunk/PDFSelection_SKExtensions.m 2007-06-16 23:57:27 UTC (rev 2322) +++ trunk/PDFSelection_SKExtensions.m 2007-06-17 09:32:48 UTC (rev 2323) @@ -323,7 +323,39 @@ @end +#pragma mark - +@implementation SKJoinCommand + +- (id)performDefaultImplementation { + id dP = [self directParameter]; + NSDictionary *args = [self evaluatedArguments]; + id other = [args objectForKey:@"To"]; + BOOL continuous = [[args objectForKey:@"Continuous"] boolValue]; + PDFSelection *selection = [PDFSelection selectionWithSpecifier:dP]; + PDFSelection *otherSelection = other ? [PDFSelection selectionWithSpecifier:other] : nil; + + if (selection == nil) + selection = otherSelection; + if (otherSelection) + [selection addSelection:otherSelection]; + + if (continuous) { + NSArray *pages = [selection pages]; + PDFPage *firstPage = [pages objectAtIndex:0]; + PDFPage *lastPage = [pages lastObject]; + int firstIndex = [selection safeRangeAtIndex:0 onPage:firstPage].location; + int lastIndex = NSMaxRange([selection safeRangeAtIndex:[selection safeNumberOfRangesOnPage:lastPage] - 1 onPage:lastPage]) - 1; + selection = [[firstPage document] selectionFromPage:firstPage atCharacterIndex:firstIndex toPage:lastPage atCharacterIndex:lastIndex]; + } + + return selection ? [selection objectSpecifier] : [NSArray array]; +} + +@end + +#pragma mark - + @implementation SKBoundsCommand - (id)performDefaultImplementation { @@ -367,6 +399,7 @@ @end +#pragma mark - @implementation SKTextCommand @@ -387,7 +420,7 @@ if (page == nil || [page isEqual:dPO]) textStorage = [dPO richText]; } else if ([dPO isKindOfClass:[PDFAnnotation class]]) { - if (page == nil || [[dPO page] isEqual:dPO]) + if (page == nil || [page isEqual:[dPO page]]) textStorage = [dPO textContents]; } else { attrString = [[PDFSelection selectionWithSpecifier:dP onPage:page] attributedString]; @@ -398,8 +431,9 @@ @end +#pragma mark - -@implementation SKPagesCommand +@implementation SKIndexCommand - (id)performDefaultImplementation { id dP = [self directParameter]; @@ -407,48 +441,58 @@ if ([dP isKindOfClass:[NSArray class]] == NO) dPO = [dP objectsByEvaluatingSpecifier]; + NSDictionary *args = [self evaluatedArguments]; + PDFPage *page = [args objectForKey:@"Page"]; + BOOL last = [[args objectForKey:@"Last"] boolValue]; + unsigned int index = NSNotFound; + if ([dPO isKindOfClass:[SKDocument class]]) { - return [dPO valueForKey:@"pages"]; + index = [[NSApp orderedDocuments] indexOfObjectIdenticalTo:dPO]; } else if ([dPO isKindOfClass:[PDFPage class]]) { - return [NSArray arrayWithObjects:dPO, nil]; + index = [[page document] indexForPage:dPO]; } else if ([dPO isKindOfClass:[PDFAnnotation class]]) { - return [NSArray arrayWithObjects:[dPO page], nil]; + index = [[(page ? (id)page : (id)[page containingDocument]) valueForKey:@"notes"] indexOfObjectIdenticalTo:dPO]; } else { - PDFSelection *selection = [PDFSelection selectionWithSpecifier:dP]; - return selection ? [selection pages] : [NSArray array]; + PDFSelection *selection = [PDFSelection selectionWithSpecifier:dP onPage:page]; + NSArray *pages = [selection pages]; + if ([pages count] && (page = [pages objectAtIndex:last ? [pages count] - 1 : 0])) { + int count = [selection safeNumberOfRangesOnPage:page]; + if (count > 0) { + NSRange range = [selection safeRangeAtIndex:last ? count - 1 : 0 onPage:page]; + if (range.length) { + index = last ? NSMaxRange(range) - 1 : range.location; + } + } + } } - return nil; + return [NSNumber numberWithInt:index == NSNotFound ? -1 : (int)index + 1]; } @end +#pragma mark - -@implementation SKJoinCommand +@implementation SKPagesCommand - (id)performDefaultImplementation { id dP = [self directParameter]; - NSDictionary *args = [self evaluatedArguments]; - id other = [args objectForKey:@"To"]; - BOOL continuous = [[args objectForKey:@"Continuous"] boolValue]; - PDFSelection *selection = [PDFSelection selectionWithSpecifier:dP]; - PDFSelection *otherSelection = other ? [PDFSelection selectionWithSpecifier:other] : nil; + id dPO = nil; + if ([dP isKindOfClass:[NSArray class]] == NO) + dPO = [dP objectsByEvaluatingSpecifier]; - if (selection == nil) - selection = otherSelection; - if (otherSelection) - [selection addSelection:otherSelection]; - - if (continuous) { - NSArray *pages = [selection pages]; - PDFPage *firstPage = [pages objectAtIndex:0]; - PDFPage *lastPage = [pages lastObject]; - int firstIndex = [selection safeRangeAtIndex:0 onPage:firstPage].location; - int lastIndex = NSMaxRange([selection safeRangeAtIndex:[selection safeNumberOfRangesOnPage:lastPage] - 1 onPage:lastPage]) - 1; - selection = [[firstPage document] selectionFromPage:firstPage atCharacterIndex:firstIndex toPage:lastPage atCharacterIndex:lastIndex]; + if ([dPO isKindOfClass:[SKDocument class]]) { + return [dPO valueForKey:@"pages"]; + } else if ([dPO isKindOfClass:[PDFPage class]]) { + return [NSArray arrayWithObjects:dPO, nil]; + } else if ([dPO isKindOfClass:[PDFAnnotation class]]) { + return [NSArray arrayWithObjects:[dPO page], nil]; + } else { + PDFSelection *selection = [PDFSelection selectionWithSpecifier:dP]; + return selection ? [selection pages] : [NSArray array]; } - return selection ? [selection objectSpecifier] : [NSArray array]; + return nil; } @end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-16 23:57:27 UTC (rev 2322) +++ trunk/Skim.sdef 2007-06-17 09:32:48 UTC (rev 2323) @@ -113,6 +113,9 @@ <responds-to name="get text for"> <cocoa method=""/> </responds-to> + <responds-to name="get index for"> + <cocoa method=""/> + </responds-to> <responds-to name="get pages for"> <cocoa method=""/> </responds-to> @@ -575,6 +578,9 @@ <responds-to name="get text for"> <cocoa method=""/> </responds-to> + <responds-to name="get index for"> + <cocoa method=""/> + </responds-to> <responds-to name="get pages for"> <cocoa method=""/> </responds-to> @@ -659,6 +665,9 @@ <responds-to name="get text for"> <cocoa method=""/> </responds-to> + <responds-to name="get index for"> + <cocoa method=""/> + </responds-to> <responds-to name="get pages for"> <cocoa method=""/> </responds-to> @@ -947,11 +956,11 @@ <type type="specifier" list="yes"/> <cocoa key="From"/> </parameter> - <parameter name="backward" code="Back" type="boolean" optional="yes" + <parameter name="backward search" code="Back" type="boolean" optional="yes" description="Search backward?"> <cocoa key="Backward"/> </parameter> - <parameter name="case sensitive" code="casS" type="boolean" optional="yes" + <parameter name="case sensitive search" code="casS" type="boolean" optional="yes" description="Is the search case sensitive?"> <cocoa key="CaseSensitive"/> </parameter> @@ -973,7 +982,7 @@ <cocoa key="To"/> <type type="specifier" list="yes"/> </parameter> - <parameter name="continuous" type="boolean" code="conI" optional="yes" + <parameter name="continuous selection" type="boolean" code="conI" optional="yes" description="Join to a continuous selection?"> <cocoa key="Continuous"/> </parameter> @@ -1025,12 +1034,36 @@ description="The text of the object."/> </command> + <command name="get index for" code="SKIMIndx" + description="Get the index of a document, page, note, or selection."> + <cocoa class="SKIndexCommand"/> + <synonym name="index for"/> + <direct-parameter + description="The document, page, note, or selection."> + <type type="document"/> + <type type="page"/> + <type type="note"/> + <type type="specifier" list="yes"/> + </direct-parameter> + <parameter name="on" type="page" code="on " optional="yes" + description="The page on which to get the index."> + <cocoa key="Page"/> + </parameter> + <parameter name="last" type="boolean" code="Last" optional="yes" + description="Gets the index of the last character of a selection."> + <cocoa key="Last"/> + </parameter> + <result type="integer" + description="The index for the object. Returns -1 if no index was found."> + </result> + </command> + <command name="get pages for" code="SKIMPags" description="Get the pages of a document, page, note, or selection."> <cocoa class="SKPagesCommand"/> <synonym name="pages for"/> <direct-parameter - description="The document, page, note or selection."> + description="The document, page, note, or selection."> <type type="document"/> <type type="page"/> <type type="note"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-16 23:57:28
|
Revision: 2322 http://skim-app.svn.sourceforge.net/skim-app/?rev=2322&view=rev Author: hofman Date: 2007-06-16 16:57:27 -0700 (Sat, 16 Jun 2007) Log Message: ----------- fix typo in method name Modified Paths: -------------- trunk/SKSideWindow.m Modified: trunk/SKSideWindow.m =================================================================== --- trunk/SKSideWindow.m 2007-06-16 23:34:48 UTC (rev 2321) +++ trunk/SKSideWindow.m 2007-06-16 23:57:27 UTC (rev 2322) @@ -71,7 +71,7 @@ [self setDisplaysWhenScreenProfileChanges:YES]; [self setReleasedWhenClosed:NO]; [self setHidesOnDeactivate:YES]; - [self setWindowLevel:NSFloatingWindowLevel]; + [self setLevel:NSFloatingWindowLevel]; [self moveToScreen:screen]; } return self; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-16 23:34:49
|
Revision: 2321 http://skim-app.svn.sourceforge.net/skim-app/?rev=2321&view=rev Author: hofman Date: 2007-06-16 16:34:48 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Revert previous commit. The side windows should be able to be above the snapshot windows. Instead hide them when the app deactivates. Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKSideWindow.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-16 23:16:58 UTC (rev 2320) +++ trunk/SKMainWindowController.m 2007-06-16 23:34:48 UTC (rev 2321) @@ -1487,18 +1487,14 @@ [rightSideWindow hideSideWindow]; [leftSideWindow orderFront:self]; - [[self window] addChildWindow:leftSideWindow ordered:NSWindowAbove]; [rightSideWindow orderFront:self]; - [[self window] addChildWindow:rightSideWindow ordered:NSWindowAbove]; [pdfView setFrame:NSInsetRect([[pdfView superview] bounds], 9.0, 0.0)]; [[pdfView superview] setNeedsDisplay:YES]; } - (void)hideSideWindows { - [[self window] removeChildWindow:leftSideWindow]; [leftSideWindow orderOut:self]; - [[self window] removeChildWindow:rightSideWindow]; [rightSideWindow orderOut:self]; if ([[leftSideWindow firstResponder] isDescendantOf:leftSideBox]) Modified: trunk/SKSideWindow.m =================================================================== --- trunk/SKSideWindow.m 2007-06-16 23:16:58 UTC (rev 2320) +++ trunk/SKSideWindow.m 2007-06-16 23:34:48 UTC (rev 2321) @@ -70,6 +70,8 @@ [self setHasShadow:YES]; [self setDisplaysWhenScreenProfileChanges:YES]; [self setReleasedWhenClosed:NO]; + [self setHidesOnDeactivate:YES]; + [self setWindowLevel:NSFloatingWindowLevel]; [self moveToScreen:screen]; } return self; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-16 23:16:59
|
Revision: 2320 http://skim-app.svn.sourceforge.net/skim-app/?rev=2320&view=rev Author: hofman Date: 2007-06-16 16:16:58 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Move side windows to normal window level. Add them as child windows to make sure they stay on top of the main window. Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKSideWindow.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-16 21:44:37 UTC (rev 2319) +++ trunk/SKMainWindowController.m 2007-06-16 23:16:58 UTC (rev 2320) @@ -1487,14 +1487,18 @@ [rightSideWindow hideSideWindow]; [leftSideWindow orderFront:self]; + [[self window] addChildWindow:leftSideWindow ordered:NSWindowAbove]; [rightSideWindow orderFront:self]; + [[self window] addChildWindow:rightSideWindow ordered:NSWindowAbove]; [pdfView setFrame:NSInsetRect([[pdfView superview] bounds], 9.0, 0.0)]; [[pdfView superview] setNeedsDisplay:YES]; } - (void)hideSideWindows { + [[self window] removeChildWindow:leftSideWindow]; [leftSideWindow orderOut:self]; + [[self window] removeChildWindow:rightSideWindow]; [rightSideWindow orderOut:self]; if ([[leftSideWindow firstResponder] isDescendantOf:leftSideBox]) Modified: trunk/SKSideWindow.m =================================================================== --- trunk/SKSideWindow.m 2007-06-16 21:44:37 UTC (rev 2319) +++ trunk/SKSideWindow.m 2007-06-16 23:16:58 UTC (rev 2320) @@ -70,7 +70,6 @@ [self setHasShadow:YES]; [self setDisplaysWhenScreenProfileChanges:YES]; [self setReleasedWhenClosed:NO]; - [self setLevel:NSFloatingWindowLevel]; [self moveToScreen:screen]; } return self; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-16 21:44:39
|
Revision: 2319 http://skim-app.svn.sourceforge.net/skim-app/?rev=2319&view=rev Author: hofman Date: 2007-06-16 14:44:37 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Fix name. Modified Paths: -------------- trunk/Skim.sdef Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-16 21:05:32 UTC (rev 2318) +++ trunk/Skim.sdef 2007-06-16 21:44:37 UTC (rev 2319) @@ -825,7 +825,7 @@ description="Default box color."/> <enumerator name="highlight note color" code="CHil" description="Default highlight color."/> - <enumerator name="underline color" code="CUnd" + <enumerator name="underline note color" code="CUnd" description="Default underline highlight color."/> <enumerator name="strike out note color" code="CStr" description="Default strike out highlight color."/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-16 21:05:33
|
Revision: 2318 http://skim-app.svn.sourceforge.net/skim-app/?rev=2318&view=rev Author: hofman Date: 2007-06-16 14:05:32 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Fix some descriptions. Modified Paths: -------------- trunk/Skim.sdef Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-16 16:21:40 UTC (rev 2317) +++ trunk/Skim.sdef 2007-06-16 21:05:32 UTC (rev 2318) @@ -820,15 +820,15 @@ <enumerator name="anchored note color" code="CAnc" description="Default anchored note color."/> <enumerator name="circle note color" code="CCir" - description="Default circle note color."/> + description="Default circle color."/> <enumerator name="box note color" code="CSqu" description="Default box color."/> <enumerator name="highlight note color" code="CHil" - description="Default highlight note color."/> + description="Default highlight color."/> <enumerator name="underline color" code="CUnd" - description="Default underline color."/> + description="Default underline highlight color."/> <enumerator name="strike out note color" code="CStr" - description="Default strike out color."/> + description="Default strike out highlight color."/> <enumerator name="arrow note color" code="CArr" description="Default arrow color."/> </enumeration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-16 16:21:43
|
Revision: 2317 http://skim-app.svn.sourceforge.net/skim-app/?rev=2317&view=rev Author: hofman Date: 2007-06-16 09:21:40 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Show reading bar on thumbnail for current reading bar page. Modified Paths: -------------- trunk/PDFPage_SKExtensions.h trunk/PDFPage_SKExtensions.m trunk/SKMainWindowController.h trunk/SKMainWindowController.m trunk/SKPDFView.h trunk/SKPDFView.m trunk/SKStringConstants.h trunk/SKStringConstants.m Modified: trunk/PDFPage_SKExtensions.h =================================================================== --- trunk/PDFPage_SKExtensions.h 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/PDFPage_SKExtensions.h 2007-06-16 16:21:40 UTC (rev 2317) @@ -50,7 +50,8 @@ - (NSImage *)image; - (NSImage *)imageForBox:(PDFDisplayBox)box; - (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box; -- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset; +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box readingBarRect:(NSRect)readingBarRect; +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset readingBarRect:(NSRect)readingBarRect; - (NSArray *)lineBounds; Modified: trunk/PDFPage_SKExtensions.m =================================================================== --- trunk/PDFPage_SKExtensions.m 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/PDFPage_SKExtensions.m 2007-06-16 16:21:40 UTC (rev 2317) @@ -43,6 +43,7 @@ #import "PDFSelection_SKExtensions.h" #import "OBUtilities.h" #import "NSBitmapImageRep_SKExtensions.h" +#import "SKStringConstants.h" NSString *SKPDFDocumentPageBoundsDidChangeNotification = @"SKPDFDocumentPageBoundsDidChangeNotification"; @@ -132,12 +133,16 @@ } - (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box { + return [self thumbnailWithSize:size forBox:box readingBarRect:NSZeroRect]; +} + +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box readingBarRect:(NSRect)readingBarRect { float shadowBlurRadius = roundf(size / 32.0); float shadowOffset = - ceilf(shadowBlurRadius * 0.75); - return [self thumbnailWithSize:size forBox:box shadowBlurRadius:shadowBlurRadius shadowOffset:NSMakeSize(0.0, shadowOffset)]; + return [self thumbnailWithSize:size forBox:box shadowBlurRadius:shadowBlurRadius shadowOffset:NSMakeSize(0.0, shadowOffset) readingBarRect:readingBarRect]; } -- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset { +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset readingBarRect:(NSRect)readingBarRect { NSRect bounds = [self boundsForBox:box]; BOOL isScaled = size > 0.0; BOOL hasShadow = shadowBlurRadius > 0.0; @@ -160,6 +165,9 @@ scaleX = scaleY = 1.0; } + readingBarRect.origin.x -= NSMinX(bounds); + readingBarRect.origin.y -= NSMinY(bounds); + image = [[NSImage alloc] initWithSize:thumbnailSize]; [image lockFocus]; [NSGraphicsContext saveGraphicsState]; @@ -185,6 +193,19 @@ NSRectFill(bounds); [NSGraphicsContext restoreGraphicsState]; [self drawWithBox:box]; + if (NSIsEmptyRect(readingBarRect) == NO) { + [[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:SKReadingBarColorKey]] setFill]; + if ([[NSUserDefaults standardUserDefaults] boolForKey:SKReadingBarInvertKey]) { + NSRect outRect, ignored; + NSDivideRect(bounds, &outRect, &ignored, NSMaxY(bounds) - NSMaxY(readingBarRect), NSMaxYEdge); + [NSBezierPath fillRect:outRect]; + NSDivideRect(bounds, &outRect, &ignored, NSMinY(readingBarRect) - NSMinY(bounds), NSMinYEdge); + [NSBezierPath fillRect:outRect]; + } else { + CGContextSetBlendMode([[NSGraphicsContext currentContext] graphicsPort], kCGBlendModeMultiply); + [NSBezierPath fillRect:readingBarRect]; + } + } [NSGraphicsContext restoreGraphicsState]; [image unlockFocus]; Modified: trunk/SKMainWindowController.h =================================================================== --- trunk/SKMainWindowController.h 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/SKMainWindowController.h 2007-06-16 16:21:40 UTC (rev 2317) @@ -324,6 +324,7 @@ - (void)handleDidRemoveAnnotationNotification:(NSNotification *)notification; - (void)handleDidMoveAnnotationNotification:(NSNotification *)notification; - (void)handleDoubleClickedAnnotationNotification:(NSNotification *)notification; +- (void)handleReadingBarDidChangeNotification:(NSNotification *)notification; - (void)handleAnnotationDidChangeNotification:(NSNotification *)notification; - (void)handlePageBoundsDidChangeNotification:(NSNotification *)notification; - (void)handleDocumentBeginWrite:(NSNotification *)notification; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/SKMainWindowController.m 2007-06-16 16:21:40 UTC (rev 2317) @@ -70,6 +70,7 @@ #import "SKToolbarItem.h" #import "NSValue_SKExtensions.h" #import "NSString_SKExtensions.h" +#import "SKReadingBar.h" #define SEGMENTED_CONTROL_HEIGHT 25.0 #define WINDOW_X_DELTA 0.0 @@ -312,6 +313,8 @@ name:SKPDFViewDidMoveAnnotationNotification object:pdfView]; [nc addObserver:self selector:@selector(handleDoubleClickedAnnotationNotification:) name:SKPDFViewAnnotationDoubleClickedNotification object:pdfView]; + [nc addObserver:self selector:@selector(handleReadingBarDidChangeNotification:) + name:SKPDFViewReadingBarDidChangeNotification object:pdfView]; [nc addObserver:self selector:@selector(handleAnnotationDidChangeNotification:) name:SKAnnotationDidChangeNotification object:nil]; } @@ -692,9 +695,9 @@ NSSize newSize, oldSize = [[thumbnail image] size]; PDFDocument *pdfDoc = [pdfView document]; PDFPage *page = [pdfDoc pageAtIndex:theIndex]; - NSImage *image = [page thumbnailWithSize:thumbnailCacheSize forBox:[pdfView displayBox]]; + NSRect readingBarRect = [[[pdfView readingBar] page] isEqual:page] ? [[pdfView readingBar] currentBoundsForBox:[pdfView displayBox]] : NSZeroRect; + NSImage *image = [page thumbnailWithSize:thumbnailCacheSize forBox:[pdfView displayBox] readingBarRect:readingBarRect]; - // setImage: sends a KVO notification that results in calling objectInThumbnailsAtIndex: endlessly, so set dirty to NO first [thumbnail setDirty:NO]; [thumbnail setImage:image]; @@ -2312,6 +2315,16 @@ [self showNote:annotation]; } +- (void)handleReadingBarDidChangeNotification:(NSNotification *)notification { + NSDictionary *userInfo = [notification userInfo]; + PDFPage *oldPage = [userInfo objectForKey:@"oldPage"]; + PDFPage *newPage = [userInfo objectForKey:@"newPage"]; + if (oldPage) + [self updateThumbnailAtPageIndex:[[pdfView document] indexForPage:oldPage]]; + if (newPage && [newPage isEqual:oldPage] == NO) + [self updateThumbnailAtPageIndex:[[pdfView document] indexForPage:newPage]]; +} + - (void)handleAnnotationDidChangeNotification:(NSNotification *)notification { PDFAnnotation *annotation = [notification object]; if ([[[annotation page] document] isEqual:[[self pdfView] document]]) { Modified: trunk/SKPDFView.h =================================================================== --- trunk/SKPDFView.h 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/SKPDFView.h 2007-06-16 16:21:40 UTC (rev 2317) @@ -47,6 +47,7 @@ extern NSString *SKPDFViewDidRemoveAnnotationNotification; extern NSString *SKPDFViewDidMoveAnnotationNotification; extern NSString *SKPDFViewAnnotationDoubleClickedNotification; +extern NSString *SKPDFViewReadingBarDidChangeNotification; extern NSString *SKSkimNotePboardType; @@ -124,6 +125,7 @@ - (void)setHideNotes:(BOOL)flag; - (BOOL)hasReadingBar; +- (SKReadingBar *)readingBar; - (void)toggleReadingBar; Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/SKPDFView.m 2007-06-16 16:21:40 UTC (rev 2317) @@ -61,6 +61,7 @@ NSString *SKPDFViewDidRemoveAnnotationNotification = @"SKPDFViewDidRemoveAnnotationNotification"; NSString *SKPDFViewDidMoveAnnotationNotification = @"SKPDFViewDidMoveAnnotationNotification"; NSString *SKPDFViewAnnotationDoubleClickedNotification = @"SKPDFViewAnnotationDoubleClickedNotification"; +NSString *SKPDFViewReadingBarDidChangeNotification = @"SKPDFViewReadingBarDidChangeNotification"; NSString *SKSkimNotePboardType = @"SKSkimNotePboardType"; @@ -184,7 +185,7 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAnnotationDidChangeNotification:) name:SKAnnotationDidChangeNotification object:nil]; [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeys: - [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarTransparencyKey, SKReadingBarInvertKey, nil]]; + [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarInvertKey, nil]]; } - (id)initWithFrame:(NSRect)frameRect { @@ -203,7 +204,7 @@ - (void)dealloc { [[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKeys: - [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarTransparencyKey, SKReadingBarInvertKey, nil]]; + [NSArray arrayWithObjects:SKReadingBarColorKey, SKReadingBarInvertKey, nil]]; [[NSNotificationCenter defaultCenter] removeObserver:self]; [self doAutohide:NO]; // invalidates and releases the timer [[SKPDFHoverWindow sharedHoverWindow] orderOut:self]; @@ -488,7 +489,12 @@ return readingBar != nil; } +- (SKReadingBar *)readingBar { + return readingBar; +} + - (void)toggleReadingBar { + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:[readingBar page], @"oldPage", nil]; if (readingBar) { [readingBar release]; readingBar = nil; @@ -499,7 +505,9 @@ [readingBar goToNextLine]; [self setNeedsDisplay:YES]; [self scrollRect:[readingBar currentBounds] inPageToVisible:[readingBar page]]; + [userInfo setValue:[readingBar page] forKey:@"newPage"]; } + [[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewReadingBarDidChangeNotification object:self userInfo:userInfo]; } #pragma mark Actions @@ -1708,9 +1716,12 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if (object == [NSUserDefaultsController sharedUserDefaultsController] && [keyPath hasPrefix:@"values."]) { NSString *key = [keyPath substringFromIndex:7]; - if ([key isEqualToString:SKReadingBarColorKey] || [key isEqualToString:SKReadingBarTransparencyKey] || [key isEqualToString:SKReadingBarInvertKey]) { - if (readingBar) + if ([key isEqualToString:SKReadingBarColorKey] || [key isEqualToString:SKReadingBarInvertKey]) { + if (readingBar) { [self setNeedsDisplay:YES]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewReadingBarDidChangeNotification + object:self userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[readingBar page], @"oldPage", [readingBar page], @"newPage", nil]]; + } } } else { [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; @@ -2234,6 +2245,7 @@ - (void)moveReadingBarForKey:(unichar)eventChar { BOOL moved = NO; + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:[readingBar page], @"oldPage", nil]; if (eventChar == NSDownArrowFunctionKey) moved = [readingBar goToNextLine]; else if (eventChar == NSUpArrowFunctionKey) @@ -2246,6 +2258,8 @@ if ([[self currentPage] isEqual:[readingBar page]] == NO) [self goToPage:[readingBar page]]; [self setNeedsDisplay:YES]; + [userInfo setObject:[readingBar page] forKey:@"newPage"]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewReadingBarDidChangeNotification object:self userInfo:userInfo]; } } @@ -2830,7 +2844,8 @@ - (void)dragReadingBarWithEvent:(NSEvent *)theEvent { PDFPage *page = [readingBar page]; NSArray *lineBounds = [page lineBounds]; - + NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithObjectsAndKeys:page, @"oldPage", nil]; + [[NSCursor closedHandCursor] push]; while (YES) { @@ -2859,6 +2874,8 @@ [readingBar setPage:page]; [readingBar setCurrentLine:i]; [self setNeedsDisplay:YES]; + [userInfo setObject:[readingBar page] forKey:@"newPage"]; + [[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewReadingBarDidChangeNotification object:self userInfo:userInfo]; break; } } Modified: trunk/SKStringConstants.h =================================================================== --- trunk/SKStringConstants.h 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/SKStringConstants.h 2007-06-16 16:21:40 UTC (rev 2317) @@ -60,7 +60,6 @@ extern NSString *SKShouldAntiAliasKey; extern NSString *SKGreekingThresholdKey; extern NSString *SKReadingBarColorKey; -extern NSString *SKReadingBarTransparencyKey; extern NSString *SKReadingBarInvertKey; extern NSString *SKTextNoteFontNameKey; extern NSString *SKTextNoteFontSizeKey; Modified: trunk/SKStringConstants.m =================================================================== --- trunk/SKStringConstants.m 2007-06-16 13:19:07 UTC (rev 2316) +++ trunk/SKStringConstants.m 2007-06-16 16:21:40 UTC (rev 2317) @@ -61,7 +61,6 @@ NSString *SKShouldAntiAliasKey = @"SKShouldAntiAlias"; NSString *SKGreekingThresholdKey = @"SKGreekingThreshold"; NSString *SKReadingBarColorKey = @"SKReadingBarColor"; -NSString *SKReadingBarTransparencyKey = @"SKReadingBarTransparency"; NSString *SKReadingBarInvertKey = @"SKReadingBarInvert"; NSString *SKTextNoteFontNameKey = @"SKTextNoteFontName"; NSString *SKTextNoteFontSizeKey = @"SKTextNoteFontSize"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-16 13:19:12
|
Revision: 2316 http://skim-app.svn.sourceforge.net/skim-app/?rev=2316&view=rev Author: hofman Date: 2007-06-16 06:19:07 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Use RGBA color instead of RGB color type for colors in AppleScript support. Uses translation of custom Apple Events of type 'RGBA' through undocumented NSColor KVC methods. Accepts colors as a list of up to 4 integers, a standard color, or a default color. Modified Paths: -------------- trunk/InitialUserDefaults.plist trunk/SKPDFAnnotationNote.h trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/InitialUserDefaults.plist =================================================================== --- trunk/InitialUserDefaults.plist 2007-06-15 22:34:05 UTC (rev 2315) +++ trunk/InitialUserDefaults.plist 2007-06-16 13:19:07 UTC (rev 2316) @@ -83,13 +83,13 @@ <real>11.0</real> <key>SKFreeTextNoteColor</key> <data> - BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmAQGDPwCAgQGG + BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARm + ZmZmAQGDPwAAAAGG </data> <key>SKAnchoredNoteColor</key> <data> - BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmAQGDPwCAgQGG + BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARm + ZmZmAQGDPwAAAAGG </data> <key>SKCircleNoteColor</key> <data> @@ -108,8 +108,8 @@ </data> <key>SKUnderlineNoteColor</key> <data> - BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm - ZmZmAIM/AICBAAGG + BAt0eXBlZHN0cmVhbYED6IQBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMChARm + ZmZmAIM/AAAAAAGG </data> <key>SKStrikeOutNoteColor</key> <data> Modified: trunk/SKPDFAnnotationNote.h =================================================================== --- trunk/SKPDFAnnotationNote.h 2007-06-15 22:34:05 UTC (rev 2315) +++ trunk/SKPDFAnnotationNote.h 2007-06-16 13:19:07 UTC (rev 2316) @@ -75,8 +75,6 @@ - (NSScriptObjectSpecifier *)objectSpecifier; - (int)asNoteType; -- (NSArray *)rgbaColor; -- (void)setRgbaColor:(NSArray *)components; - (int)asIconType; - (id)textContents; - (void)setTextContents:(id)text; Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-15 22:34:05 UTC (rev 2315) +++ trunk/SKPDFAnnotationNote.m 2007-06-16 13:19:07 UTC (rev 2316) @@ -407,20 +407,6 @@ return 0; } -- (NSArray *)rgbaColor { - float red, green, blue, alpha; - [[self color] getRed:&red green:&green blue:&blue alpha:&alpha]; - return [NSArray arrayWithObjects:[NSNumber numberWithFloat:round(65535 * red)], [NSNumber numberWithFloat:round(65535 * green)], [NSNumber numberWithFloat:round(65535 * blue)], [NSNumber numberWithFloat:round(65535 * alpha)], nil]; -} - -- (void)setRgbaColor:(NSArray *)components { - float red = [[components objectAtIndex:0] floatValue] / 65535.0f; - float green = [[components objectAtIndex:1] floatValue] / 65535.0f; - float blue = [[components objectAtIndex:2] floatValue] / 65535.0f; - float alpha = [[components objectAtIndex:3] floatValue] / 65535.0f; - [self setColor:[NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha]]; -} - - (int)asIconType { return kPDFTextAnnotationIconNote; } @@ -683,6 +669,7 @@ [self setColor:[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:SKUnderlineNoteColorKey]]]; else if (type == kPDFMarkupTypeStrikeOut) [self setColor:[NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] objectForKey:SKStrikeOutNoteColorKey]]]; + [[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:[NSColor colorWithDeviceRed:0 green:0.5 blue:0 alpha:1.0]] forKey:SKUnderlineNoteColorKey]; NSArray *quadPoints = nil; if (pointStrings) { @@ -1481,3 +1468,135 @@ } @end + +#pragma mark - + +enum { + SKASColorRed = 'Red ', + SKASColorGreen = 'Gren', + SKASColorBlue = 'Blue', + SKASColorYellow = 'Yelw', + SKASColorMagenta = 'Mgnt', + SKASColorCyan = 'Cyan', + SKASColorDarkRed = 'DRed', + SKASColorDarkGreen = 'DGrn', + SKASColorDarkBlue = 'DBlu', + SKASColorBanana = 'Bana', + SKASColorTurquoise = 'Turq', + SKASColorViolet = 'Viol', + SKASColorOrange = 'Orng', + SKASColorDeepPink = 'DpPk', + SKASColorSpringGreen = 'SprG', + SKASColorAqua = 'Aqua', + SKASColorLime = 'Lime', + SKASColorDarkViolet = 'DVio', + SKASColorPurple = 'Prpl', + SKASColorTeal = 'Teal', + SKASColorOlive = 'Oliv', + SKASColorBrown = 'Brwn', + SKASColorBlack = 'Blck', + SKASColorWhite = 'Whit', + SKASColorGray = 'Gray', + SKASColorLightGray = 'LGry', + SKASColorDarkGray = 'DGry', + SKASColorClear = 'Clea' +}; + +enum { + SKASColorTextNote = 'CTxt', + SKASColorAnchoredNote = 'CAnc', + SKASColorCircleNote = 'CCir', + SKASColorSquareNote = 'CSqu', + SKASColorHighlightNote = 'CHil', + SKASColorUnderlineNote = 'CUnd', + SKASColorStrikeOutNote = 'CStr', + SKASColorArrowNote = 'CArr' +}; + +@interface NSColor (SKExtensions) ++ (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor; +- (id)scriptingRgbaColorDescriptor; +@end + + +@implementation NSColor (SKExtensions) + ++ (id)scriptingRgbaColorWithDescriptor:(NSAppleEventDescriptor *)descriptor; +{ + float red, green, blue, alpha = 1.0; + NSUserDefaults *sud = [NSUserDefaults standardUserDefaults]; + switch ([descriptor numberOfItems]) { + case 0: + switch ([descriptor enumCodeValue]) { + case SKASColorRed: return [NSColor redColor]; + case SKASColorGreen: return [NSColor greenColor]; + case SKASColorBlue: return [NSColor blueColor]; + case SKASColorYellow: return [NSColor yellowColor]; + case SKASColorMagenta: return [NSColor magentaColor]; + case SKASColorCyan: return [NSColor cyanColor]; + case SKASColorDarkRed: return [NSColor colorWithDeviceRed:0.5 green:0.0 blue:0.0 alpha:1.0]; + case SKASColorDarkGreen: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:0.0 alpha:1.0]; + case SKASColorDarkBlue: return [NSColor colorWithDeviceRed:0.0 green:0.0 blue:0.5 alpha:1.0]; + case SKASColorBanana: return [NSColor colorWithDeviceRed:1.0 green:1.0 blue:0.5 alpha:1.0]; + case SKASColorTurquoise: return [NSColor colorWithDeviceRed:1.0 green:0.5 blue:1.0 alpha:1.0]; + case SKASColorViolet: return [NSColor colorWithDeviceRed:0.5 green:1.0 blue:1.0 alpha:1.0]; + case SKASColorOrange: return [NSColor orangeColor]; + case SKASColorDeepPink: return [NSColor colorWithDeviceRed:1.0 green:0.0 blue:0.5 alpha:1.0]; + case SKASColorSpringGreen: return [NSColor colorWithDeviceRed:0.0 green:1.0 blue:0.5 alpha:1.0]; + case SKASColorAqua: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:1.0 alpha:1.0]; + case SKASColorLime: return [NSColor colorWithDeviceRed:0.5 green:1.0 blue:0.0 alpha:1.0]; + case SKASColorDarkViolet: return [NSColor colorWithDeviceRed:0.5 green:0.0 blue:1.0 alpha:1.0]; + case SKASColorPurple: return [NSColor purpleColor]; + case SKASColorTeal: return [NSColor colorWithDeviceRed:0.0 green:0.5 blue:0.5 alpha:1.0]; + case SKASColorOlive: return [NSColor colorWithDeviceRed:0.5 green:0.5 blue:0.0 alpha:1.0]; + case SKASColorBrown: return [NSColor brownColor]; + case SKASColorBlack: return [NSColor blackColor]; + case SKASColorWhite: return [NSColor whiteColor]; + case SKASColorGray: return [NSColor grayColor]; + case SKASColorDarkGray: return [NSColor darkGrayColor]; + case SKASColorLightGray: return [NSColor lightGrayColor]; + case SKASColorClear: return [NSColor clearColor]; + case SKASColorTextNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKFreeTextNoteColorKey]]; + case SKASColorAnchoredNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKAnchoredNoteColorKey]]; + case SKASColorCircleNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKCircleNoteColorKey]]; + case SKASColorSquareNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKSquareNoteColorKey]]; + case SKASColorHighlightNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKHighlightNoteColorKey]]; + case SKASColorUnderlineNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKUnderlineNoteColorKey]]; + case SKASColorStrikeOutNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKStrikeOutNoteColorKey]]; + case SKASColorArrowNote: return [NSUnarchiver unarchiveObjectWithData:[sud objectForKey:SKArrowNoteColorKey]]; + default: return nil; + } + break; + case 4: + alpha = (float)[[descriptor descriptorAtIndex:4] int32Value] / 65535.0f; + case 3: + red = (float)[[descriptor descriptorAtIndex:1] int32Value] / 65535.0f; + green = (float)[[descriptor descriptorAtIndex:2] int32Value] / 65535.0f; + blue = (float)[[descriptor descriptorAtIndex:3] int32Value] / 65535.0f; + break; + case 2: + alpha = (float)[[descriptor descriptorAtIndex:2] int32Value] / 65535.0f; + case 1: + red = green = blue = (float)[[descriptor descriptorAtIndex:1] int32Value] / 65535.0f; + break; + default: + return nil; + } + return [NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha]; +} + +- (id)scriptingRgbaColorDescriptor; +{ + float red, green, blue, alpha; + [[self colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha]; + + NSAppleEventDescriptor *descriptor = [NSAppleEventDescriptor listDescriptor]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * red)] atIndex:1]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * green)] atIndex:2]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * blue)] atIndex:3]; + [descriptor insertDescriptor:[NSAppleEventDescriptor descriptorWithInt32:round(65535 * alpha)] atIndex:4]; + + return descriptor; +} + +@end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-15 22:34:05 UTC (rev 2315) +++ trunk/Skim.sdef 2007-06-16 13:19:07 UTC (rev 2316) @@ -400,10 +400,6 @@ <cocoa name="NSTextSuite"/> - <value-type name="color" code="colr"> - <cocoa class="NSColor"/> - </value-type> - <class name="rich text" plural="rich text" code="ricT" description="Rich (styled) text"> <cocoa class="NSTextStorage"/> @@ -411,7 +407,7 @@ contradict the DTD, are NOT errors. Cocoa Scripting in 10.4 uses them to accomplish certain type conversions. --> <type type="text"/> - <property name="color" code="colr" type="color" + <property name="color" code="colr" type="RGBA color" description="The color of the first character."> <cocoa key="foregroundColor"/> </property> @@ -434,7 +430,7 @@ description="This subdivides the text into characters."> <cocoa class="NSTextStorage"/> <type type="text"/> - <property name="color" code="colr" type="color" + <property name="color" code="colr" type="RGBA color" description="The color of the first character."> <cocoa key="foregroundColor"/> </property> @@ -457,7 +453,7 @@ description="This subdivides the text into paragraphs."> <cocoa class="NSTextStorage"/> <type type="text"/> - <property name="color" code="colr" type="color" + <property name="color" code="colr" type="RGBA color" description="The color of the first character."> <cocoa key="foregroundColor"/> </property> @@ -480,7 +476,7 @@ description="This subdivides the text into words."> <cocoa class="NSTextStorage"/> <type type="text"/> - <property name="color" code="colr" type="color" + <property name="color" code="colr" type="RGBA color" description="The color of the first character."> <cocoa key="foregroundColor"/> </property> @@ -503,7 +499,7 @@ description="This subdivides the text into chunks that all have the same attributes."> <cocoa class="NSTextStorage"/> <type type="text"/> - <property name="color" code="colr" type="color" + <property name="color" code="colr" type="RGBA color" description="The color of the first character."> <cocoa key="foregroundColor"/> </property> @@ -595,15 +591,10 @@ description="The text of the note. Attributes are ignored."> <cocoa key="textContents"/> </contents> - <property name="color" code="colr" type="color" - description="The color of the note (red, green, blue)."> + <property name="color" code="colr" type="RGBA color" + description="The color of the note. Can be given as a list of (red, green, blue, alpha), a standard color (e.g. red), or a default color (e.g. text note color)."> <cocoa key="color"/> </property> - <property name="RGBA color" code="RGBA" - description="The color of the note (red, green, blue, alpha)."> - <cocoa key="rgbaColor"/> - <type type="integer" list="yes"/> - </property> <property name="page" code="Page" type="page" access="r" description="The page for the note."> <cocoa key="page"/> @@ -760,6 +751,88 @@ </property> </record-type> + <value-type name="RGBA color" code="RGBA"> + <cocoa class="NSColor"/> + </value-type> + + <enumeration name="standard color" code="ClrE"> + <enumerator name="red" code="Red " + description="Red color."/> + <enumerator name="green" code="Gren" + description="Green color."/> + <enumerator name="blue" code="Blue" + description="Blue color."/> + <enumerator name="yellow" code="Yelw" + description="Yellow color."/> + <enumerator name="magenta" code="Mgnt" + description="Magenta color."/> + <enumerator name="cyan" code="Cyan" + description="Cyan color."/> + <enumerator name="dark red" code="DRed" + description="Dark red color."/> + <enumerator name="dark green" code="DGrn" + description="Dark green color."/> + <enumerator name="dark blue" code="DBlu" + description="Dark blue color."/> + <enumerator name="banana" code="Bana" + description="Banana color."/> + <enumerator name="turquoise" code="Turq" + description="Turquoise color."/> + <enumerator name="violet" code="Viol" + description="Violet color."/> + <enumerator name="orange" code="Orng" + description="Orange color."/> + <enumerator name="deep pink" code="DpPk" + description="Deep pink color."/> + <enumerator name="spring green" code="SprG" + description="Spring green color."/> + <enumerator name="aqua" code="Aqua" + description="Aqua color."/> + <enumerator name="lime" code="Lime" + description="Lime color."/> + <enumerator name="dark violet" code="DVio" + description="Dark violet color."/> + <enumerator name="purple" code="Prpl" + description="Purple color."/> + <enumerator name="teal" code="Teal" + description="Teal color."/> + <enumerator name="olive" code="Oliv" + description="Olive color."/> + <enumerator name="brown" code="Brwn" + description="Brown color."/> + <enumerator name="black" code="Blck" + description="Black color."/> + <enumerator name="white" code="Whit" + description="White color."/> + <enumerator name="gray" code="Gray" + description="Gray color."/> + <enumerator name="light gray" code="LGry" + description="Light gray color."/> + <enumerator name="dark gray" code="DGry" + description="Dark gray color."/> + <enumerator name="clear" code="Clea" + description="Clear color."/> + </enumeration> + + <enumeration name="default color" code="DClE"> + <enumerator name="text note color" code="CTxt" + description="Default text note color."/> + <enumerator name="anchored note color" code="CAnc" + description="Default anchored note color."/> + <enumerator name="circle note color" code="CCir" + description="Default circle note color."/> + <enumerator name="box note color" code="CSqu" + description="Default box color."/> + <enumerator name="highlight note color" code="CHil" + description="Default highlight note color."/> + <enumerator name="underline color" code="CUnd" + description="Default underline color."/> + <enumerator name="strike out note color" code="CStr" + description="Default strike out color."/> + <enumerator name="arrow note color" code="CArr" + description="Default arrow color."/> + </enumeration> + <enumeration name="note type" code="NTpE"> <enumerator name="text note" code="NTxt" description="Text note."/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-15 22:34:07
|
Revision: 2315 http://skim-app.svn.sourceforge.net/skim-app/?rev=2315&view=rev Author: hofman Date: 2007-06-15 15:34:05 -0700 (Fri, 15 Jun 2007) Log Message: ----------- Use some 'standard' codes for some apple events. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-15 18:57:55 UTC (rev 2314) +++ trunk/SKPDFAnnotationNote.m 2007-06-15 22:34:05 UTC (rev 2315) @@ -78,7 +78,7 @@ SKASBorderStyleDashed = 'Dash', SKASBorderStyleBeveled = 'Bevl', SKASBorderStyleInset = 'Inst', - SKASBorderStyleUnderline = 'Undr' + SKASBorderStyleUnderline = 'undl' }; NSString *SKAnnotationWillChangeNotification = @"SKAnnotationWillChangeNotification"; Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-15 18:57:55 UTC (rev 2314) +++ trunk/Skim.sdef 2007-06-15 22:34:05 UTC (rev 2315) @@ -553,7 +553,7 @@ description="The index of the page."> <cocoa key="index"/> </property> - <property name="label" code="Labl" type="text" access="r" + <property name="label" code="labB" type="text" access="r" description="The label of the page."> <cocoa key="label"/> </property> @@ -569,7 +569,7 @@ description="The bounding rectangle for the foreground of the page (left, top, right, bottom)."> <cocoa key="contentBoundsAsQDRect"/> </property> - <property name="rotation" code="PRot" type="integer" + <property name="rotation" code="trot" type="integer" description="The rotation of the page. Must be one of 0, 90, 180, or 270."> <cocoa key="rotationAngle"/> </property> @@ -624,7 +624,7 @@ description="The font size in points of a text note."> <cocoa key="fontSize"/> </property> - <property name="icon" code="Icon" type="icon type" + <property name="icon" code="iimg" type="icon type" description="The icon type of an anchored note."> <cocoa key="asIconType"/> </property> @@ -705,7 +705,7 @@ description="The file name."> <cocoa key="FileName"/> </property> - <property name="title" code="Titl" type="text" + <property name="title" code="titl" type="text" description="The title."> <cocoa key="Title"/> </property> @@ -725,15 +725,15 @@ description="The producer."> <cocoa key="Producer"/> </property> - <property name="version" code="Vers" type="text" + <property name="version" code="vers" type="text" description="The version."> <cocoa key="Version"/> </property> - <property name="creation date" code="CDat" type="date" + <property name="creation date" code="ascd" type="date" description="The creation date."> <cocoa key="CreationDate"/> </property> - <property name="modification date" code="MDat" type="date" + <property name="modification date" code="asmo" type="date" description="The modification date."> <cocoa key="ModDate"/> </property> @@ -745,11 +745,11 @@ description="The size of the file."> <cocoa key="FileSize"/> </property> - <property name="physical size" code="PhSz" type="real" + <property name="physical size" code="phys" type="real" description="The physical size of the file."> <cocoa key="PhysicalSize"/> </property> - <property name="logical size" code="LoSz" type="real" + <property name="logical size" code="Logi" type="real" description="The logical size of the file."> <cocoa key="LogicalSize"/> </property> @@ -820,7 +820,7 @@ description="Beveled border."/> <enumerator name="inset" code="Inst" description="Inset border."/> - <enumerator name="underline" code="Undr" + <enumerator name="underline" code="undl" description="Underline border."/> </enumeration> @@ -869,7 +869,7 @@ description="The text to search for."> <cocoa key="Text"/> </parameter> - <parameter name="from" code="From" optional="yes" + <parameter name="from" code="from" optional="yes" description="The selection to search from."> <type type="specifier" list="yes"/> <cocoa key="From"/> @@ -878,7 +878,7 @@ description="Search backward?"> <cocoa key="Backward"/> </parameter> - <parameter name="case sensitive" code="Case" type="boolean" optional="yes" + <parameter name="case sensitive" code="casS" type="boolean" optional="yes" description="Is the search case sensitive?"> <cocoa key="CaseSensitive"/> </parameter> @@ -900,7 +900,7 @@ <cocoa key="To"/> <type type="specifier" list="yes"/> </parameter> - <parameter name="continuous" type="boolean" code="Cont" optional="yes" + <parameter name="continuous" type="boolean" code="conI" optional="yes" description="Join to a continuous selection?"> <cocoa key="Continuous"/> </parameter> @@ -925,7 +925,7 @@ description="The page on which to get the bounds."> <cocoa key="Page"/> </parameter> - <parameter name="for" type="PDF display box" code="fBox" optional="yes" + <parameter name="for" type="PDF display box" code="for " optional="yes" description="The display box for which to take the bounds."> <cocoa key="Box"/> </parameter> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-15 18:57:57
|
Revision: 2314 http://skim-app.svn.sourceforge.net/skim-app/?rev=2314&view=rev Author: hofman Date: 2007-06-15 11:57:55 -0700 (Fri, 15 Jun 2007) Log Message: ----------- Save file type and creator code. Modified Paths: -------------- trunk/SKDocument.m trunk/SKNotesDocument.m Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-06-15 16:43:45 UTC (rev 2313) +++ trunk/SKDocument.m 2007-06-15 18:57:55 UTC (rev 2314) @@ -271,6 +271,23 @@ } else return NO; } +- (NSDictionary *)fileAttributesToWriteToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)outError { + NSMutableDictionary *dict = [[[super fileAttributesToWriteToURL:absoluteURL ofType:typeName forSaveOperation:saveOperation originalContentsURL:absoluteOriginalContentsURL error:outError] mutableCopy] autorelease]; + + // only set the creator code for our native types + if ([typeName isEqualToString:SKPDFDocumentType] || [typeName isEqualToString:SKEmbeddedPDFDocumentType] || [typeName isEqualToString:SKBarePDFDocumentType] || [typeName isEqualToString:SKNotesDocumentType]) + [dict setObject:[NSNumber numberWithUnsignedLong:'SKIM'] forKey:NSFileHFSCreatorCode]; + + if ([[[absoluteURL path] pathExtension] isEqualToString:@"pdf"] || ([typeName isEqualToString:SKPDFDocumentType] || [typeName isEqualToString:SKEmbeddedPDFDocumentType] || [typeName isEqualToString:SKBarePDFDocumentType])) + [dict setObject:[NSNumber numberWithUnsignedLong:'PDF '] forKey:NSFileHFSTypeCode]; + else if ([[[absoluteURL path] pathExtension] isEqualToString:@"rtf"] || [typeName isEqualToString:SKNotesRTFDocumentType]) + [dict setObject:[NSNumber numberWithUnsignedLong:'RTF '] forKey:NSFileHFSTypeCode]; + else if ([[[absoluteURL path] pathExtension] isEqualToString:@"txt"] || [typeName isEqualToString:SKNotesTextDocumentType]) + [dict setObject:[NSNumber numberWithUnsignedLong:'TEXT'] forKey:NSFileHFSTypeCode]; + + return dict; +} + - (void)setPDFData:(NSData *)data { if (pdfData != data) { [pdfData release]; Modified: trunk/SKNotesDocument.m =================================================================== --- trunk/SKNotesDocument.m 2007-06-15 16:43:45 UTC (rev 2313) +++ trunk/SKNotesDocument.m 2007-06-15 18:57:55 UTC (rev 2314) @@ -121,6 +121,21 @@ return didRead; } +- (NSDictionary *)fileAttributesToWriteToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)outError { + NSMutableDictionary *dict = [[[super fileAttributesToWriteToURL:absoluteURL ofType:typeName forSaveOperation:saveOperation originalContentsURL:absoluteOriginalContentsURL error:outError] mutableCopy] autorelease]; + + // only set the creator code for our native types + if ([typeName isEqualToString:SKNotesDocumentType]) + [dict setObject:[NSNumber numberWithUnsignedLong:'SKIM'] forKey:NSFileHFSCreatorCode]; + + if ([[[absoluteURL path] pathExtension] isEqualToString:@"rtf"] || [typeName isEqualToString:SKNotesRTFDocumentType]) + [dict setObject:[NSNumber numberWithUnsignedLong:'RTF '] forKey:NSFileHFSTypeCode]; + else if ([[[absoluteURL path] pathExtension] isEqualToString:@"txt"] || [typeName isEqualToString:SKNotesTextDocumentType]) + [dict setObject:[NSNumber numberWithUnsignedLong:'TEXT'] forKey:NSFileHFSTypeCode]; + + return dict; +} + - (NSString *)notesString { NSString *templatePath = [[NSApp delegate] pathForApplicationSupportFile:@"notesTemplate" ofType:@"txt"]; NSString *templateString = [[NSString alloc] initWithContentsOfFile:templatePath encoding:NSUTF8StringEncoding error:NULL]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-15 16:43:46
|
Revision: 2313 http://skim-app.svn.sourceforge.net/skim-app/?rev=2313&view=rev Author: hofman Date: 2007-06-15 09:43:45 -0700 (Fri, 15 Jun 2007) Log Message: ----------- Add applescript support for RGBA color components of notes. Modified Paths: -------------- trunk/SKPDFAnnotationNote.h trunk/SKPDFAnnotationNote.m trunk/Skim.sdef Modified: trunk/SKPDFAnnotationNote.h =================================================================== --- trunk/SKPDFAnnotationNote.h 2007-06-15 13:03:47 UTC (rev 2312) +++ trunk/SKPDFAnnotationNote.h 2007-06-15 16:43:45 UTC (rev 2313) @@ -75,6 +75,8 @@ - (NSScriptObjectSpecifier *)objectSpecifier; - (int)asNoteType; +- (NSArray *)rgbaColor; +- (void)setRgbaColor:(NSArray *)components; - (int)asIconType; - (id)textContents; - (void)setTextContents:(id)text; Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-15 13:03:47 UTC (rev 2312) +++ trunk/SKPDFAnnotationNote.m 2007-06-15 16:43:45 UTC (rev 2313) @@ -407,6 +407,20 @@ return 0; } +- (NSArray *)rgbaColor { + float red, green, blue, alpha; + [[self color] getRed:&red green:&green blue:&blue alpha:&alpha]; + return [NSArray arrayWithObjects:[NSNumber numberWithFloat:round(65535 * red)], [NSNumber numberWithFloat:round(65535 * green)], [NSNumber numberWithFloat:round(65535 * blue)], [NSNumber numberWithFloat:round(65535 * alpha)], nil]; +} + +- (void)setRgbaColor:(NSArray *)components { + float red = [[components objectAtIndex:0] floatValue] / 65535.0f; + float green = [[components objectAtIndex:1] floatValue] / 65535.0f; + float blue = [[components objectAtIndex:2] floatValue] / 65535.0f; + float alpha = [[components objectAtIndex:3] floatValue] / 65535.0f; + [self setColor:[NSColor colorWithCalibratedRed:red green:green blue:blue alpha:alpha]]; +} + - (int)asIconType { return kPDFTextAnnotationIconNote; } Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-15 13:03:47 UTC (rev 2312) +++ trunk/Skim.sdef 2007-06-15 16:43:45 UTC (rev 2313) @@ -596,9 +596,14 @@ <cocoa key="textContents"/> </contents> <property name="color" code="colr" type="color" - description="The color of the note."> + description="The color of the note (red, green, blue)."> <cocoa key="color"/> </property> + <property name="RGBA color" code="RGBA" + description="The color of the note (red, green, blue, alpha)."> + <cocoa key="rgbaColor"/> + <type type="integer" list="yes"/> + </property> <property name="page" code="Page" type="page" access="r" description="The page for the note."> <cocoa key="page"/> @@ -637,11 +642,11 @@ <type type="real" list="yes"/> </property> <property name="start point" code="SPnt" type="point" - description="The start point of an arrow."> + description="The start point of an arrow (left, top)."> <cocoa key="startPointAsQDPoint"/> </property> <property name="end point" code="EPnt" type="point" - description="The end point of an arrow."> + description="The end point of an arrow (left, top)."> <cocoa key="endPointAsQDPoint"/> </property> <property name="start line style" code="SLSt" type="line ending style" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-15 13:03:48
|
Revision: 2312 http://skim-app.svn.sourceforge.net/skim-app/?rev=2312&view=rev Author: hofman Date: 2007-06-15 06:03:47 -0700 (Fri, 15 Jun 2007) Log Message: ----------- Implement NSCopying for notes to support 'duplicate' script command. Modified Paths: -------------- trunk/SKPDFAnnotationNote.m Modified: trunk/SKPDFAnnotationNote.m =================================================================== --- trunk/SKPDFAnnotationNote.m 2007-06-15 12:48:28 UTC (rev 2311) +++ trunk/SKPDFAnnotationNote.m 2007-06-15 13:03:47 UTC (rev 2312) @@ -315,6 +315,7 @@ #pragma mark Scripting support +// to support the 'make' command - (id)init { [[self initWithBounds:NSZeroRect] release]; self = nil; @@ -378,6 +379,14 @@ } } +// to support the 'duplicate' command +- (id)copyWithZone:(NSZone *)zone { + if ([self isMovable]) // we don't want to duplicate markup + return [[PDFAnnotation allocWithZone:zone] initWithDictionary:[self dictionaryValue]]; + else + return nil; +} + - (int)asNoteType { if ([[self type] isEqualToString:@"FreeText"]) return SKASTextNote; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-15 12:48:29
|
Revision: 2311 http://skim-app.svn.sourceforge.net/skim-app/?rev=2311&view=rev Author: hofman Date: 2007-06-15 05:48:28 -0700 (Fri, 15 Jun 2007) Log Message: ----------- Hide print command from sdef as we don't support this at present. Modified Paths: -------------- trunk/Skim.sdef Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-14 23:13:09 UTC (rev 2310) +++ trunk/Skim.sdef 2007-06-15 12:48:28 UTC (rev 2311) @@ -29,7 +29,7 @@ <responds-to name="open"> <cocoa method="handleOpenScriptCommand:"/> </responds-to> - <responds-to name="print"> + <responds-to name="print" hidden="yes"> <cocoa method="handlePrintScriptCommand:"/> </responds-to> <responds-to name="quit"> @@ -92,7 +92,7 @@ <responds-to name="close"> <cocoa method="handleCloseScriptCommand:"/> </responds-to> - <responds-to name="print"> + <responds-to name="print" hidden="yes"> <cocoa method="handlePrintScriptCommand:"/> </responds-to> <responds-to name="save"> @@ -170,7 +170,7 @@ <responds-to name="close"> <cocoa method="handleCloseScriptCommand:"/> </responds-to> - <responds-to name="print"> + <responds-to name="print" hidden="yes"> <cocoa method="handlePrintScriptCommand:"/> </responds-to> <responds-to name="save"> @@ -245,7 +245,7 @@ description="print a detailed report of PostScript errors"/> </enumeration> - <record-type name="print settings" code="pset"> + <record-type name="print settings" hidden="yes" code="pset"> <property name="copies" code="lwcp" type="integer" description="the number of copies of a document to be printed"> <cocoa key="NSCopies"/> @@ -284,18 +284,18 @@ </property> </record-type> - <command name="print" code="aevtpdoc" + <command name="print" code="aevtpdoc" hidden="yes" description="Print a document."> - <direct-parameter + <direct-parameter hidden="yes" description="The file(s), document(s), or window(s) to be printed."> <type type="file" list="yes"/> <type type="specifier"/> </direct-parameter> - <parameter name="with properties" code="prdt" type="print settings" optional="yes" + <parameter name="with properties" code="prdt" type="print settings" optional="yes" hidden="yes" description="The print settings to use."> <cocoa key="PrintSettings"/> </parameter> - <parameter name="print dialog" code="pdlg" type="boolean" optional="yes" + <parameter name="print dialog" code="pdlg" type="boolean" optional="yes" hidden="yes" description="Should the application show the print dialog?"> <cocoa key="ShowPrintDialog"/> </parameter> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-14 23:13:23
|
Revision: 2310 http://skim-app.svn.sourceforge.net/skim-app/?rev=2310&view=rev Author: hofman Date: 2007-06-14 16:13:09 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Remove type definition suite hack. It turns out record-types are displayed by Script Editor, just not inn the outline (this is a known bug). Also use consistent code for color (that's another Apple bug). Modified Paths: -------------- trunk/Skim.sdef Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-14 21:36:02 UTC (rev 2309) +++ trunk/Skim.sdef 2007-06-14 23:13:09 UTC (rev 2310) @@ -400,7 +400,7 @@ <cocoa name="NSTextSuite"/> - <value-type name="color" code="cRGB"> + <value-type name="color" code="colr"> <cocoa class="NSColor"/> </value-type> @@ -966,146 +966,4 @@ </suite> - - <suite name="Type Definitions" code="TDef" - description="Records used in scripting Skim."> - <!-- These classes are not actually used, - they are just there for display purposes in Script Editor, - as this does not display record-type elements. - We use the same properties, but slightly different - name and code for the classes to avoid confusion. --> - - <cocoa name="TypeDefinitionsSuite"/> - - <class name="print settings " code="PSET"> - <cocoa class="NSDictionary"/> - <property name="copies" code="lwcp" type="integer" - description="the number of copies of a document to be printed"> - <cocoa key="NSCopies"/> - </property> - <property name="collating" code="lwcl" type="boolean" - description="Should printed copies be collated?"> - <cocoa key="NSMustCollate"/> - </property> - <property name="starting page" code="lwfp" type="integer" - description="the first page of the document to be printed"> - <cocoa key="NSFirstPage"/> - </property> - <property name="ending page" code="lwlp" type="integer" - description="the last page of the document to be printed"> - <cocoa key="NSLastPage"/> - </property> - <property name="pages across" code="lwla" type="integer" - description="number of logical pages laid across a physical page"> - <cocoa key="NSPagesAcross"/> - </property> - <property name="pages down" code="lwld" type="integer" - description="number of logical pages laid out down a physical page"> - <cocoa key="NSPagesDown"/> - </property> - <property name="error handling" code="lweh" type="printing error handling" - description="how errors are handled"> - <cocoa key="NSDetailedErrorReporting"/> - </property> - <property name="fax number" code="faxn" type="text" - description="for fax number"> - <cocoa key="NSFaxNumber"/> - </property> - <property name="target printer" code="trpr" type="text" - description="for target printer"> - <cocoa key="NSPrinterName"/> - </property> - </class> - - <class name="PDF view settings " code="VSET"> - <cocoa class="NSDictionary"/> - <property name="scale factor" code="SclF" type="real" - description="The scale factor of the PDF."> - <cocoa key="scaleFactor"/> - </property> - <property name="auto scales" code="AScl" type="boolean" - description="Does the PDF zoom automatically?"> - <cocoa key="autoScales"/> - </property> - <property name="displays page breaks" code="PgBr" type="boolean" - description="Does the PDF display page breaks?"> - <cocoa key="displaysPageBreaks"/> - </property> - <property name="displays as book" code="Book" type="boolean" - description="Is the first page in two-up displayed as in book mode?"> - <cocoa key="displaysAsBook"/> - </property> - <property name="display mode" code="DMod" type="PDF display mode" - description="The display mode for the PDF."> - <cocoa key="displayMode"/> - </property> - <property name="display box" code="DBox" type="PDF display box" - description="The display box for the PDF."> - <cocoa key="displayBox"/> - </property> - </class> - - <class name="document attributes " code="DATR"> - <cocoa class="NSDictionary"/> - <property name="file name" code="atfn" type="text" - description="The file name."> - <cocoa key="FileName"/> - </property> - <property name="title" code="Titl" type="text" - description="The title."> - <cocoa key="Title"/> - </property> - <property name="author" code="Auth" type="text" - description="The autohor."> - <cocoa key="Author"/> - </property> - <property name="subject" code="Subj" type="text" - description="The subject."> - <cocoa key="Subject"/> - </property> - <property name="creator" code="Crea" type="text" - description="The creator."> - <cocoa key="Creator"/> - </property> - <property name="producer" code="Prod" type="text" - description="The producer."> - <cocoa key="Producer"/> - </property> - <property name="version" code="Vers" type="text" - description="The version."> - <cocoa key="Version"/> - </property> - <property name="creation date" code="CDat" type="date" - description="The creation date."> - <cocoa key="CreationDate"/> - </property> - <property name="modification date" code="MDat" type="date" - description="The modification date."> - <cocoa key="ModDate"/> - </property> - <property name="page count" code="PCnt" type="integer" - description="The number of pages."> - <cocoa key="PageCount"/> - </property> - <property name="file size" code="FlSz" type="text" - description="The size of the file."> - <cocoa key="FileSize"/> - </property> - <property name="physical size" code="PhSz" type="real" - description="The physical size of the file."> - <cocoa key="PhysicalSize"/> - </property> - <property name="logical size" code="LoSz" type="real" - description="The logical size of the file."> - <cocoa key="LogicalSize"/> - </property> - <property name="keywords" code="Keyw" - description="The keywords."> - <cocoa key="Keywords"/> - <type type="text" list="yes"/> - </property> - </class> - - </suite> - </dictionary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-14 21:36:07
|
Revision: 2309 http://skim-app.svn.sourceforge.net/skim-app/?rev=2309&view=rev Author: hofman Date: 2007-06-14 14:36:02 -0700 (Thu, 14 Jun 2007) Log Message: ----------- initialize variables to shut up compiler Modified Paths: -------------- trunk/SKInfoWindowController.m Modified: trunk/SKInfoWindowController.m =================================================================== --- trunk/SKInfoWindowController.m 2007-06-14 19:41:31 UTC (rev 2308) +++ trunk/SKInfoWindowController.m 2007-06-14 21:36:02 UTC (rev 2309) @@ -148,7 +148,7 @@ NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; [dictionary setDictionary:[pdfDoc documentAttributes]]; if (doc) { - unsigned long long logicalSize, physicalSize; + unsigned long long logicalSize = 0, physicalSize = 0; [dictionary setValue:[[doc fileName] lastPathComponent] forKey:@"FileName"]; [dictionary setValue:[NSString stringWithFormat: @"%d.%d", [pdfDoc majorVersion], [pdfDoc minorVersion]] forKey:@"Version"]; [dictionary setValue:[NSNumber numberWithInt:[pdfDoc pageCount]] forKey:@"PageCount"]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-06-14 19:41:33
|
Revision: 2308 http://skim-app.svn.sourceforge.net/skim-app/?rev=2308&view=rev Author: hofman Date: 2007-06-14 12:41:31 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Update release notes. Modified Paths: -------------- trunk/ReleaseNotes.rtf Modified: trunk/ReleaseNotes.rtf =================================================================== --- trunk/ReleaseNotes.rtf 2007-06-14 19:31:22 UTC (rev 2307) +++ trunk/ReleaseNotes.rtf 2007-06-14 19:41:31 UTC (rev 2308) @@ -94,8 +94,8 @@ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f1\fs22 \cf0 \ -Last update: 5 June 2007 (rev -\f2\fs20 2234) +Last update: 14 June 2007 (rev +\f2\fs20 2307) \f1\fs22 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural @@ -118,6 +118,12 @@ {\listtext \'a5 }Allow dragging of the reading bar from the region outside a page in any tool mode.\ {\listtext \'a5 }Greatly enhance file update checking. Use kqueue notifications instead of a timer and check for complete PDF files.\ {\listtext \'a5 }Smart auto-cropping of all pages separately, but keeping the same size, for unevenly scanned papers. Accessible through Control-Command-K.\ +{\listtext \'a5 }Improvements to magnify tool.\ +{\listtext \'a5 }Hidden defaults for magnification tool sizes.\ +{\listtext \'a5 }New hidden default for the maximum document page history length (SKMaximumDocumentPageHistoryCount).\ +{\listtext \'a5 }Extensions to AppleScript support. Support for selections, additional note properties; new revert, find, and join commands; allow creation of markups; many new properties for documents, pages, and notes.\ +{\listtext \'a5 }You can now change the icon type of anchored notes from the note's window to some standard proofreader marks.\ +{\listtext \'a5 }Hidden default for icon type of anchored notes (SKAnchoredNoteiconType).\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f3\b\fs28 \cf0 \ @@ -129,6 +135,11 @@ \f1\i0\b0\fs22 \cf0 {\listtext \'a5 }Use old-style check for network availability for the updater, as the newer API is not reliable for dial-up connections.\ {\listtext \'a5 }Never add a new note on a click in note tool mode, because undoing such an addition can also remove a text edit in progress.\ {\listtext \'a5 }Update the window title when the document is reloaded; the number of pages can change. \ +{\listtext \'a5 }Avoid possible crash due to tool-tip when reloading a document.\ +{\listtext \'a5 }Fix Apple bug for AppleScript support for saving with arbitrary file types.\ +{\listtext \'a5 }Fix AppleScript support for note color property.\ +{\listtext \'a5 }Add help about cropping pages.\ +{\listtext \'a5 }Start and end points for arrow notes in AppleScript are now relative to the page, and changing them automatically changes the bounds.\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f3\b\fs28 \cf0 \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |