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-05-19 09:42:52
|
Revision: 2083 http://skim-app.svn.sourceforge.net/skim-app/?rev=2083&view=rev Author: hofman Date: 2007-05-19 02:42:47 -0700 (Sat, 19 May 2007) Log Message: ----------- Use PDFKit methods to copy PDF from selection. This also copies embedded annotations. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-19 05:42:47 UTC (rev 2082) +++ trunk/SKPDFView.m 2007-05-19 09:42:47 UTC (rev 2083) @@ -510,50 +510,17 @@ [self cacheDisplayInRect:sourceRect toBitmapImageRep:imageRep]; data = [imageRep TIFFRepresentation]; */ + + PDFDocument *pdfDoc = [[PDFDocument alloc] initWithData:[activePage dataRepresentation]]; + PDFPage *page = [pdfDoc pageAtIndex:0]; + [page setBounds:[activePage boundsForBox:kPDFDisplayBoxMediaBox] forBox:kPDFDisplayBoxMediaBox]; + [page setBounds:selectionRect forBox:kPDFDisplayBoxCropBox]; NSPasteboard *pboard = [NSPasteboard generalPasteboard]; - [pboard declareTypes:[NSArray arrayWithObject:NSTIFFPboardType] owner:nil]; + [pboard declareTypes:[NSArray arrayWithObjects:NSPDFPboardType, NSTIFFPboardType, nil] owner:nil]; + [pboard setData:[page dataRepresentation] forType:NSPDFPboardType]; [pboard setData:data forType:NSTIFFPboardType]; - - // Unfortunately, dataWithPDFInsideRect: doesn't work correctly when the selection is scrolled out of view. Likewise, creating a PDF context, making it current, and drawing with -[PDFPage drawWithBox:] or -[PDFView drawPage:] does not work (the PDF produced is invalid), so we're taking the long way round. This does mean that annotations won't be copied unless they're part of the page itself, but that's likely to be less of a problem than copying blank pages. - - // if Apple would make -[PDFPage pageRef] public, the next few lines wouldn't be necessary... - CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)[activePage dataRepresentation]); - CGPDFDocumentRef docRef = CGPDFDocumentCreateWithProvider(provider); - CGPDFPageRef pageRef = CGPDFDocumentGetPage(docRef, 1); - if (pageRef) { - - CFAllocatorRef alloc = CFAllocatorGetDefault(); - CFMutableDataRef pdfData = CFDataCreateMutable(alloc, 0); - CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData(pdfData); - - bounds = [activePage boundsForBox:kPDFDisplayBoxMediaBox]; - const CGRect mediaBox = *(CGRect *)&bounds; - - // set the crop box to our selection rect - const CGRect cropBox = *(CGRect *)&selectionRect; - CFDataRef cropBoxData = CFDataCreate(alloc, (const UInt8 *)&cropBox, sizeof(cropBox)); - CFMutableDictionaryRef options = CFDictionaryCreateMutable(alloc, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionaryAddValue(options, kCGPDFContextCropBox, cropBoxData); - - // create a PDF graphics context with this media/crop box combination - CGContextRef pdfContext = CGPDFContextCreate(consumer, &mediaBox, options); - CFRelease(options); - - CGPDFContextBeginPage(pdfContext, NULL); - CGContextDrawPDFPage(pdfContext, pageRef); - CGPDFContextEndPage(pdfContext); - CGContextFlush(pdfContext); - - CGContextRelease(pdfContext); - CGDataConsumerRelease(consumer); - - [pboard addTypes:[NSArray arrayWithObject:NSPDFPboardType] owner:nil]; - [pboard setData:(id)pdfData forType:NSPDFPboardType]; - CFRelease(pdfData); - } - CGPDFDocumentRelease(docRef); - CGDataProviderRelease(provider); + [pdfDoc release]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ama...@us...> - 2007-05-19 05:42:49
|
Revision: 2082 http://skim-app.svn.sourceforge.net/skim-app/?rev=2082&view=rev Author: amaxwell Date: 2007-05-18 22:42:47 -0700 (Fri, 18 May 2007) Log Message: ----------- Display thumbnails according to the PDFView's display box, instead of always using the crop box. Remove thumbnails when resetting; fixes exception when it's called after thumbnails exist. Change KVO notification to be the same before/after the change. Modified Paths: -------------- trunk/PDFPage_SKExtensions.h trunk/PDFPage_SKExtensions.m trunk/SKMainWindowController.m Modified: trunk/PDFPage_SKExtensions.h =================================================================== --- trunk/PDFPage_SKExtensions.h 2007-05-19 04:51:12 UTC (rev 2081) +++ trunk/PDFPage_SKExtensions.h 2007-05-19 05:42:47 UTC (rev 2082) @@ -45,8 +45,8 @@ - (NSImage *)image; - (NSImage *)imageForBox:(PDFDisplayBox)box; -- (NSImage *)thumbnailWithSize:(float)size; -- (NSImage *)thumbnailWithSize:(float)size shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset; +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box; +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset; - (NSArray *)lineBounds; Modified: trunk/PDFPage_SKExtensions.m =================================================================== --- trunk/PDFPage_SKExtensions.m 2007-05-19 04:51:12 UTC (rev 2081) +++ trunk/PDFPage_SKExtensions.m 2007-05-19 05:42:47 UTC (rev 2082) @@ -82,14 +82,14 @@ return [image autorelease]; } -- (NSImage *)thumbnailWithSize:(float)size { +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box { float shadowBlurRadius = roundf(size / 32.0); float shadowOffset = - ceilf(shadowBlurRadius * 0.75); - return [self thumbnailWithSize:size shadowBlurRadius:shadowBlurRadius shadowOffset:NSMakeSize(0.0, shadowOffset)]; + return [self thumbnailWithSize:size forBox:box shadowBlurRadius:shadowBlurRadius shadowOffset:NSMakeSize(0.0, shadowOffset)]; } -- (NSImage *)thumbnailWithSize:(float)size shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset { - NSRect bounds = [self boundsForBox:kPDFDisplayBoxCropBox]; +- (NSImage *)thumbnailWithSize:(float)size forBox:(PDFDisplayBox)box shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset { + NSRect bounds = [self boundsForBox:box]; BOOL isScaled = size > 0.0; BOOL hasShadow = shadowBlurRadius > 0.0; float scaleX, scaleY; @@ -135,7 +135,7 @@ bounds.origin = NSZeroPoint; NSRectFill(bounds); [NSGraphicsContext restoreGraphicsState]; - [self drawWithBox:kPDFDisplayBoxCropBox]; + [self drawWithBox:box]; [NSGraphicsContext restoreGraphicsState]; [image unlockFocus]; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-19 04:51:12 UTC (rev 2081) +++ trunk/SKMainWindowController.m 2007-05-19 05:42:47 UTC (rev 2082) @@ -677,7 +677,7 @@ NSSize newSize, oldSize = [[thumbnail image] size]; PDFDocument *pdfDoc = [pdfView document]; PDFPage *page = [pdfDoc pageAtIndex:theIndex]; - NSImage *image = [page thumbnailWithSize:thumbnailCacheSize]; + NSImage *image = [page thumbnailWithSize:thumbnailCacheSize forBox:[pdfView displayBox]]; // setImage: sends a KVO notification that results in calling objectInThumbnailsAtIndex: endlessly, so set dirty to NO first @@ -824,6 +824,7 @@ displayBox = [sender indexOfSelectedItem] == 0 ? kPDFDisplayBoxMediaBox : kPDFDisplayBoxCropBox; [pdfView setDisplayBox:displayBox]; [displayBoxPopUpButton selectItemWithTag:displayBox]; + [self resetThumbnails]; } - (IBAction)doGoToNextPage:(id)sender { @@ -2490,14 +2491,13 @@ PDFDocument *pdfDoc = [pdfView document]; unsigned i, count = [pdfDoc pageCount]; - [self willChange:NSKeyValueChangeRemoval valuesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [thumbnails count])] forKey:@"thumbnails"]; + [self willChange:NSKeyValueChangeReplacement valuesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, count)] forKey:@"thumbnails"]; + [thumbnails removeAllObjects]; if (count) { PDFPage *emptyPage = [[[PDFPage alloc] init] autorelease]; - NSRect bounds = [[[pdfView document] pageAtIndex:0] boundsForBox:kPDFDisplayBoxCropBox]; - [emptyPage setBounds:bounds forBox:kPDFDisplayBoxCropBox]; - // thumbnail code only uses the crop box, but media box is required for PDF - [emptyPage setBounds:bounds forBox:kPDFDisplayBoxMediaBox]; - NSImage *image = [emptyPage thumbnailWithSize:thumbnailCacheSize]; + [emptyPage setBounds:[[[pdfView document] pageAtIndex:0] boundsForBox:kPDFDisplayBoxCropBox] forBox:kPDFDisplayBoxCropBox]; + [emptyPage setBounds:[[[pdfView document] pageAtIndex:0] boundsForBox:kPDFDisplayBoxMediaBox] forBox:kPDFDisplayBoxMediaBox]; + NSImage *image = [emptyPage thumbnailWithSize:thumbnailCacheSize forBox:[pdfView displayBox]]; [image lockFocus]; NSRect imgRect = NSZeroRect; imgRect.size = [image size]; @@ -2513,7 +2513,7 @@ [thumbnail release]; } } - [self didChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, count)] forKey:@"thumbnails"]; + [self didChange:NSKeyValueChangeReplacement valuesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, count)] forKey:@"thumbnails"]; [self allThumbnailsNeedUpdate]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ama...@us...> - 2007-05-19 04:51:30
|
Revision: 2081 http://skim-app.svn.sourceforge.net/skim-app/?rev=2081&view=rev Author: amaxwell Date: 2007-05-18 21:51:12 -0700 (Fri, 18 May 2007) Log Message: ----------- Copying PDF didn't work when the selection was scrolled out of sight. Tried various workarounds, but it looks like using Quartz directly is the only way around this. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 20:32:23 UTC (rev 2080) +++ trunk/SKPDFView.m 2007-05-19 04:51:12 UTC (rev 2081) @@ -512,17 +512,48 @@ */ NSPasteboard *pboard = [NSPasteboard generalPasteboard]; - [pboard declareTypes:[NSArray arrayWithObjects:NSTIFFPboardType, NSPDFPboardType, nil] owner:nil]; + [pboard declareTypes:[NSArray arrayWithObject:NSTIFFPboardType] owner:nil]; [pboard setData:data forType:NSTIFFPboardType]; - // temporarily reset reading bar and active page to avoid drawing selection handles when copying - SKReadingBar *previousReadingBar = readingBar; - readingBar = nil; - PDFPage *previousActivePage = activePage; - activePage = nil; - [[self documentView] writePDFInsideRect:[self convertRect:[self convertRect:selectionRect fromPage:previousActivePage] toView:[self documentView]] toPasteboard:pboard]; - activePage = previousActivePage; - readingBar = previousReadingBar; + // Unfortunately, dataWithPDFInsideRect: doesn't work correctly when the selection is scrolled out of view. Likewise, creating a PDF context, making it current, and drawing with -[PDFPage drawWithBox:] or -[PDFView drawPage:] does not work (the PDF produced is invalid), so we're taking the long way round. This does mean that annotations won't be copied unless they're part of the page itself, but that's likely to be less of a problem than copying blank pages. + + // if Apple would make -[PDFPage pageRef] public, the next few lines wouldn't be necessary... + CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)[activePage dataRepresentation]); + CGPDFDocumentRef docRef = CGPDFDocumentCreateWithProvider(provider); + CGPDFPageRef pageRef = CGPDFDocumentGetPage(docRef, 1); + if (pageRef) { + + CFAllocatorRef alloc = CFAllocatorGetDefault(); + CFMutableDataRef pdfData = CFDataCreateMutable(alloc, 0); + CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData(pdfData); + + bounds = [activePage boundsForBox:kPDFDisplayBoxMediaBox]; + const CGRect mediaBox = *(CGRect *)&bounds; + + // set the crop box to our selection rect + const CGRect cropBox = *(CGRect *)&selectionRect; + CFDataRef cropBoxData = CFDataCreate(alloc, (const UInt8 *)&cropBox, sizeof(cropBox)); + CFMutableDictionaryRef options = CFDictionaryCreateMutable(alloc, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFDictionaryAddValue(options, kCGPDFContextCropBox, cropBoxData); + + // create a PDF graphics context with this media/crop box combination + CGContextRef pdfContext = CGPDFContextCreate(consumer, &mediaBox, options); + CFRelease(options); + + CGPDFContextBeginPage(pdfContext, NULL); + CGContextDrawPDFPage(pdfContext, pageRef); + CGPDFContextEndPage(pdfContext); + CGContextFlush(pdfContext); + + CGContextRelease(pdfContext); + CGDataConsumerRelease(consumer); + + [pboard addTypes:[NSArray arrayWithObject:NSPDFPboardType] owner:nil]; + [pboard setData:(id)pdfData forType:NSPDFPboardType]; + CFRelease(pdfData); + } + CGPDFDocumentRelease(docRef); + CGDataProviderRelease(provider); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 20:32:25
|
Revision: 2080 http://skim-app.svn.sourceforge.net/skim-app/?rev=2080&view=rev Author: hofman Date: 2007-05-18 13:32:23 -0700 (Fri, 18 May 2007) Log Message: ----------- Redisplay in selection after a delay. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 19:22:46 UTC (rev 2079) +++ trunk/SKPDFView.m 2007-05-18 20:32:23 UTC (rev 2080) @@ -2534,14 +2534,18 @@ NSPoint initialPoint = [self convertPoint:mouseLoc toPage:page]; float margin = 4.0 / [self scaleFactor]; int xEdge = 0, yEdge = 0; + BOOL needsDisplay = NO; if ([page isEqual:activePage] == NO || NSPointInRect(initialPoint, NSInsetRect(selectionRect, -margin, -margin)) == NO) { + if (activePage) + [self setNeedsDisplay:YES]; + else + needsDisplay = YES; activePage = page; selectionRect.origin = initialPoint; selectionRect.size = NSZeroSize; xEdge = 1; yEdge = 1; - [self setNeedsDisplay:YES]; } else { if (initialPoint.x > NSMaxX(selectionRect) - margin) xEdge = 1; @@ -2613,10 +2617,15 @@ if (NSMinX(newRect) < NSMinX(pageBounds) || NSMaxX(newRect) > NSMaxX(pageBounds) || NSMinY(newRect) < NSMinY(pageBounds) || NSMaxY(newRect) > NSMaxY(pageBounds)) newRect = NSIntersectionRect(newRect, pageBounds); - if (NSEqualRects(selectionRect, NSZeroRect) == NO) - [self setNeedsDisplayInRect:NSInsetRect(selectionRect, -margin, -margin) ofPage:activePage]; - if (NSEqualRects(newRect, NSZeroRect) == NO) - [self setNeedsDisplayInRect:NSInsetRect(newRect, -margin, -margin) ofPage:activePage]; + if (needsDisplay) { + [self setNeedsDisplay:YES]; + needsDisplay = NO; + } else { + if (NSEqualRects(selectionRect, NSZeroRect) == NO) + [self setNeedsDisplayInRect:NSInsetRect(selectionRect, -margin, -margin) ofPage:activePage]; + if (NSEqualRects(newRect, NSZeroRect) == NO) + [self setNeedsDisplayInRect:NSInsetRect(newRect, -margin, -margin) ofPage:activePage]; + } selectionRect = newRect; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 19:22:53
|
Revision: 2079 http://skim-app.svn.sourceforge.net/skim-app/?rev=2079&view=rev Author: hofman Date: 2007-05-18 12:22:46 -0700 (Fri, 18 May 2007) Log Message: ----------- Quote tex editor command. Correct file path to tool for emacs. Modified Paths: -------------- trunk/SKDocument.m Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-05-18 17:32:30 UTC (rev 2078) +++ trunk/SKDocument.m 2007-05-18 19:22:46 UTC (rev 2079) @@ -648,7 +648,7 @@ editorCmd = toolPath; } else { // Emacs has its tool in Emacs.app/Contents/MacOS/bin/ - toolPath = [[[[NSBundle bundleWithPath:appPath] executablePath] stringByAppendingPathComponent:@"bin"] stringByAppendingPathComponent:cmdString]; + toolPath = [[[[[NSBundle bundleWithPath:appPath] executablePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"bin"] stringByAppendingPathComponent:editorCmd]; if ([[NSFileManager defaultManager] isExecutableFileAtPath:toolPath]) editorCmd = toolPath; } @@ -656,9 +656,9 @@ [cmdString replaceOccurrencesOfString:@"%file" withString:file options:NSLiteralSearch range: NSMakeRange(0, [cmdString length] )]; [cmdString replaceOccurrencesOfString:@"%line" withString:[NSString stringWithFormat:@"%d", line] options:NSLiteralSearch range:NSMakeRange(0, [cmdString length])]; - [cmdString insertString:@" " atIndex:0]; + [cmdString insertString:@"\" " atIndex:0]; [cmdString insertString:editorCmd atIndex:0]; - + [cmdString insertString:@"\"" atIndex:0]; NSTask *task = [[[NSTask alloc] init] autorelease]; [task setLaunchPath:@"/bin/sh"]; [task setArguments:[NSArray arrayWithObjects:@"-c", cmdString, nil]]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 17:32:33
|
Revision: 2078 http://skim-app.svn.sourceforge.net/skim-app/?rev=2078&view=rev Author: hofman Date: 2007-05-18 10:32:30 -0700 (Fri, 18 May 2007) Log Message: ----------- Replace switch in event loops by if-else. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 13:05:39 UTC (rev 2077) +++ trunk/SKPDFView.m 2007-05-18 17:32:30 UTC (rev 2078) @@ -2490,39 +2490,29 @@ - (void)dragWithEvent:(NSEvent *)theEvent { NSPoint initialLocation = [theEvent locationInWindow]; NSRect visibleRect = [[self documentView] visibleRect]; - BOOL keepGoing = YES; [[NSCursor closedHandCursor] push]; - while (keepGoing) { + while (YES) { + theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask]; - switch ([theEvent type]) { - case NSLeftMouseDragged: - { - NSPoint newLocation; - NSRect newVisibleRect; - float xDelta, yDelta; - - newLocation = [theEvent locationInWindow]; - xDelta = initialLocation.x - newLocation.x; - yDelta = initialLocation.y - newLocation.y; - if ([self isFlipped]) - yDelta = -yDelta; - - newVisibleRect = NSOffsetRect (visibleRect, xDelta, yDelta); - [[self documentView] scrollRectToVisible: newVisibleRect]; - } - break; - - case NSLeftMouseUp: - keepGoing = NO; - break; - - default: - /* Ignore any other kind of event. */ - break; - } // end of switch (event type) - } // end of mouse-tracking loop + if ([theEvent type] == NSLeftMouseUp) + break; + + // dragging + NSPoint newLocation; + NSRect newVisibleRect; + float xDelta, yDelta; + + newLocation = [theEvent locationInWindow]; + xDelta = initialLocation.x - newLocation.x; + yDelta = initialLocation.y - newLocation.y; + if ([self isFlipped]) + yDelta = -yDelta; + + newVisibleRect = NSOffsetRect (visibleRect, xDelta, yDelta); + [[self documentView] scrollRectToVisible: newVisibleRect]; + } [NSCursor pop]; // ??? PDFView's delayed layout seems to reset the cursor to an arrow @@ -2542,7 +2532,6 @@ } NSPoint initialPoint = [self convertPoint:mouseLoc toPage:page]; - NSPoint delta; float margin = 4.0 / [self scaleFactor]; int xEdge = 0, yEdge = 0; @@ -2564,86 +2553,73 @@ yEdge = 2; } - delta.x = initialPoint.x - NSMinX(selectionRect); - delta.y = initialPoint.y - NSMinY(selectionRect); - NSRect initialRect = selectionRect; NSRect pageBounds = [activePage boundsForBox:[self displayBox]]; - BOOL keepGoing = YES; if (xEdge == 0 && yEdge == 0) [[NSCursor closedHandCursor] push]; else [[NSCursor crosshairCursor] push]; - while (keepGoing) { + while (YES) { + theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask]; - switch ([theEvent type]) { - case NSLeftMouseDragged: - { - NSPoint newPoint; - NSRect newRect = initialRect; - float xDelta, yDelta; - - newPoint = [self convertPoint:[self convertPoint:[theEvent locationInWindow] fromView:nil] toPage:page]; - xDelta = newPoint.x - initialPoint.x; - yDelta = newPoint.y - initialPoint.y; - - if (xEdge == 0 && yEdge == 0) { - newRect.origin.x += xDelta; - newRect.origin.y += yDelta; - } else { - if (xEdge == 1) { - newRect.size.width += xDelta; - if (NSWidth(newRect) < 0.0) { - newRect.size.width *= -1.0; - newRect.origin.x -= NSWidth(newRect); - } - } else if (xEdge == 2) { - newRect.origin.x += xDelta; - newRect.size.width -= xDelta; - if (NSWidth(newRect) < 0.0) { - newRect.size.width *= -1.0; - newRect.origin.x -= NSWidth(newRect); - } - } - - if (yEdge == 1) { - newRect.size.height += yDelta; - if (NSHeight(newRect) < 0.0) { - newRect.size.height *= -1.0; - newRect.origin.y -= NSHeight(newRect); - } - } else if (yEdge == 2) { - newRect.origin.y += yDelta; - newRect.size.height -= yDelta; - if (NSHeight(newRect) < 0.0) { - newRect.size.height *= -1.0; - newRect.origin.y -= NSHeight(newRect); - } - } + if ([theEvent type] == NSLeftMouseUp) + break; + + // we must be dragging + NSPoint newPoint; + NSRect newRect = initialRect; + float xDelta, yDelta; + + newPoint = [self convertPoint:[self convertPoint:[theEvent locationInWindow] fromView:nil] toPage:page]; + xDelta = newPoint.x - initialPoint.x; + yDelta = newPoint.y - initialPoint.y; + + if (xEdge == 0 && yEdge == 0) { + newRect.origin.x += xDelta; + newRect.origin.y += yDelta; + } else { + if (xEdge == 1) { + newRect.size.width += xDelta; + if (NSWidth(newRect) < 0.0) { + newRect.size.width *= -1.0; + newRect.origin.x -= NSWidth(newRect); } - - if (NSMinX(newRect) < NSMinX(pageBounds) || NSMaxX(newRect) > NSMaxX(pageBounds) || NSMinY(newRect) < NSMinY(pageBounds) || NSMaxY(newRect) > NSMaxY(pageBounds)) - newRect = NSIntersectionRect(newRect, pageBounds); - if (NSEqualRects(selectionRect, NSZeroRect) == NO) - [self setNeedsDisplayInRect:NSInsetRect(selectionRect, -margin, -margin) ofPage:activePage]; - if (NSEqualRects(newRect, NSZeroRect) == NO) - [self setNeedsDisplayInRect:NSInsetRect(newRect, -margin, -margin) ofPage:activePage]; - selectionRect = newRect; - - break; - } - - case NSLeftMouseUp: - keepGoing = NO; - break; - - default: - /* Ignore any other kind of event. */ - break; - } // end of switch (event type) - } // end of mouse-tracking loop + } else if (xEdge == 2) { + newRect.origin.x += xDelta; + newRect.size.width -= xDelta; + if (NSWidth(newRect) < 0.0) { + newRect.size.width *= -1.0; + newRect.origin.x -= NSWidth(newRect); + } + } + + if (yEdge == 1) { + newRect.size.height += yDelta; + if (NSHeight(newRect) < 0.0) { + newRect.size.height *= -1.0; + newRect.origin.y -= NSHeight(newRect); + } + } else if (yEdge == 2) { + newRect.origin.y += yDelta; + newRect.size.height -= yDelta; + if (NSHeight(newRect) < 0.0) { + newRect.size.height *= -1.0; + newRect.origin.y -= NSHeight(newRect); + } + } + } + + if (NSMinX(newRect) < NSMinX(pageBounds) || NSMaxX(newRect) > NSMaxX(pageBounds) || NSMinY(newRect) < NSMinY(pageBounds) || NSMaxY(newRect) > NSMaxY(pageBounds)) + newRect = NSIntersectionRect(newRect, pageBounds); + if (NSEqualRects(selectionRect, NSZeroRect) == NO) + [self setNeedsDisplayInRect:NSInsetRect(selectionRect, -margin, -margin) ofPage:activePage]; + if (NSEqualRects(newRect, NSZeroRect) == NO) + [self setNeedsDisplayInRect:NSInsetRect(newRect, -margin, -margin) ofPage:activePage]; + selectionRect = newRect; + + } if (NSIsEmptyRect(selectionRect)) { activePage = nil; @@ -2730,50 +2706,41 @@ } - (void)dragReadingBarWithEvent:(NSEvent *)theEvent { - BOOL keepGoing = YES; PDFPage *page = [readingBar page]; NSArray *lineBounds = [page lineBounds]; [[NSCursor closedHandCursor] push]; - while (keepGoing) { - theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask]; - switch ([theEvent type]) { - case NSLeftMouseDragged: - { - [[self documentView] autoscroll:theEvent]; - NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil]; - PDFPage *currentPage = [self pageForPoint:mouseLoc nearest:YES]; - - mouseLoc = [self convertPoint:mouseLoc toPage:currentPage]; - - if ([currentPage isEqual:page] == NO) { - page = currentPage; - lineBounds = [page lineBounds]; - } - - int i, iMax = [lineBounds count]; - - for (i = 0; i < iMax; i++) { - NSRect rect = [[lineBounds objectAtIndex:i] rectValue]; - if (NSMinY(rect) <= mouseLoc.y && NSMaxY(rect) >= mouseLoc.y) { - [readingBar setPage:page]; - [readingBar setCurrentLine:i]; - [self setNeedsDisplay:YES]; - break; - } - } - break; + while (YES) { + + theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask]; + if ([theEvent type] == NSLeftMouseUpMask) + break; + + // dragging + [[self documentView] autoscroll:theEvent]; + NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil]; + PDFPage *currentPage = [self pageForPoint:mouseLoc nearest:YES]; + + mouseLoc = [self convertPoint:mouseLoc toPage:currentPage]; + + if ([currentPage isEqual:page] == NO) { + page = currentPage; + lineBounds = [page lineBounds]; + } + + int i, iMax = [lineBounds count]; + + for (i = 0; i < iMax; i++) { + NSRect rect = [[lineBounds objectAtIndex:i] rectValue]; + if (NSMinY(rect) <= mouseLoc.y && NSMaxY(rect) >= mouseLoc.y) { + [readingBar setPage:page]; + [readingBar setCurrentLine:i]; + [self setNeedsDisplay:YES]; + break; } - case NSLeftMouseUp: - keepGoing = NO; - break; - - default: - /* Ignore any other kind of event. */ - break; - } // end of switch (event type) - } // end of mouse-tracking loop + } + } [NSCursor pop]; // ??? PDFView's delayed layout seems to reset the cursor to an arrow @@ -2788,69 +2755,63 @@ NSRect bounds; float minX, maxX, minY, maxY; BOOL dragged = NO; - BOOL keepGoing = YES; [[self window] discardCachedImage]; - while (keepGoing) { + while (YES) { theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask | NSFlagsChangedMask]; [[self window] restoreCachedImage]; [[self window] flushWindow]; - switch ([theEvent type]) { - case NSLeftMouseDragged: - [[self documentView] autoscroll:theEvent]; - mouseLoc = [theEvent locationInWindow]; - dragged = YES; - - case NSFlagsChanged: - currentPoint = [[self documentView] convertPoint:mouseLoc fromView:nil]; - - minX = fmin(startPoint.x, currentPoint.x); - maxX = fmax(startPoint.x, currentPoint.x); - minY = fmin(startPoint.y, currentPoint.y); - maxY = fmax(startPoint.y, currentPoint.y); - // center around startPoint when holding down the Shift key - if ([theEvent modifierFlags] & NSShiftKeyMask) { - if (currentPoint.x > startPoint.x) - minX -= maxX - minX; - else - maxX += maxX - minX; - if (currentPoint.y > startPoint.y) - minY -= maxY - minY; - else - maxY += maxY - minY; - } - // intersect with the bounds, project on the bounds if necessary and allow zero width or height - bounds = [[self documentView] bounds]; - minX = fmin(fmax(minX, NSMinX(bounds)), NSMaxX(bounds)); - maxX = fmax(fmin(maxX, NSMaxX(bounds)), NSMinX(bounds)); - minY = fmin(fmax(minY, NSMinY(bounds)), NSMaxY(bounds)); - maxY = fmax(fmin(maxY, NSMaxY(bounds)), NSMinY(bounds)); - selRect = NSMakeRect(minX, minY, maxX - minX, maxY - minY); - - [[self window] cacheImageInRect:NSInsetRect([[self documentView] convertRect:selRect toView:nil], -2.0, -2.0)]; - - [self lockFocus]; - [NSGraphicsContext saveGraphicsState]; - [[NSColor blackColor] set]; - [NSBezierPath strokeRect:NSInsetRect(NSIntegralRect([self convertRect:selRect fromView:[self documentView]]), 0.5, 0.5)]; - [NSGraphicsContext restoreGraphicsState]; - [self unlockFocus]; - [[self window] flushWindow]; - - break; - - case NSLeftMouseUp: - keepGoing = NO; - break; - - default: - /* Ignore any other kind of event. */ - break; - } // end of switch (event type) - } // end of mouse-tracking loop + if ([theEvent type] == NSLeftMouseUpMask) + break; + + if ([theEvent type] == NSLeftMouseDragged) { + // change mouseLoc + [[self documentView] autoscroll:theEvent]; + mouseLoc = [theEvent locationInWindow]; + dragged = YES; + } + + // dragging or flags changed + + currentPoint = [[self documentView] convertPoint:mouseLoc fromView:nil]; + + minX = fmin(startPoint.x, currentPoint.x); + maxX = fmax(startPoint.x, currentPoint.x); + minY = fmin(startPoint.y, currentPoint.y); + maxY = fmax(startPoint.y, currentPoint.y); + // center around startPoint when holding down the Shift key + if ([theEvent modifierFlags] & NSShiftKeyMask) { + if (currentPoint.x > startPoint.x) + minX -= maxX - minX; + else + maxX += maxX - minX; + if (currentPoint.y > startPoint.y) + minY -= maxY - minY; + else + maxY += maxY - minY; + } + // intersect with the bounds, project on the bounds if necessary and allow zero width or height + bounds = [[self documentView] bounds]; + minX = fmin(fmax(minX, NSMinX(bounds)), NSMaxX(bounds)); + maxX = fmax(fmin(maxX, NSMaxX(bounds)), NSMinX(bounds)); + minY = fmin(fmax(minY, NSMinY(bounds)), NSMaxY(bounds)); + maxY = fmax(fmin(maxY, NSMaxY(bounds)), NSMinY(bounds)); + selRect = NSMakeRect(minX, minY, maxX - minX, maxY - minY); + + [[self window] cacheImageInRect:NSInsetRect([[self documentView] convertRect:selRect toView:nil], -2.0, -2.0)]; + + [self lockFocus]; + [NSGraphicsContext saveGraphicsState]; + [[NSColor blackColor] set]; + [NSBezierPath strokeRect:NSInsetRect(NSIntegralRect([self convertRect:selRect fromView:[self documentView]]), 0.5, 0.5)]; + [NSGraphicsContext restoreGraphicsState]; + [self unlockFocus]; + [[self window] flushWindow]; + + } [[self window] discardCachedImage]; [self flagsChanged:theEvent]; @@ -2860,22 +2821,7 @@ NSRect rect = [self convertRect:selRect fromView:[self documentView]]; int factor = 1; - if (dragged == NO) { - - BOOL isLink = NO; - PDFDestination *dest = [self destinationForEvent:theEvent isLink:&isLink]; - - if (isLink) { - page = [dest page]; - point = [self convertPoint:[dest point] fromPage:page]; - point.y -= 100.0; - } - - rect = [self convertRect:[page boundsForBox:kPDFDisplayBoxCropBox] fromPage:page]; - rect.origin.y = point.y - 100.0; - rect.size.height = 200.0; - - } else { + if (dragged) { bounds = [self convertRect:[[self documentView] bounds] fromView:[self documentView]]; @@ -2898,6 +2844,22 @@ if (NSMaxX(rect) > NSMaxY(bounds)) rect.origin.y = NSMaxY(bounds) - NSHeight(rect); } + + } else { + + BOOL isLink = NO; + PDFDestination *dest = [self destinationForEvent:theEvent isLink:&isLink]; + + if (isLink) { + page = [dest page]; + point = [self convertPoint:[dest point] fromPage:page]; + point.y -= 100.0; + } + + rect = [self convertRect:[page boundsForBox:kPDFDisplayBoxCropBox] fromPage:page]; + rect.origin.y = point.y - 100.0; + rect.size.height = 200.0; + } SKMainWindowController *controller = [[self window] windowController]; @@ -2929,8 +2891,8 @@ while ([theEvent type] != NSLeftMouseUp) { - // set up the currentLevel and magScale if ([theEvent type] == NSLeftMouseDown || [theEvent type] == NSFlagsChanged) { + // set up the currentLevel and magScale unsigned modifierFlags = [theEvent modifierFlags]; currentLevel = originalLevel + ((modifierFlags & NSAlternateKeyMask) ? 1 : 0); if (currentLevel > 2) { @@ -2941,12 +2903,11 @@ if ((modifierFlags & NSShiftKeyMask) == 0) magScale = 1.0 / magScale; [self flagsChanged:theEvent]; // update the cursor + } else if ([theEvent type] == NSLeftMouseDragged) { + // get Mouse location and check if it is with the view's rect + mouseLoc = [theEvent locationInWindow]; } - // get Mouse location and check if it is with the view's rect - if ([theEvent type] == NSLeftMouseDragged) - mouseLoc = [theEvent locationInWindow]; - if ([self mouse:mouseLoc inRect:visibleRect]) { if (mouseInside == NO) { mouseInside = YES; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 13:05:41
|
Revision: 2077 http://skim-app.svn.sourceforge.net/skim-app/?rev=2077&view=rev Author: hofman Date: 2007-05-18 06:05:39 -0700 (Fri, 18 May 2007) Log Message: ----------- Update release notes. Modified Paths: -------------- trunk/ReleaseNotes.rtf Modified: trunk/ReleaseNotes.rtf =================================================================== --- trunk/ReleaseNotes.rtf 2007-05-18 12:56:02 UTC (rev 2076) +++ trunk/ReleaseNotes.rtf 2007-05-18 13:05:39 UTC (rev 2077) @@ -1,6 +1,7 @@ {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410 -{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fnil\fcharset77 LucidaGrande;\f2\fswiss\fcharset77 Helvetica-Bold; -\f3\fswiss\fcharset77 Helvetica-BoldOblique;\f4\fnil\fcharset77 LucidaGrande-Bold;} +{\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fnil\fcharset77 LucidaGrande;\f2\fnil\fcharset77 LucidaSans-Typewriter; +\f3\fswiss\fcharset77 Helvetica-Bold;\f4\fswiss\fcharset77 Helvetica-BoldOblique;\f5\fnil\fcharset77 LucidaGrande-Bold; +} {\colortbl;\red255\green255\blue255;} {\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1} {\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid2} @@ -51,139 +52,214 @@ {\list\listtemplateid47\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid47} {\list\listtemplateid48\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid48} {\list\listtemplateid49\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid49} -{\list\listtemplateid50\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid50}} -{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}{\listoverride\listid12\listoverridecount0\ls12}{\listoverride\listid13\listoverridecount0\ls13}{\listoverride\listid14\listoverridecount0\ls14}{\listoverride\listid15\listoverridecount0\ls15}{\listoverride\listid16\listoverridecount0\ls16}{\listoverride\listid17\listoverridecount0\ls17}{\listoverride\listid18\listoverridecount0\ls18}{\listoverride\listid19\listoverridecount0\ls19}{\listoverride\listid20\listoverridecount0\ls20}{\listoverride\listid21\listoverridecount0\ls21}{\listoverride\listid22\listoverridecount0\ls22}{\listoverride\listid23\listoverridecount0\ls23}{\listoverride\listid24\listoverridecount0\ls24}{\listoverride\listid25\listoverridecount0\ls25}{\listoverride\listid26\listoverridecount0\ls26}{\listoverride\listid27\listoverridecount0\ls27}{\listoverride\listid28\listoverridecount0\ls28}{\listoverride\listid29\listoverridecount0\ls29}{\listoverride\listid30\listoverridecount0\ls30}{\listoverride\listid31\listoverridecount0\ls31}{\listoverride\listid32\listoverridecount0\ls32}{\listoverride\listid33\listoverridecount0\ls33}{\listoverride\listid34\listoverridecount0\ls34}{\listoverride\listid35\listoverridecount0\ls35}{\listoverride\listid36\listoverridecount0\ls36}{\listoverride\listid37\listoverridecount0\ls37}{\listoverride\listid38\listoverridecount0\ls38}{\listoverride\listid39\listoverridecount0\ls39}{\listoverride\listid40\listoverridecount0\ls40}{\listoverride\listid41\listoverridecount0\ls41}{\listoverride\listid42\listoverridecount0\ls42}{\listoverride\listid43\listoverridecount0\ls43}{\listoverride\listid44\listoverridecount0\ls44}{\listoverride\listid45\listoverridecount0\ls45}{\listoverride\listid46\listoverridecount0\ls46}{\listoverride\listid47\listoverridecount0\ls47}{\listoverride\listid48\listoverridecount0\ls48}{\listoverride\listid49\listoverridecount0\ls49}{\listoverride\listid50\listoverridecount0\ls50}} +{\list\listtemplateid50\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid50} +{\list\listtemplateid51\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid51} +{\list\listtemplateid52\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid52} +{\list\listtemplateid53\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid53} +{\list\listtemplateid54\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid54} +{\list\listtemplateid55\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid55} +{\list\listtemplateid56\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid56} +{\list\listtemplateid57\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid57} +{\list\listtemplateid58\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid58} +{\list\listtemplateid59\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid59} +{\list\listtemplateid60\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid60} +{\list\listtemplateid61\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid61} +{\list\listtemplateid62\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid62} +{\list\listtemplateid63\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid63} +{\list\listtemplateid64\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid64} +{\list\listtemplateid65\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid65} +{\list\listtemplateid66\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid66} +{\list\listtemplateid67\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid67} +{\list\listtemplateid68\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid68}} +{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}{\listoverride\listid11\listoverridecount0\ls11}{\listoverride\listid12\listoverridecount0\ls12}{\listoverride\listid13\listoverridecount0\ls13}{\listoverride\listid14\listoverridecount0\ls14}{\listoverride\listid15\listoverridecount0\ls15}{\listoverride\listid16\listoverridecount0\ls16}{\listoverride\listid17\listoverridecount0\ls17}{\listoverride\listid18\listoverridecount0\ls18}{\listoverride\listid19\listoverridecount0\ls19}{\listoverride\listid20\listoverridecount0\ls20}{\listoverride\listid21\listoverridecount0\ls21}{\listoverride\listid22\listoverridecount0\ls22}{\listoverride\listid23\listoverridecount0\ls23}{\listoverride\listid24\listoverridecount0\ls24}{\listoverride\listid25\listoverridecount0\ls25}{\listoverride\listid26\listoverridecount0\ls26}{\listoverride\listid27\listoverridecount0\ls27}{\listoverride\listid28\listoverridecount0\ls28}{\listoverride\listid29\listoverridecount0\ls29}{\listoverride\listid30\listoverridecount0\ls30}{\listoverride\listid31\listoverridecount0\ls31}{\listoverride\listid32\listoverridecount0\ls32}{\listoverride\listid33\listoverridecount0\ls33}{\listoverride\listid34\listoverridecount0\ls34}{\listoverride\listid35\listoverridecount0\ls35}{\listoverride\listid36\listoverridecount0\ls36}{\listoverride\listid37\listoverridecount0\ls37}{\listoverride\listid38\listoverridecount0\ls38}{\listoverride\listid39\listoverridecount0\ls39}{\listoverride\listid40\listoverridecount0\ls40}{\listoverride\listid41\listoverridecount0\ls41}{\listoverride\listid42\listoverridecount0\ls42}{\listoverride\listid43\listoverridecount0\ls43}{\listoverride\listid44\listoverridecount0\ls44}{\listoverride\listid45\listoverridecount0\ls45}{\listoverride\listid46\listoverridecount0\ls46}{\listoverride\listid47\listoverridecount0\ls47}{\listoverride\listid48\listoverridecount0\ls48}{\listoverride\listid49\listoverridecount0\ls49}{\listoverride\listid50\listoverridecount0\ls50}{\listoverride\listid51\listoverridecount0\ls51}{\listoverride\listid52\listoverridecount0\ls52}{\listoverride\listid53\listoverridecount0\ls53}{\listoverride\listid54\listoverridecount0\ls54}{\listoverride\listid55\listoverridecount0\ls55}{\listoverride\listid56\listoverridecount0\ls56}{\listoverride\listid57\listoverridecount0\ls57}{\listoverride\listid58\listoverridecount0\ls58}{\listoverride\listid59\listoverridecount0\ls59}{\listoverride\listid60\listoverridecount0\ls60}{\listoverride\listid61\listoverridecount0\ls61}{\listoverride\listid62\listoverridecount0\ls62}{\listoverride\listid63\listoverridecount0\ls63}{\listoverride\listid64\listoverridecount0\ls64}{\listoverride\listid65\listoverridecount0\ls65}{\listoverride\listid66\listoverridecount0\ls66}{\listoverride\listid67\listoverridecount0\ls67}{\listoverride\listid68\listoverridecount0\ls68}} \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\fs60 \cf0 Skim Release Notes\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f1\fs22 \cf0 \ +Last update: 18 May 2007 (rev +\f2\fs20 2076) +\f1\fs22 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\f2\b\fs28 \cf0 Changes since 0.2\ +\f3\b\fs28 \cf0 \ +Changes since 0.3\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\f3\i\fs26 \cf0 \ +\f4\i\fs26 \cf0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \cf0 New Features\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural \ls1\ilvl0 +\f1\i0\b0\fs22 \cf0 {\listtext \'a5 }Add a menu item in the Help menu to visit the web site.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls2\ilvl0\cf0 {\listtext \'a5 }Add single-character shortcuts to change the note style in note mode (t, n, c, b, h, u, s, a).\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls3\ilvl0\cf0 {\listtext \'a5 }Fix PDFSync support to work with file names containing spaces.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls4\ilvl0\cf0 {\listtext \'a5 }Add hidden default for activation of navigation buttons in presentation mode (SKActivatePresentationNavigationAtBottom).\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls5\ilvl0\cf0 {\listtext \'a5 }Start search using the find panel at the current page when there is no selection.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls6\ilvl0\cf0 {\listtext \'a5 }Wrap selection using the find panel.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls7\ilvl0\cf0 {\listtext \'a5 }Add support for apple remote control. It can be disabled through the hidden default SKEnableAppleRemote.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls8\ilvl0\cf0 {\listtext \'a5 }Add hidden defaults for line ending style of arrows (SKArrowNoteStartLineStyle, SKArrowNoteEndLineStyle).\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls9\ilvl0\cf0 {\listtext \'a5 }Add hidden pref option for reading missing notes from separate .skim file (SKReadMissingNotesFromSkimFileOption). \ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls10\ilvl0\cf0 {\listtext \'a5 }You can now open the corresponding PDF from a Skim Notes document.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls11\ilvl0\cf0 {\listtext \'a5 }Skim can now read TIFF images from the clipboard.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls12\ilvl0\cf0 {\listtext \'a5 }New select tool. Allows you to copy PDF and TIFF images from a section of a page.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural + +\f3\b\fs28 \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f4\i\fs26 \cf0 Bugs Fixed\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls13\ilvl0 +\f1\i0\b0\fs22 \cf0 {\listtext \'a5 }Fix links in help.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls14\ilvl0\cf0 {\listtext \'a5 }Don't create a new note in note tool mode on mousedown outside a page.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls15\ilvl0\cf0 {\listtext \'a5 }Don't add new resizable notes in note tool mode when just clicking.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls16\ilvl0\cf0 {\listtext \'a5 }You can now access links that are "hidden" by transparent highlights and arrows.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls17\ilvl0\cf0 {\listtext \'a5 }Scroll reading bar to visible when it is shown.\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls18\ilvl0\cf0 {\listtext \'a5 }Scroll to previous position on page when reloading PDF.\ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural + +\f3\b\fs28 \cf0 \ +Changes since 0.2\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural + +\f4\i\fs26 \cf0 \ +\pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural +\cf0 New Features\ +\pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural +\ls19\ilvl0 \f1\i0\b0\fs22 \cf0 {\listtext \'a5 }Add shortcuts for bigger/smaller font sizes.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls2\ilvl0\cf0 {\listtext \'a5 }Command-click a snapshot.\ +\ls20\ilvl0\cf0 {\listtext \'a5 }Command-click a snapshot.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls3\ilvl0\cf0 {\listtext \'a5 }We now print notes and highlights.\ +\ls21\ilvl0\cf0 {\listtext \'a5 }We now print notes and highlights.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls4\ilvl0\cf0 {\listtext \'a5 }Add copy/cut/paste items to the contextual menu, when they apply.\ +\ls22\ilvl0\cf0 {\listtext \'a5 }Add copy/cut/paste items to the contextual menu, when they apply.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls5\ilvl0\cf0 {\listtext \'a5 }You can now make a snapshot of a page by Command-clicking a thumbnail.\ +\ls23\ilvl0\cf0 {\listtext \'a5 }You can now make a snapshot of a page by Command-clicking a thumbnail.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls6\ilvl0\cf0 {\listtext \'a5 }Added Dutch localization.\ +\ls24\ilvl0\cf0 {\listtext \'a5 }Added Dutch localization.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls7\ilvl0\cf0 {\listtext \'a5 }We now do not leave Full Screen when switching to another application.\ +\ls25\ilvl0\cf0 {\listtext \'a5 }We now do not leave Full Screen when switching to another application.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls8\ilvl0\cf0 {\listtext \'a5 }Export notes as RTF.\ +\ls26\ilvl0\cf0 {\listtext \'a5 }Export notes as RTF.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls9\ilvl0\cf0 {\listtext \'a5 }Add preference options for default note/highlight colors and text note font.\ +\ls27\ilvl0\cf0 {\listtext \'a5 }Add preference options for default note/highlight colors and text note font.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls10\ilvl0\cf0 {\listtext \'a5 }Add menu item to save the current PDF display settings to be used for new documents.\ +\ls28\ilvl0\cf0 {\listtext \'a5 }Add menu item to save the current PDF display settings to be used for new documents.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls11\ilvl0\cf0 {\listtext \'a5 }Search results from the Find Panel are now also highlighted with a red oval.\ +\ls29\ilvl0\cf0 {\listtext \'a5 }Search results from the Find Panel are now also highlighted with a red oval.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls12\ilvl0\cf0 {\listtext \'a5 }Select search field when opening the Contents pane in full screen mode.\ +\ls30\ilvl0\cf0 {\listtext \'a5 }Select search field when opening the Contents pane in full screen mode.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls13\ilvl0\cf0 {\listtext \'a5 }You can now reset all preferences or all preferences in a pane.\ +\ls31\ilvl0\cf0 {\listtext \'a5 }You can now reset all preferences or all preferences in a pane.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls14\ilvl0\cf0 {\listtext \'a5 }Added Italian localization. (Thanks Andrea Bergia!)\ +\ls32\ilvl0\cf0 {\listtext \'a5 }Added Italian localization. (Thanks Andrea Bergia!)\ {\listtext \'a5 }Screensaver and sleep are now disabled in Presentation mode.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls15\ilvl0\cf0 {\listtext \'a5 }Skim can now return to the last page viewed in a document.\ +\ls33\ilvl0\cf0 {\listtext \'a5 }Skim can now return to the last page viewed in a document.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls16\ilvl0\cf0 {\listtext \'a5 }Link tool tips now show the top of the text when the link refers to the (empty) top of a page. \ +\ls34\ilvl0\cf0 {\listtext \'a5 }Link tool tips now show the top of the text when the link refers to the (empty) top of a page. \ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls17\ilvl0\cf0 {\listtext \'a5 }Skim can now also view separate Skim notes (.skim) files.\ +\ls35\ilvl0\cf0 {\listtext \'a5 }Skim can now also view separate Skim notes (.skim) files.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls18\ilvl0\cf0 {\listtext \'a5 }Using Sparkle for automatic updating. (Thanks Andy Matuschak!)\ +\ls36\ilvl0\cf0 {\listtext \'a5 }Using Sparkle for automatic updating. (Thanks Andy Matuschak!)\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls19\ilvl0\cf0 {\listtext \'a5 }Display the number of pages in the title bar.\ +\ls37\ilvl0\cf0 {\listtext \'a5 }Display the number of pages in the title bar.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls20\ilvl0\cf0 {\listtext \'a5 }Skim can now automatically backup a skim notes file whenever it saves a PDF file.\ +\ls38\ilvl0\cf0 {\listtext \'a5 }Skim can now automatically backup a skim notes file whenever it saves a PDF file.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls21\ilvl0\cf0 {\listtext \'a5 }You can now resize the current note using the arrow keys, when you hold down the Control key.\ +\ls39\ilvl0\cf0 {\listtext \'a5 }You can now resize the current note using the arrow keys, when you hold down the Control key.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls22\ilvl0\cf0 {\listtext \'a5 }Notes are now ordered according to page and location in page.\ +\ls40\ilvl0\cf0 {\listtext \'a5 }Notes are now ordered according to page and location in page.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls23\ilvl0\cf0 {\listtext \'a5 }Several improvements of Skim's custom tool-tips.\ +\ls41\ilvl0\cf0 {\listtext \'a5 }Several improvements of Skim's custom tool-tips.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls24\ilvl0\cf0 {\listtext \'a5 }Add a menu item to select the search field.\ +\ls42\ilvl0\cf0 {\listtext \'a5 }Add a menu item to select the search field.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls25\ilvl0\cf0 {\listtext \'a5 }You can now add arrows to a PDF document.\ +\ls43\ilvl0\cf0 {\listtext \'a5 }You can now add arrows to a PDF document.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls26\ilvl0\cf0 {\listtext \'a5 }You can now add notes from external .skim files rather than just overwriting them.\ +\ls44\ilvl0\cf0 {\listtext \'a5 }You can now add notes from external .skim files rather than just overwriting them.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls27\ilvl0\cf0 {\listtext \'a5 }PDFSync support. See the Wiki for more information.\ +\ls45\ilvl0\cf0 {\listtext \'a5 }PDFSync support. See the Wiki for more information.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls28\ilvl0\cf0 {\listtext \'a5 }You can now set transparent colors from the color panel. \ +\ls46\ilvl0\cf0 {\listtext \'a5 }You can now set transparent colors from the color panel. \ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls29\ilvl0\cf0 {\listtext \'a5 }You can now set separate PDF view settigns for full screen mode. \ +\ls47\ilvl0\cf0 {\listtext \'a5 }You can now set separate PDF view settigns for full screen mode. \ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls30\ilvl0\cf0 {\listtext \'a5 }Add a Look Up in Dictionary item to the contextual menu.\ +\ls48\ilvl0\cf0 {\listtext \'a5 }Add a Look Up in Dictionary item to the contextual menu.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls31\ilvl0\cf0 {\listtext \'a5 }You can now undo edits of notes and highlights.\ +\ls49\ilvl0\cf0 {\listtext \'a5 }You can now undo edits of notes and highlights.\ {\listtext \'a5 }Add a hidden preference (SKActivateFullScreenNavigationAtBottom) to show the navigation buttons in full screen mode only when moving the mouse at the bottom of the screen. \ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls32\ilvl0\cf0 {\listtext \'a5 }Add hidden preferences for the line widths of circles and boxes (SKCircleNoteLineWidth and SKSquareNoteLineWidth).\ +\ls50\ilvl0\cf0 {\listtext \'a5 }Add hidden preferences for the line widths of circles and boxes (SKCircleNoteLineWidth and SKSquareNoteLineWidth).\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls33\ilvl0\cf0 {\listtext \'a5 }New tool modes for ading notes or highlights.\ +\ls51\ilvl0\cf0 {\listtext \'a5 }New tool modes for ading notes or highlights.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\f2\b\fs28 \cf0 \ +\f3\b\fs28 \cf0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\f3\i\fs26 \cf0 Bugs Fixed\ +\f4\i\fs26 \cf0 Bugs Fixed\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls34\ilvl0 +\ls52\ilvl0 \f1\i0\b0\fs22 \cf0 {\listtext \'a5 }We now don't edit new text notes, so they can be moved, resized or deleted.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls35\ilvl0\cf0 {\listtext \'a5 }We now make sure new notes are added to a visible page.\ +\ls53\ilvl0\cf0 {\listtext \'a5 }We now make sure new notes are added to a visible page.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls36\ilvl0\cf0 {\listtext \'a5 }Disable the TOC menu item when there is no TOC.\ +\ls54\ilvl0\cf0 {\listtext \'a5 }Disable the TOC menu item when there is no TOC.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls37\ilvl0\cf0 {\listtext \'a5 }Return to the location that was viewed when reloading a document.\ +\ls55\ilvl0\cf0 {\listtext \'a5 }Return to the location that was viewed when reloading a document.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls38\ilvl0\cf0 {\listtext \'a5 }Search text in a PDf file asynchronously, so it does not block Skim.\ +\ls56\ilvl0\cf0 {\listtext \'a5 }Search text in a PDf file asynchronously, so it does not block Skim.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls39\ilvl0\cf0 {\listtext \'a5 }Fix crashes that can appear for links with missing URLs.\ +\ls57\ilvl0\cf0 {\listtext \'a5 }Fix crashes that can appear for links with missing URLs.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls40\ilvl0\cf0 {\listtext \'a5 }Add separators in the Notes menu for categories.\ +\ls58\ilvl0\cf0 {\listtext \'a5 }Add separators in the Notes menu for categories.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls41\ilvl0\cf0 {\listtext \'a5 }Fix a crasher when reverting a PDF-document.\ +\ls59\ilvl0\cf0 {\listtext \'a5 }Fix a crasher when reverting a PDF-document.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls42\ilvl0\cf0 {\listtext \'a5 }Fix typos in the Help and update for new features.\ +\ls60\ilvl0\cf0 {\listtext \'a5 }Fix typos in the Help and update for new features.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls43\ilvl0\cf0 {\listtext \'a5 }Fix a crasher when reverting the document. Unfortunately this disabled tool tips.\ +\ls61\ilvl0\cf0 {\listtext \'a5 }Fix a crasher when reverting the document. Unfortunately this disabled tool tips.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls44\ilvl0\cf0 {\listtext \'a5 }Open the contents pane to display the search term when opening from Spotlight.\ +\ls62\ilvl0\cf0 {\listtext \'a5 }Open the contents pane to display the search term when opening from Spotlight.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls45\ilvl0\cf0 {\listtext \'a5 }Save notes when auto-saving and exporting as PDF.\ +\ls63\ilvl0\cf0 {\listtext \'a5 }Save notes when auto-saving and exporting as PDF.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls46\ilvl0\cf0 {\listtext \'a5 }Remember the width of notes pane.\ +\ls64\ilvl0\cf0 {\listtext \'a5 }Remember the width of notes pane.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls47\ilvl0\cf0 {\listtext \'a5 }Fix leaks leading to excessive memory use.\ +\ls65\ilvl0\cf0 {\listtext \'a5 }Fix leaks leading to excessive memory use.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls48\ilvl0\cf0 {\listtext \'a5 }Fix back-tabbing through notes and links.\ +\ls66\ilvl0\cf0 {\listtext \'a5 }Fix back-tabbing through notes and links.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls49\ilvl0\cf0 {\listtext \'a5 }Zooming using the scroll-wheel now only affects the current window.\ +\ls67\ilvl0\cf0 {\listtext \'a5 }Zooming using the scroll-wheel now only affects the current window.\ \pard\tx220\tx720\tx1440\tx2880\tx4320\tx5760\tx7200\li720\fi-720\ql\qnatural -\ls50\ilvl0\cf0 {\listtext \'a5 }Lazy updating of page thumbnails to avoid slowdown when opening a file.\ +\ls68\ilvl0\cf0 {\listtext \'a5 }Lazy updating of page thumbnails to avoid slowdown when opening a file.\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\f2\b\fs28 \cf0 \ +\f3\b\fs28 \cf0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\b0\fs48 \cf0 Colofon -\f2\b\fs28 \ +\f3\b\fs28 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \cf0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural @@ -194,7 +270,7 @@ \fs22 \cf0 \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\f2\b\fs28 \cf0 About Skim\ +\f3\b\fs28 \cf0 About Skim\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f1\b0\fs22 \cf0 \ @@ -202,7 +278,7 @@ \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\f3\i\b\fs26 \cf0 Web Site\ +\f4\i\b\fs26 \cf0 Web Site\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f1\i0\b0\fs22 \cf0 \ @@ -210,7 +286,7 @@ \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\f3\i\b\fs26 \cf0 Getting Help\ +\f4\i\b\fs26 \cf0 Getting Help\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f1\i0\b0\fs22 \cf0 \ @@ -218,11 +294,11 @@ \ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural -\f3\i\b\fs26 \cf0 Reporting Bugs\ +\f4\i\b\fs26 \cf0 Reporting Bugs\ \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural \f1\i0\b0\fs22 \cf0 \ Bug reports should be submitted to the {\field{\*\fldinst{HYPERLINK "http://sourceforge.net/tracker/?group_id=192583&atid=941981"}}{\fldrslt bug tracker}} on SourceForge. -\f4\b Note: +\f5\b Note: \f1\b0 If you can, please assign the bug report to someone - if you don't personally know any developers, assign the bug to Mike (username mmcc). If you don't assign the bug to someone, nobody may notice it for a long time. Assigning it to someone sends them an email notification.\ } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 12:56:04
|
Revision: 2076 http://skim-app.svn.sourceforge.net/skim-app/?rev=2076&view=rev Author: hofman Date: 2007-05-18 05:56:02 -0700 (Fri, 18 May 2007) Log Message: ----------- Avoid using NSUnionRect for dirtying, as that does not work with empty rects. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 12:43:11 UTC (rev 2075) +++ trunk/SKPDFView.m 2007-05-18 12:56:02 UTC (rev 2076) @@ -2626,7 +2626,10 @@ if (NSMinX(newRect) < NSMinX(pageBounds) || NSMaxX(newRect) > NSMaxX(pageBounds) || NSMinY(newRect) < NSMinY(pageBounds) || NSMaxY(newRect) > NSMaxY(pageBounds)) newRect = NSIntersectionRect(newRect, pageBounds); - [self setNeedsDisplayInRect:NSInsetRect(NSUnionRect(newRect, selectionRect), -margin, -margin) ofPage:activePage]; + if (NSEqualRects(selectionRect, NSZeroRect) == NO) + [self setNeedsDisplayInRect:NSInsetRect(selectionRect, -margin, -margin) ofPage:activePage]; + if (NSEqualRects(newRect, NSZeroRect) == NO) + [self setNeedsDisplayInRect:NSInsetRect(newRect, -margin, -margin) ofPage:activePage]; selectionRect = newRect; break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 12:43:13
|
Revision: 2075 http://skim-app.svn.sourceforge.net/skim-app/?rev=2075&view=rev Author: hofman Date: 2007-05-18 05:43:11 -0700 (Fri, 18 May 2007) Log Message: ----------- Draw grab handles for zero width/height selection Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 10:03:53 UTC (rev 2074) +++ trunk/SKPDFView.m 2007-05-18 12:43:11 UTC (rev 2075) @@ -320,11 +320,11 @@ float radius = 4.0 / [self scaleFactor]; CGContextBeginPath(context); CGContextAddRect(context, *(CGRect *)&bounds); - if ([activePage isEqual:pdfPage]) + if ([activePage isEqual:pdfPage] && NSIsEmptyRect(selectionRect) == NO) CGContextAddRect(context, *(CGRect *)&selectionRect); CGContextSetFillColor(context, color); CGContextEOFillPath(context); - if ([activePage isEqual:pdfPage]) { + if ([activePage isEqual:pdfPage] && NSEqualRects(selectionRect, NSZeroRect) == NO) { SKCGContextDrawGrabHandle(context, CGPointMake(NSMinX(selectionRect), NSMinY(selectionRect)), radius); SKCGContextDrawGrabHandle(context, CGPointMake(NSMinX(selectionRect), NSMaxY(selectionRect)), radius); SKCGContextDrawGrabHandle(context, CGPointMake(NSMaxX(selectionRect), NSMinY(selectionRect)), radius); @@ -2568,6 +2568,7 @@ delta.y = initialPoint.y - NSMinY(selectionRect); NSRect initialRect = selectionRect; + NSRect pageBounds = [activePage boundsForBox:[self displayBox]]; BOOL keepGoing = YES; if (xEdge == 0 && yEdge == 0) @@ -2623,7 +2624,8 @@ } } - newRect = NSIntersectionRect(newRect, [activePage boundsForBox:[self displayBox]]); + if (NSMinX(newRect) < NSMinX(pageBounds) || NSMaxX(newRect) > NSMaxX(pageBounds) || NSMinY(newRect) < NSMinY(pageBounds) || NSMaxY(newRect) > NSMaxY(pageBounds)) + newRect = NSIntersectionRect(newRect, pageBounds); [self setNeedsDisplayInRect:NSInsetRect(NSUnionRect(newRect, selectionRect), -margin, -margin) ofPage:activePage]; selectionRect = newRect; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 10:04:01
|
Revision: 2074 http://skim-app.svn.sourceforge.net/skim-app/?rev=2074&view=rev Author: hofman Date: 2007-05-18 03:03:53 -0700 (Fri, 18 May 2007) Log Message: ----------- Set active page to nil when reloading the PDF document. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 09:43:26 UTC (rev 2073) +++ trunk/SKPDFView.m 2007-05-18 10:03:53 UTC (rev 2074) @@ -369,6 +369,8 @@ - (void)setDocument:(PDFDocument *)document { [readingBar release]; readingBar = nil; + activePage = nil; + selectionRect = NSZeroRect; [self removeHoverRects]; [super setDocument:document]; [self resetHoverRects]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 09:43:27
|
Revision: 2073 http://skim-app.svn.sourceforge.net/skim-app/?rev=2073&view=rev Author: hofman Date: 2007-05-18 02:43:26 -0700 (Fri, 18 May 2007) Log Message: ----------- Only select all in text and note tool mode. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 09:38:47 UTC (rev 2072) +++ trunk/SKPDFView.m 2007-05-18 09:43:26 UTC (rev 2073) @@ -608,6 +608,11 @@ [self setAnnotationMode:[sender tag]]; } +- (IBAction)selectAll:(id)sender { + if (toolMode == SKTextToolMode || toolMode == SKNoteToolMode) + [super selectAll:sender]; +} + #pragma mark Event Handling - (void)keyDown:(NSEvent *)theEvent This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 09:38:49
|
Revision: 2072 http://skim-app.svn.sourceforge.net/skim-app/?rev=2072&view=rev Author: hofman Date: 2007-05-18 02:38:47 -0700 (Fri, 18 May 2007) Log Message: ----------- Remove current selection when changing tool mode from text/note tool mode. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 09:09:18 UTC (rev 2071) +++ trunk/SKPDFView.m 2007-05-18 09:38:47 UTC (rev 2072) @@ -380,16 +380,19 @@ - (void)setToolMode:(SKToolMode)newToolMode { if (toolMode != newToolMode) { - if ((toolMode == SKTextToolMode || toolMode == SKNoteToolMode) && (newToolMode != SKTextToolMode && newToolMode != SKNoteToolMode) && activeAnnotation) { + if ((toolMode == SKTextToolMode || toolMode == SKNoteToolMode) && newToolMode != SKTextToolMode && newToolMode != SKNoteToolMode) { if (editAnnotation) [self endAnnotationEdit:self]; - [self setActiveAnnotation:nil]; + if (activeAnnotation) + [self setActiveAnnotation:nil]; + if ([self currentSelection]) + [self setCurrentSelection:nil]; } else if (toolMode == SKSelectToolMode && activePage) { activePage = nil; selectionRect = NSZeroRect; [self setNeedsDisplay:YES]; } - + toolMode = newToolMode; [[NSUserDefaults standardUserDefaults] setInteger:toolMode forKey:SKLastToolModeKey]; [[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewToolModeChangedNotification object:self]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 09:09:31
|
Revision: 2071 http://skim-app.svn.sourceforge.net/skim-app/?rev=2071&view=rev Author: hofman Date: 2007-05-18 02:09:18 -0700 (Fri, 18 May 2007) Log Message: ----------- Mark documents from pasteboard as edited. Modified Paths: -------------- trunk/SKDocument.m Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-05-18 09:01:41 UTC (rev 2070) +++ trunk/SKDocument.m 2007-05-18 09:09:18 UTC (rev 2071) @@ -276,6 +276,7 @@ [pdfDoc release]; didRead = YES; [self setLastChangedDate:nil]; + [self updateChangeCount:NSChangeDone]; } if (didRead == NO && outError != NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-18 09:01:43
|
Revision: 2070 http://skim-app.svn.sourceforge.net/skim-app/?rev=2070&view=rev Author: hofman Date: 2007-05-18 02:01:41 -0700 (Fri, 18 May 2007) Log Message: ----------- Get PDF from documentView so it doesn't get clipped. Why is this scaled? Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 04:36:06 UTC (rev 2069) +++ trunk/SKPDFView.m 2007-05-18 09:01:41 UTC (rev 2070) @@ -510,11 +510,14 @@ [pboard declareTypes:[NSArray arrayWithObjects:NSTIFFPboardType, NSPDFPboardType, nil] owner:nil]; [pboard setData:data forType:NSTIFFPboardType]; - // temporarily reset active page to avoid drawing selection handles when copying + // temporarily reset reading bar and active page to avoid drawing selection handles when copying + SKReadingBar *previousReadingBar = readingBar; + readingBar = nil; PDFPage *previousActivePage = activePage; activePage = nil; - [self writePDFInsideRect:[self convertRect:selectionRect fromPage:previousActivePage] toPasteboard:pboard]; + [[self documentView] writePDFInsideRect:[self convertRect:[self convertRect:selectionRect fromPage:previousActivePage] toView:[self documentView]] toPasteboard:pboard]; activePage = previousActivePage; + readingBar = previousReadingBar; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ama...@us...> - 2007-05-18 04:36:08
|
Revision: 2069 http://skim-app.svn.sourceforge.net/skim-app/?rev=2069&view=rev Author: amaxwell Date: 2007-05-17 21:36:06 -0700 (Thu, 17 May 2007) Log Message: ----------- avoid drawing selection box handles in PDF copy Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-18 00:13:37 UTC (rev 2068) +++ trunk/SKPDFView.m 2007-05-18 04:36:06 UTC (rev 2069) @@ -509,7 +509,12 @@ NSPasteboard *pboard = [NSPasteboard generalPasteboard]; [pboard declareTypes:[NSArray arrayWithObjects:NSTIFFPboardType, NSPDFPboardType, nil] owner:nil]; [pboard setData:data forType:NSTIFFPboardType]; - [self writePDFInsideRect:[self convertRect:selectionRect fromPage:activePage] toPasteboard:pboard]; + + // temporarily reset active page to avoid drawing selection handles when copying + PDFPage *previousActivePage = activePage; + activePage = nil; + [self writePDFInsideRect:[self convertRect:selectionRect fromPage:previousActivePage] toPasteboard:pboard]; + activePage = previousActivePage; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ama...@us...> - 2007-05-18 00:13:38
|
Revision: 2068 http://skim-app.svn.sourceforge.net/skim-app/?rev=2068&view=rev Author: amaxwell Date: 2007-05-17 17:13:37 -0700 (Thu, 17 May 2007) Log Message: ----------- Also write PDF data to the pasteboard when copying a section, so full resolution is available. Add note about an alternate method of creating bitmap representation. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-17 23:32:59 UTC (rev 2067) +++ trunk/SKPDFView.m 2007-05-18 00:13:37 UTC (rev 2068) @@ -497,9 +497,19 @@ data = [image TIFFRepresentation]; [image release]; + /* + Possible hidden default? Alternate way of getting a bitmap rep; this varies resolution with zoom level, which is very useful if you want to copy a single figure or equation for a non-PDF-capable program. The first copy: action has some odd behavior, though (view moves). Preview produces a fixed resolution bitmap for a given selection area regardless of zoom. + + sourceRect = [self convertRect:selectionRect fromPage:activePage]; + NSBitmapImageRep *imageRep = [self bitmapImageRepForCachingDisplayInRect:sourceRect]; + [self cacheDisplayInRect:sourceRect toBitmapImageRep:imageRep]; + data = [imageRep TIFFRepresentation]; + */ + NSPasteboard *pboard = [NSPasteboard generalPasteboard]; - [pboard declareTypes:[NSArray arrayWithObjects:NSTIFFPboardType, nil] owner:nil]; + [pboard declareTypes:[NSArray arrayWithObjects:NSTIFFPboardType, NSPDFPboardType, nil] owner:nil]; [pboard setData:data forType:NSTIFFPboardType]; + [self writePDFInsideRect:[self convertRect:selectionRect fromPage:activePage] toPasteboard:pboard]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-17 23:33:01
|
Revision: 2067 http://skim-app.svn.sourceforge.net/skim-app/?rev=2067&view=rev Author: hofman Date: 2007-05-17 16:32:59 -0700 (Thu, 17 May 2007) Log Message: ----------- Allow selection in selection tool mode to go "negative". Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-17 21:20:29 UTC (rev 2066) +++ trunk/SKPDFView.m 2007-05-17 23:32:59 UTC (rev 2067) @@ -2523,7 +2523,7 @@ selectionRect.origin = initialPoint; selectionRect.size = NSZeroSize; xEdge = 1; - yEdge = 2; + yEdge = 1; [self setNeedsDisplay:YES]; } else { if (initialPoint.x > NSMaxX(selectionRect) - margin) @@ -2560,34 +2560,38 @@ xDelta = newPoint.x - initialPoint.x; yDelta = newPoint.y - initialPoint.y; - if (xEdge == 1) { - newRect.size.width += xDelta; - if (NSWidth(newRect) < 0.0) { - newRect.size.width = 0.0; - } - } else if (xEdge == 2) { + if (xEdge == 0 && yEdge == 0) { newRect.origin.x += xDelta; - newRect.size.width -= xDelta; - if (NSWidth(newRect) < 0.0) { - newRect.origin.x += NSWidth(newRect); - newRect.size.width = 0.0; - } - } else if (yEdge == 0) { - newRect.origin.x += xDelta; newRect.origin.y += yDelta; - } - - if (yEdge == 1) { - newRect.size.height += yDelta; - if (NSHeight(newRect) < 0.0) { - newRect.size.height = 0.0; + } else { + if (xEdge == 1) { + newRect.size.width += xDelta; + if (NSWidth(newRect) < 0.0) { + newRect.size.width *= -1.0; + newRect.origin.x -= NSWidth(newRect); + } + } else if (xEdge == 2) { + newRect.origin.x += xDelta; + newRect.size.width -= xDelta; + if (NSWidth(newRect) < 0.0) { + newRect.size.width *= -1.0; + newRect.origin.x -= NSWidth(newRect); + } } - } else if (yEdge == 2) { - newRect.origin.y += yDelta; - newRect.size.height -= yDelta; - if (NSHeight(newRect) < 0.0) { - newRect.origin.y += NSHeight(newRect); - newRect.size.height = 0.0; + + if (yEdge == 1) { + newRect.size.height += yDelta; + if (NSHeight(newRect) < 0.0) { + newRect.size.height *= -1.0; + newRect.origin.y -= NSHeight(newRect); + } + } else if (yEdge == 2) { + newRect.origin.y += yDelta; + newRect.size.height -= yDelta; + if (NSHeight(newRect) < 0.0) { + newRect.size.height *= -1.0; + newRect.origin.y -= NSHeight(newRect); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-17 21:20:47
|
Revision: 2066 http://skim-app.svn.sourceforge.net/skim-app/?rev=2066&view=rev Author: hofman Date: 2007-05-17 14:20:29 -0700 (Thu, 17 May 2007) Log Message: ----------- Copy item in contextual menu for select tool mode. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-17 21:02:48 UTC (rev 2065) +++ trunk/SKPDFView.m 2007-05-17 21:20:29 UTC (rev 2066) @@ -680,7 +680,10 @@ [self dragWithEvent:theEvent]; break; case SKSelectToolMode: - [self selectWithEvent:theEvent]; + if ([self areaOfInterestForMouse:theEvent] == kPDFNoArea) + [self dragWithEvent:theEvent]; + else + [self selectWithEvent:theEvent]; break; case SKMagnifyToolMode: if ([self areaOfInterestForMouse:theEvent] == kPDFNoArea) @@ -732,12 +735,10 @@ draggingAnnotation = NO; break; case SKMoveToolMode: + case SKMagnifyToolMode: case SKSelectToolMode: // shouldn't reach this break; - case SKMagnifyToolMode: - [super mouseUp:theEvent]; - break; } didBeginUndoGrouping = NO; didDrag = NO; @@ -762,12 +763,10 @@ } break; case SKMoveToolMode: + case SKMagnifyToolMode: case SKSelectToolMode: // shouldn't reach this break; - case SKMagnifyToolMode: - [super mouseDragged:theEvent]; - break; } didDrag = YES; } @@ -1016,6 +1015,13 @@ item = [menu insertItemWithTitle:NSLocalizedString(@"Cut", @"Menu item title") action:@selector(copy:) keyEquivalent:@"" atIndex:0]; item = [menu insertItemWithTitle:NSLocalizedString(@"Copy", @"Menu item title") action:@selector(copy:) keyEquivalent:@"" atIndex:0]; } + + } else if (toolMode == SKSelectToolMode && activePage) { + + [menu insertItem:[NSMenuItem separatorItem] atIndex:0]; + + item = [menu insertItemWithTitle:NSLocalizedString(@"Copy", @"Menu item title") action:@selector(copy:) keyEquivalent:@"" atIndex:0]; + } return menu; @@ -3014,18 +3020,20 @@ cursor = [NSCursor openHandCursor]; break; case SKSelectToolMode: - { - float margin = 4.0 / [self scaleFactor]; - PDFPage *page = [self pageForPoint:p nearest:NO]; - p = [self convertPoint:p toPage:page]; - if ([page isEqual:activePage] == NO || NSPointInRect(p, NSInsetRect(selectionRect, -margin, -margin)) == NO) - cursor = [NSCursor crosshairCursor]; - else if (NSPointInRect(p, NSInsetRect(selectionRect, margin, margin))) + if ([self areaOfInterestForMouse:theEvent] == kPDFNoArea) { cursor = [NSCursor openHandCursor]; - else - cursor = [NSCursor arrowCursor]; + } else { + float margin = 4.0 / [self scaleFactor]; + PDFPage *page = [self pageForPoint:p nearest:NO]; + p = [self convertPoint:p toPage:page]; + if ([page isEqual:activePage] == NO || NSPointInRect(p, NSInsetRect(selectionRect, -margin, -margin)) == NO) + cursor = [NSCursor crosshairCursor]; + else if (NSPointInRect(p, NSInsetRect(selectionRect, margin, margin))) + cursor = [NSCursor openHandCursor]; + else + cursor = [NSCursor arrowCursor]; + } break; - } case SKMagnifyToolMode: if ([self areaOfInterestForMouse:theEvent] == kPDFNoArea) cursor = [NSCursor openHandCursor]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-17 21:02:50
|
Revision: 2065 http://skim-app.svn.sourceforge.net/skim-app/?rev=2065&view=rev Author: hofman Date: 2007-05-17 14:02:48 -0700 (Thu, 17 May 2007) Log Message: ----------- Copy pdf and tiff images from thumbnail table. Modified Paths: -------------- trunk/SKMainWindowController.m trunk/SKThumbnailTableView.h trunk/SKThumbnailTableView.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-17 20:52:26 UTC (rev 2064) +++ trunk/SKMainWindowController.m 2007-05-17 21:02:48 UTC (rev 2065) @@ -2412,6 +2412,21 @@ } } +- (void)tableView:(NSTableView *)tv copyRowsWithIndexes:(NSIndexSet *)rowIndexes { + if ([tv isEqual:thumbnailTableView]) { + unsigned int index = [rowIndexes firstIndex]; + if (index != NSNotFound) { + PDFPage *page = [[pdfView document] pageAtIndex:index]; + NSData *pdfData = [page dataRepresentation]; + NSData *tiffData = [[page image] TIFFRepresentation]; + NSPasteboard *pboard = [NSPasteboard generalPasteboard]; + [pboard declareTypes:[NSArray arrayWithObjects:NSPDFPboardType, NSTIFFPboardType, nil] owner:nil]; + [pboard setData:pdfData forType:NSPDFPboardType]; + [pboard setData:tiffData forType:NSTIFFPboardType]; + } + } +} + - (NSArray *)tableViewHighlightedRows:(NSTableView *)tv { if ([tv isEqual:thumbnailTableView]) { return lastViewedPages; Modified: trunk/SKThumbnailTableView.h =================================================================== --- trunk/SKThumbnailTableView.h 2007-05-17 20:52:26 UTC (rev 2064) +++ trunk/SKThumbnailTableView.h 2007-05-17 21:02:48 UTC (rev 2065) @@ -65,4 +65,5 @@ @interface NSObject (SKThumbnailTableViewDelegate) - (NSArray *)tableViewHighlightedRows:(NSTableView *)tableView; - (BOOL)tableView:(NSTableView *)tableView commandSelectRow:(int)rowIndex; +- (void)tableView:(NSTableView *)aTableView copyRowsWithIndexes:(NSIndexSet *)rowIndexes; @end Modified: trunk/SKThumbnailTableView.m =================================================================== --- trunk/SKThumbnailTableView.m 2007-05-17 20:52:26 UTC (rev 2064) +++ trunk/SKThumbnailTableView.m 2007-05-17 21:02:48 UTC (rev 2065) @@ -131,6 +131,11 @@ [super mouseDown:theEvent]; } +- (void)copy:(id)sender { + if ([[self delegate] respondsToSelector:@selector(tableView:copyRowsWithIndexes:)]) + [[self delegate] tableView:self copyRowsWithIndexes:[self selectedRowIndexes]]; +} + @end #pragma mark - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-17 20:52:32
|
Revision: 2064 http://skim-app.svn.sourceforge.net/skim-app/?rev=2064&view=rev Author: hofman Date: 2007-05-17 13:52:26 -0700 (Thu, 17 May 2007) Log Message: ----------- Add select tool. The selected rectangle can be copied as an image or used for a snapshot. See RFE # 1720431. Modified Paths: -------------- trunk/Dutch.lproj/Localizable.strings trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib trunk/Dutch.lproj/MainWindow.nib/info.nib trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib trunk/English.lproj/Localizable.strings trunk/English.lproj/MainMenu.nib/keyedobjects.nib trunk/English.lproj/MainWindow.nib/info.nib trunk/English.lproj/MainWindow.nib/keyedobjects.nib trunk/Italian.lproj/Localizable.strings trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib trunk/Italian.lproj/MainWindow.nib/info.nib trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib trunk/PDFPage_SKExtensions.h trunk/PDFPage_SKExtensions.m trunk/SKMainWindowController.m trunk/SKPDFView.h trunk/SKPDFView.m trunk/Skim.xcodeproj/project.pbxproj Added Paths: ----------- trunk/Images/SelectToolAdorn.tiff Modified: trunk/Dutch.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Dutch.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/Dutch.lproj/MainWindow.nib/info.nib 2007-05-17 20:52:26 UTC (rev 2064) @@ -7,7 +7,7 @@ <key>IBEditorPositions</key> <dict> <key>168</key> - <string>568 557 304 167 0 0 1440 938 </string> + <string>601 543 237 195 0 0 1440 938 </string> <key>224</key> <string>610 420 220 442 0 0 1440 938 </string> <key>256</key> Modified: trunk/Dutch.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/English.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/English.lproj/MainWindow.nib/info.nib 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/English.lproj/MainWindow.nib/info.nib 2007-05-17 20:52:26 UTC (rev 2064) @@ -7,7 +7,7 @@ <key>IBEditorPositions</key> <dict> <key>168</key> - <string>568 557 304 167 0 0 1440 938 </string> + <string>601 543 237 195 0 0 1440 938 </string> <key>224</key> <string>610 420 220 442 0 0 1440 938 </string> <key>256</key> @@ -28,16 +28,16 @@ <key>IBOpenObjects</key> <array> <integer>314</integer> + <integer>553</integer> + <integer>208</integer> <integer>168</integer> - <integer>539</integer> - <integer>502</integer> + <integer>224</integer> <integer>511</integer> - <integer>224</integer> - <integer>208</integer> - <integer>5</integer> - <integer>553</integer> <integer>585</integer> + <integer>502</integer> + <integer>539</integer> <integer>256</integer> + <integer>5</integer> </array> <key>IBSystem Version</key> <string>8P135</string> Modified: trunk/English.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Added: trunk/Images/SelectToolAdorn.tiff =================================================================== (Binary files differ) Property changes on: trunk/Images/SelectToolAdorn.tiff ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/Italian.lproj/Localizable.strings =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainMenu.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/Italian.lproj/MainWindow.nib/info.nib =================================================================== --- trunk/Italian.lproj/MainWindow.nib/info.nib 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/Italian.lproj/MainWindow.nib/info.nib 2007-05-17 20:52:26 UTC (rev 2064) @@ -7,7 +7,7 @@ <key>IBEditorPositions</key> <dict> <key>168</key> - <string>571 557 298 167 0 0 1440 938 </string> + <string>571 529 237 195 0 0 1440 938 </string> <key>224</key> <string>402 294 220 442 0 0 1024 746 </string> <key>256</key> Modified: trunk/Italian.lproj/MainWindow.nib/keyedobjects.nib =================================================================== (Binary files differ) Modified: trunk/PDFPage_SKExtensions.h =================================================================== --- trunk/PDFPage_SKExtensions.h 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/PDFPage_SKExtensions.h 2007-05-17 20:52:26 UTC (rev 2064) @@ -44,6 +44,7 @@ @interface PDFPage (SKExtensions) - (NSImage *)image; +- (NSImage *)imageForBox:(PDFDisplayBox)box; - (NSImage *)thumbnailWithSize:(float)size; - (NSImage *)thumbnailWithSize:(float)size shadowBlurRadius:(float)shadowBlurRadius shadowOffset:(NSSize)shadowOffset; Modified: trunk/PDFPage_SKExtensions.m =================================================================== --- trunk/PDFPage_SKExtensions.m 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/PDFPage_SKExtensions.m 2007-05-17 20:52:26 UTC (rev 2064) @@ -46,7 +46,11 @@ @implementation PDFPage (SKExtensions) - (NSImage *)image { - NSRect bounds = [self boundsForBox:kPDFDisplayBoxCropBox]; + return [self imageForBox:kPDFDisplayBoxCropBox]; +} + +- (NSImage *)imageForBox:(PDFDisplayBox)box { + NSRect bounds = [self boundsForBox:box]; NSImage *image = [[NSImage alloc] initWithSize:bounds.size]; [image lockFocus]; @@ -71,7 +75,7 @@ [[NSColor whiteColor] set]; bounds.origin = NSZeroPoint; NSRectFill(bounds); - [self drawWithBox:kPDFDisplayBoxCropBox]; + [self drawWithBox:box]; [NSGraphicsContext restoreGraphicsState]; [image unlockFocus]; Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/SKMainWindowController.m 2007-05-17 20:52:26 UTC (rev 2064) @@ -2939,6 +2939,9 @@ menuItem = [menu addItemWithTitle:NSLocalizedString(@"Magnify Tool", @"Menu item title") action:@selector(changeToolMode:) keyEquivalent:@""]; [menuItem setTarget:self]; [menuItem setTag:SKMagnifyToolMode]; + menuItem = [menu addItemWithTitle:NSLocalizedString(@"Select Tool", @"Menu item title") action:@selector(changeToolMode:) keyEquivalent:@""]; + [menuItem setTarget:self]; + [menuItem setTag:SKSelectToolMode]; [menu addItem:[NSMenuItem separatorItem]]; menuItem = [menu addItemWithTitle:NSLocalizedString(@"Text Note Tool", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; [menuItem setTarget:self]; @@ -2973,6 +2976,7 @@ [[toolModeButton cell] setToolTip:NSLocalizedString(@"Text Tool", @"Tool tip message") forSegment:SKTextToolMode]; [[toolModeButton cell] setToolTip:NSLocalizedString(@"Scroll Tool", @"Tool tip message") forSegment:SKMoveToolMode]; [[toolModeButton cell] setToolTip:NSLocalizedString(@"Magnify Tool", @"Tool tip message") forSegment:SKMagnifyToolMode]; + [[toolModeButton cell] setToolTip:NSLocalizedString(@"Select Tool", @"Tool tip message") forSegment:SKSelectToolMode]; [[toolModeButton cell] setToolTip:NSLocalizedString(@"Note Tool", @"Tool tip message") forSegment:SKNoteToolMode]; frame = [toolModeButton frame]; frame.size.height = SEGMENTED_CONTROL_HEIGHT; Modified: trunk/SKPDFView.h =================================================================== --- trunk/SKPDFView.h 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/SKPDFView.h 2007-05-17 20:52:26 UTC (rev 2064) @@ -54,6 +54,7 @@ SKTextToolMode, SKMoveToolMode, SKMagnifyToolMode, + SKSelectToolMode, SKNoteToolMode } SKToolMode; @@ -85,6 +86,7 @@ PDFAnnotation *activeAnnotation; PDFAnnotationTextWidget *editAnnotation; PDFSelection *wasSelection; + PDFPage *activePage; NSRect wasBounds; NSPoint wasStartPoint; NSPoint wasEndPoint; Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/SKPDFView.m 2007-05-17 20:52:26 UTC (rev 2064) @@ -63,6 +63,7 @@ NSString *SKSkimNotePboardType = @"SKSkimNotePboardType"; static CGMutablePathRef SKCGCreatePathWithRoundRectInRect(CGRect rect, float radius); +static void SKCGContextDrawGrabHandle(CGContextRef context, CGPoint point, float radius); @interface PDFDocument (SKExtensions) - (PDFSelection *)selectionByExtendingSelection:(PDFSelection *)selection toPage:(PDFPage *)page atPoint:(NSPoint)point; @@ -101,6 +102,7 @@ - (void)selectSnapshotWithEvent:(NSEvent *)theEvent; - (void)magnifyWithEvent:(NSEvent *)theEvent; - (void)dragWithEvent:(NSEvent *)theEvent; +- (void)selectWithEvent:(NSEvent *)theEvent; - (void)selectTextWithEvent:(NSEvent *)theEvent; - (void)dragReadingBarWithEvent:(NSEvent *)theEvent; - (void)pdfsyncWithEvent:(NSEvent *)theEvent; @@ -307,11 +309,31 @@ } } - if (NSIsEmptyRect(selectionRect) == NO) { + if (NSIsEmptyRect(selectionRect) == NO && toolMode != SKSelectToolMode) { NSRect rect = NSInsetRect([self convertRect:selectionRect toPage:pdfPage], 0.5, 0.5); float color[4] = { 0.0, 0.0, 0.0, 1.0 }; CGContextSetStrokeColor(context, color); CGContextStrokeRect(context, *(CGRect *)&rect); + } else if (toolMode == SKSelectToolMode && activePage) { + NSRect bounds = [pdfPage boundsForBox:[self displayBox]]; + float color[4] = { 0.0, 0.0, 0.0, 0.6 }; + float radius = 4.0 / [self scaleFactor]; + CGContextBeginPath(context); + CGContextAddRect(context, *(CGRect *)&bounds); + if ([activePage isEqual:pdfPage]) + CGContextAddRect(context, *(CGRect *)&selectionRect); + CGContextSetFillColor(context, color); + CGContextEOFillPath(context); + if ([activePage isEqual:pdfPage]) { + SKCGContextDrawGrabHandle(context, CGPointMake(NSMinX(selectionRect), NSMinY(selectionRect)), radius); + SKCGContextDrawGrabHandle(context, CGPointMake(NSMinX(selectionRect), NSMaxY(selectionRect)), radius); + SKCGContextDrawGrabHandle(context, CGPointMake(NSMaxX(selectionRect), NSMinY(selectionRect)), radius); + SKCGContextDrawGrabHandle(context, CGPointMake(NSMaxX(selectionRect), NSMaxY(selectionRect)), radius); + SKCGContextDrawGrabHandle(context, CGPointMake(NSMinX(selectionRect), NSMidY(selectionRect)), radius); + SKCGContextDrawGrabHandle(context, CGPointMake(NSMaxX(selectionRect), NSMidY(selectionRect)), radius); + SKCGContextDrawGrabHandle(context, CGPointMake(NSMidX(selectionRect), NSMinY(selectionRect)), radius); + SKCGContextDrawGrabHandle(context, CGPointMake(NSMidX(selectionRect), NSMaxY(selectionRect)), radius); + } } CGContextRestoreGState(context); @@ -362,6 +384,10 @@ if (editAnnotation) [self endAnnotationEdit:self]; [self setActiveAnnotation:nil]; + } else if (toolMode == SKSelectToolMode && activePage) { + activePage = nil; + selectionRect = NSZeroRect; + [self setNeedsDisplay:YES]; } toolMode = newToolMode; @@ -454,6 +480,27 @@ [pboard declareTypes:[NSArray arrayWithObjects:SKSkimNotePboardType, nil] owner:nil]; [pboard setData:data forType:SKSkimNotePboardType]; } + if (toolMode == SKSelectToolMode && activePage) { + NSRect bounds = [activePage boundsForBox:[self displayBox]]; + NSRect targetRect = NSZeroRect, sourceRect = selectionRect; + NSImage *pageImage = [activePage imageForBox:[self displayBox]]; + NSImage *image = nil; + NSData *data = nil; + + sourceRect.origin.x -= NSMinX(bounds); + sourceRect.origin.y -= NSMinY(bounds); + targetRect.size = sourceRect.size; + image = [[NSImage alloc] initWithSize:targetRect.size]; + [image lockFocus]; + [pageImage drawInRect:targetRect fromRect:sourceRect operation:NSCompositeCopy fraction:1.0]; + [image unlockFocus]; + data = [image TIFFRepresentation]; + [image release]; + + NSPasteboard *pboard = [NSPasteboard generalPasteboard]; + [pboard declareTypes:[NSArray arrayWithObjects:NSTIFFPboardType, nil] owner:nil]; + [pboard setData:data forType:NSTIFFPboardType]; + } } - (void)pasteNoteAlternate:(BOOL)isAlternate { @@ -632,6 +679,9 @@ case SKMoveToolMode: [self dragWithEvent:theEvent]; break; + case SKSelectToolMode: + [self selectWithEvent:theEvent]; + break; case SKMagnifyToolMode: if ([self areaOfInterestForMouse:theEvent] == kPDFNoArea) [self dragWithEvent:theEvent]; @@ -682,6 +732,7 @@ draggingAnnotation = NO; break; case SKMoveToolMode: + case SKSelectToolMode: // shouldn't reach this break; case SKMagnifyToolMode: @@ -711,6 +762,7 @@ } break; case SKMoveToolMode: + case SKSelectToolMode: // shouldn't reach this break; case SKMagnifyToolMode: @@ -763,6 +815,8 @@ case SKMoveToolMode: cursor = [NSCursor openHandCursor]; break; + case SKSelectToolMode: + break; case SKMagnifyToolMode: cursor = ([theEvent modifierFlags] & NSShiftKeyMask) ? [NSCursor zoomOutCursor] : [NSCursor zoomInCursor]; break; @@ -805,6 +859,10 @@ [item setTag:SKMagnifyToolMode]; [item setTarget:self]; + item = [submenu addItemWithTitle:NSLocalizedString(@"Select", @"Menu item title") action:@selector(changeToolMode:) keyEquivalent:@""]; + [item setTag:SKSelectToolMode]; + [item setTarget:self]; + [submenu addItem:[NSMenuItem separatorItem]]; item = [submenu addItemWithTitle:NSLocalizedString(@"Text Note", @"Menu item title") action:@selector(changeAnnotationMode:) keyEquivalent:@""]; @@ -1418,33 +1476,41 @@ - (void)takeSnapshot:(id)sender { NSPoint point; - PDFPage *page; - NSRect rect; + PDFPage *page = nil; + NSRect rect = NSZeroRect; - if ([sender respondsToSelector:@selector(representedObject)] && [[sender representedObject] respondsToSelector:@selector(pointValue)]) { - point = [[sender representedObject] pointValue]; - page = [self pageForPoint:point nearest:YES]; - } else { - // First try the current mouse position - point = [self convertPoint:[[self window] mouseLocationOutsideOfEventStream] fromView:nil]; - page = [self pageForPoint:point nearest:NO]; - if (page == nil) { - // Get the center - NSRect viewFrame = [self frame]; - point = NSMakePoint(NSMidX(viewFrame), NSMidY(viewFrame)); + if (toolMode == SKSelectToolMode && activePage) { + rect = NSIntersectionRect(selectionRect, [activePage boundsForBox:kPDFDisplayBoxCropBox]); + page = activePage; + } + if (NSIsEmptyRect(rect)) { + if ([sender respondsToSelector:@selector(representedObject)] && [[sender representedObject] respondsToSelector:@selector(pointValue)]) { + point = [[sender representedObject] pointValue]; page = [self pageForPoint:point nearest:YES]; + } else { + // First try the current mouse position + point = [self convertPoint:[[self window] mouseLocationOutsideOfEventStream] fromView:nil]; + page = [self pageForPoint:point nearest:NO]; + if (page == nil) { + // Get the center + NSRect viewFrame = [self frame]; + point = NSMakePoint(NSMidX(viewFrame), NSMidY(viewFrame)); + page = [self pageForPoint:point nearest:YES]; + } } + + point = [self convertPoint:point toPage:page]; + + rect = [self convertRect:[page boundsForBox:kPDFDisplayBoxCropBox] fromPage:page]; + rect.origin.y = point.y - 100.0; + rect.size.height = 200.0; + + rect = [self convertRect:rect toPage:page]; } - point = [self convertPoint:point toPage:page]; - - rect = [self convertRect:[page boundsForBox:kPDFDisplayBoxCropBox] fromPage:page]; - rect.origin.y = point.y - 100.0; - rect.size.height = 200.0; - SKMainWindowController *controller = [[self window] windowController]; - [controller showSnapshotAtPageNumber:[[self document] indexForPage:page] forRect:[self convertRect:rect toPage:page] factor:1]; + [controller showSnapshotAtPageNumber:[[self document] indexForPage:page] forRect:rect factor:1]; } #pragma mark Notification handling @@ -1501,6 +1567,14 @@ else [menuItem setState:[self annotationMode] == (unsigned)[menuItem tag] ? NSOnState : NSOffState]; return YES; + } else if (action == @selector(copy:)) { + if ([super validateMenuItem:menuItem]) + return YES; + if ([activeAnnotation isNoteAnnotation] && [activeAnnotation isMovable]) + return YES; + if (toolMode == SKSelectToolMode && activePage) + return YES; + return NO; } else { return [super validateMenuItem:menuItem]; } @@ -2057,7 +2131,7 @@ NSArray *annotations; int i; NSPoint pagePoint; - PDFPage *activePage; + PDFPage *page; // Mouse in display view coordinates. mouseDownLoc = [theEvent locationInWindow]; @@ -2065,13 +2139,13 @@ NSPoint mouseDownOnPage = [self convertPoint:mouseDownLoc fromView:nil]; // Page we're on. - activePage = [self pageForPoint:mouseDownOnPage nearest:YES]; + page = [self pageForPoint:mouseDownOnPage nearest:YES]; // Get mouse in "page space". - pagePoint = [self convertPoint:mouseDownOnPage toPage:activePage]; + pagePoint = [self convertPoint:mouseDownOnPage toPage:page]; // Hit test for annotation. - annotations = [activePage annotations]; + annotations = [page annotations]; i = [annotations count]; while (i-- > 0) { @@ -2108,17 +2182,17 @@ PDFAnnotation *newAnnotation = [[PDFAnnotation alloc] initWithDictionary:[newActiveAnnotation dictionaryValue]]; [[self undoManager] beginUndoGrouping]; didBeginUndoGrouping = YES; - [self addAnnotation:newAnnotation toPage:activePage]; + [self addAnnotation:newAnnotation toPage:page]; newActiveAnnotation = newAnnotation; [newAnnotation release]; } else if (toolMode == SKNoteToolMode && newActiveAnnotation == nil && - NSPointInRect(mouseDownOnPage, [activePage boundsForBox:[self displayBox]]) && + NSPointInRect(mouseDownOnPage, [page boundsForBox:[self displayBox]]) && (annotationMode == SKFreeTextNote || annotationMode == SKAnchoredNote || annotationMode == SKCircleNote || annotationMode == SKSquareNote || annotationMode == SKArrowNote)) { float width = annotationMode == SKAnchoredNote ? 16.0 : annotationMode == SKArrowNote ? 4.0 : 8.0; NSRect bounds = NSMakeRect(pagePoint.x - floorf(0.5 * width), pagePoint.y - floorf(0.5 * width), width, width); [[self undoManager] beginUndoGrouping]; didBeginUndoGrouping = YES; - [self addAnnotationWithType:annotationMode contents:nil page:activePage bounds:bounds]; + [self addAnnotationWithType:annotationMode contents:nil page:page bounds:bounds]; newActiveAnnotation = activeAnnotation; mouseDownInAnnotation = YES; clickDelta.x = pagePoint.x - NSMinX(bounds); @@ -2171,7 +2245,7 @@ resizingAnnotation = NO; } } else { - resizingAnnotation = [activeAnnotation isResizable] && NSPointInRect(pagePoint, [self resizeThumbForRect:wasBounds rotation:[activePage rotation]]); + resizingAnnotation = [activeAnnotation isResizable] && NSPointInRect(pagePoint, [self resizeThumbForRect:wasBounds rotation:[page rotation]]); } } @@ -2179,15 +2253,15 @@ } - (void)dragAnnotationWithEvent:(NSEvent *)theEvent { - PDFPage *activePage = [activeAnnotation page]; + PDFPage *page = [activeAnnotation page]; NSRect newBounds; NSRect currentBounds = [activeAnnotation bounds]; - NSRect pageBounds = [activePage boundsForBox:[self displayBox]]; + NSRect pageBounds = [page boundsForBox:[self displayBox]]; if (resizingAnnotation) { NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil]; - NSPoint startPoint = [self convertPoint:[self convertPoint:mouseDownLoc fromView:nil] toPage:activePage]; - NSPoint endPt = [self convertPoint:mouseLoc toPage:activePage]; + NSPoint startPoint = [self convertPoint:[self convertPoint:mouseDownLoc fromView:nil] toPage:page]; + NSPoint endPt = [self convertPoint:mouseLoc toPage:page]; NSPoint relPoint = NSMakePoint(endPt.x - startPoint.x, endPt.y - startPoint.y); newBounds = wasBounds; @@ -2203,7 +2277,7 @@ NSPoint *draggedPoint = draggingStartPoint ? &startPoint : &endPoint; // Resize the annotation. - switch ([activePage rotation]) { + switch ([page rotation]) { case 0: draggedPoint->x += relPoint.x; draggedPoint->y += relPoint.y; @@ -2257,7 +2331,7 @@ } else { - switch ([activePage rotation]) { + switch ([page rotation]) { case 0: newBounds.origin.y += relPoint.y; newBounds.size.width += relPoint.x; @@ -2353,13 +2427,13 @@ // this should never happen, but just to be sure newBounds = wasBounds; } else { - if (newActivePage != activePage) { + if (newActivePage != page) { // move the annotation to the new page [self moveAnnotation:activeAnnotation toPage:newActivePage]; - activePage = newActivePage; + page = newActivePage; } - NSPoint endPt = [self convertPoint:mouseLoc toPage:activePage]; + NSPoint endPt = [self convertPoint:mouseLoc toPage:page]; newBounds = currentBounds; newBounds.origin.x = roundf(endPt.x - clickDelta.x); newBounds.origin.y = roundf(endPt.y - clickDelta.y); @@ -2421,6 +2495,124 @@ [[self cursorForEvent:theEvent] performSelector:@selector(set) withObject:nil afterDelay:0]; } +- (void)selectWithEvent:(NSEvent *)theEvent { + NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil]; + + PDFPage *page = [self pageForPoint:mouseLoc nearest:NO]; + + if (page == nil) { + activePage = nil; + selectionRect = NSZeroRect; + [self setNeedsDisplay:YES]; + return; + } + + NSPoint initialPoint = [self convertPoint:mouseLoc toPage:page]; + NSPoint delta; + float margin = 4.0 / [self scaleFactor]; + int xEdge = 0, yEdge = 0; + + if ([page isEqual:activePage] == NO || NSPointInRect(initialPoint, NSInsetRect(selectionRect, -margin, -margin)) == NO) { + activePage = page; + selectionRect.origin = initialPoint; + selectionRect.size = NSZeroSize; + xEdge = 1; + yEdge = 2; + [self setNeedsDisplay:YES]; + } else { + if (initialPoint.x > NSMaxX(selectionRect) - margin) + xEdge = 1; + else if (initialPoint.x < NSMinX(selectionRect) + margin) + xEdge = 2; + if (initialPoint.y > NSMaxY(selectionRect) - margin) + yEdge = 1; + else if (initialPoint.y < NSMinY(selectionRect) + margin) + yEdge = 2; + } + + delta.x = initialPoint.x - NSMinX(selectionRect); + delta.y = initialPoint.y - NSMinY(selectionRect); + + NSRect initialRect = selectionRect; + BOOL keepGoing = YES; + + if (xEdge == 0 && yEdge == 0) + [[NSCursor closedHandCursor] push]; + else + [[NSCursor crosshairCursor] push]; + + while (keepGoing) { + theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask]; + switch ([theEvent type]) { + case NSLeftMouseDragged: + { + NSPoint newPoint; + NSRect newRect = initialRect; + float xDelta, yDelta; + + newPoint = [self convertPoint:[self convertPoint:[theEvent locationInWindow] fromView:nil] toPage:page]; + xDelta = newPoint.x - initialPoint.x; + yDelta = newPoint.y - initialPoint.y; + + if (xEdge == 1) { + newRect.size.width += xDelta; + if (NSWidth(newRect) < 0.0) { + newRect.size.width = 0.0; + } + } else if (xEdge == 2) { + newRect.origin.x += xDelta; + newRect.size.width -= xDelta; + if (NSWidth(newRect) < 0.0) { + newRect.origin.x += NSWidth(newRect); + newRect.size.width = 0.0; + } + } else if (yEdge == 0) { + newRect.origin.x += xDelta; + newRect.origin.y += yDelta; + } + + if (yEdge == 1) { + newRect.size.height += yDelta; + if (NSHeight(newRect) < 0.0) { + newRect.size.height = 0.0; + } + } else if (yEdge == 2) { + newRect.origin.y += yDelta; + newRect.size.height -= yDelta; + if (NSHeight(newRect) < 0.0) { + newRect.origin.y += NSHeight(newRect); + newRect.size.height = 0.0; + } + } + + newRect = NSIntersectionRect(newRect, [activePage boundsForBox:[self displayBox]]); + [self setNeedsDisplayInRect:NSInsetRect(NSUnionRect(newRect, selectionRect), -margin, -margin) ofPage:activePage]; + selectionRect = newRect; + + break; + } + + case NSLeftMouseUp: + keepGoing = NO; + break; + + default: + /* Ignore any other kind of event. */ + break; + } // end of switch (event type) + } // end of mouse-tracking loop + + if (NSIsEmptyRect(selectionRect)) { + activePage = nil; + selectionRect = NSZeroRect; + [self setNeedsDisplay:YES]; + } + + [NSCursor pop]; + // ??? PDFView's delayed layout seems to reset the cursor to an arrow + [[self cursorForEvent:theEvent] performSelector:@selector(set) withObject:nil afterDelay:0]; +} + - (void)selectTextWithEvent:(NSEvent *)theEvent { if ([theEvent type] == NSLeftMouseDown) { @@ -2821,6 +3013,19 @@ case SKMoveToolMode: cursor = [NSCursor openHandCursor]; break; + case SKSelectToolMode: + { + float margin = 4.0 / [self scaleFactor]; + PDFPage *page = [self pageForPoint:p nearest:NO]; + p = [self convertPoint:p toPage:page]; + if ([page isEqual:activePage] == NO || NSPointInRect(p, NSInsetRect(selectionRect, -margin, -margin)) == NO) + cursor = [NSCursor crosshairCursor]; + else if (NSPointInRect(p, NSInsetRect(selectionRect, margin, margin))) + cursor = [NSCursor openHandCursor]; + else + cursor = [NSCursor arrowCursor]; + break; + } case SKMagnifyToolMode: if ([self areaOfInterestForMouse:theEvent] == kPDFNoArea) cursor = [NSCursor openHandCursor]; @@ -2863,6 +3068,17 @@ return path; } +static void SKCGContextDrawGrabHandle(CGContextRef context, CGPoint point, float radius) +{ + float white[4] = { 1.0, 1.0, 1.0, 0.7 }; + float gray[4] = { 0.5, 0.5, 0.6, 0.7 }; + CGRect outerRect = CGRectMake(point.x - radius, point.y - radius, 2.0 * radius, 2.0 * radius); + CGRect innerRect = CGRectMake(point.x - 0.75 * radius, point.y - 0.75 * radius, 1.5 * radius, 1.5 * radius); + CGContextSetFillColor(context, white); + CGContextFillEllipseInRect(context, outerRect); + CGContextSetFillColor(context, gray); + CGContextFillEllipseInRect(context, innerRect); +} @implementation PDFDocument (SKExtensions) Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-05-17 20:48:13 UTC (rev 2063) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-05-17 20:52:26 UTC (rev 2064) @@ -156,6 +156,7 @@ CEA575CE0B9206E60003D2E7 /* SKNoteOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEA575CD0B9206E60003D2E7 /* SKNoteOutlineView.m */; }; CEA575E50B9207B80003D2E7 /* SKThumbnailTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEA575E40B9207B80003D2E7 /* SKThumbnailTableView.m */; }; CEA575FD0B9208B60003D2E7 /* SKOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEA575FC0B9208B60003D2E7 /* SKOutlineView.m */; }; + CECBA5910BFCEE260030AB59 /* SelectToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CECBA5900BFCEE250030AB59 /* SelectToolAdorn.tiff */; }; CEE106150BCBB72C00BF2D3E /* SKNotesDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = CEE106140BCBB72C00BF2D3E /* SKNotesDocument.m */; }; CEE1065E0BCBBE1300BF2D3E /* NotesDocument.nib in Resources */ = {isa = PBXBuildFile; fileRef = CEE106580BCBBE1200BF2D3E /* NotesDocument.nib */; }; CEE229390BFB7CE9002B746B /* ReleaseNotes.rtf in Resources */ = {isa = PBXBuildFile; fileRef = CE54AA8E0BBC037400008750 /* ReleaseNotes.rtf */; }; @@ -280,7 +281,7 @@ 45A3BD380B4F097D002B297F /* InitialUserDefaults.plist */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; path = InitialUserDefaults.plist; sourceTree = "<group>"; }; 45B113BF0B329A7E00DE0660 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; }; - 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; A489FDBA0BC8E8D100BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/InfoWindow.nib; sourceTree = "<group>"; }; A489FDBD0BC8E8DA00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainMenu.nib; sourceTree = "<group>"; }; A489FDC00BC8E8DF00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainWindow.nib; sourceTree = "<group>"; }; @@ -470,6 +471,7 @@ CEA575E40B9207B80003D2E7 /* SKThumbnailTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKThumbnailTableView.m; sourceTree = "<group>"; }; CEA575FB0B9208B60003D2E7 /* SKOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKOutlineView.h; sourceTree = "<group>"; }; CEA575FC0B9208B60003D2E7 /* SKOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKOutlineView.m; sourceTree = "<group>"; }; + CECBA5900BFCEE250030AB59 /* SelectToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = SelectToolAdorn.tiff; path = Images/SelectToolAdorn.tiff; sourceTree = "<group>"; }; CEE106130BCBB72C00BF2D3E /* SKNotesDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SKNotesDocument.h; sourceTree = "<group>"; }; CEE106140BCBB72C00BF2D3E /* SKNotesDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SKNotesDocument.m; sourceTree = "<group>"; }; CEE106590BCBBE1200BF2D3E /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/NotesDocument.nib; sourceTree = "<group>"; }; @@ -854,6 +856,7 @@ CE15832B0BA073FF00D5B03F /* UnderlineNoteAdorn.tiff */, CE5478E40B334CAC00F8AFB6 /* MagnifyToolAdorn.tiff */, CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tiff */, + CECBA5900BFCEE250030AB59 /* SelectToolAdorn.tiff */, CE5478C30B33456300F8AFB6 /* TextToolAdorn.tiff */, CE468C390BF1F0F60007AA12 /* ArrowNoteToolAdorn.tiff */, CE468C3A0BF1F0F60007AA12 /* UnderlineNoteToolAdorn.tiff */, @@ -1088,6 +1091,7 @@ CE468C460BF1F0F60007AA12 /* SquareNoteToolAdorn.tiff in Resources */, CE468C470BF1F0F60007AA12 /* TextNoteToolAdorn.tiff in Resources */, CE468C480BF1F0F60007AA12 /* AnchoredNoteToolAdorn.tiff in Resources */, + CECBA5910BFCEE260030AB59 /* SelectToolAdorn.tiff in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ama...@us...> - 2007-05-17 20:48:45
|
Revision: 2063 http://skim-app.svn.sourceforge.net/skim-app/?rev=2063&view=rev Author: amaxwell Date: 2007-05-17 13:48:13 -0700 (Thu, 17 May 2007) Log Message: ----------- Don't copy headers Modified Paths: -------------- trunk/Skim.xcodeproj/project.pbxproj Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-05-17 20:08:55 UTC (rev 2062) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-05-17 20:48:13 UTC (rev 2063) @@ -140,11 +140,9 @@ CE5487BC0B35A20A00F8AFB6 /* NSFileManager_ExtendedAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = CE5487BB0B35A20A00F8AFB6 /* NSFileManager_ExtendedAttributes.m */; }; CE54898C0B35D4EF00F8AFB6 /* InfoWindow.nib in Resources */ = {isa = PBXBuildFile; fileRef = CE54898A0B35D4EF00F8AFB6 /* InfoWindow.nib */; }; CE54898F0B35D50E00F8AFB6 /* SKInfoWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE54898E0B35D50E00F8AFB6 /* SKInfoWindowController.m */; }; - CE5F42AE0BF89FE00069D89C /* AppleRemote.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE5F42AC0BF89FE00069D89C /* AppleRemote.h */; }; CE5F42AF0BF89FE00069D89C /* AppleRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = CE5F42AD0BF89FE00069D89C /* AppleRemote.m */; }; CE5F43730BF8A3410069D89C /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE5F42D30BF8A3400069D89C /* IOKit.framework */; }; CE67BB260BC44AC9007B6929 /* ZoomValues.strings in Resources */ = {isa = PBXBuildFile; fileRef = CE67BB240BC44AC9007B6929 /* ZoomValues.strings */; }; - CE6C03F00BEDF759007BF0B5 /* NSParagraphStyle_SKExtensions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE6C03EE0BEDF759007BF0B5 /* NSParagraphStyle_SKExtensions.h */; }; CE6C03F10BEDF759007BF0B5 /* NSParagraphStyle_SKExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE6C03EF0BEDF759007BF0B5 /* NSParagraphStyle_SKExtensions.m */; }; CE74686F0B7F3B1C00CBF969 /* ToolbarInfo.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7467330B7F2ED700CBF969 /* ToolbarInfo.tiff */; }; CE7468810B7F3C0000CBF969 /* zoomInCursor.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE7467540B7F321100CBF969 /* zoomInCursor.tiff */; }; @@ -238,8 +236,6 @@ dstSubfolderSpec = 10; files = ( CE2BD8450BD4135600A5F4DB /* Sparkle.framework in CopyFiles */, - CE6C03F00BEDF759007BF0B5 /* NSParagraphStyle_SKExtensions.h in CopyFiles */, - CE5F42AE0BF89FE00069D89C /* AppleRemote.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -284,7 +280,7 @@ 45A3BD380B4F097D002B297F /* InitialUserDefaults.plist */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; path = InitialUserDefaults.plist; sourceTree = "<group>"; }; 45B113BF0B329A7E00DE0660 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 8D15AC360486D014006FF6A4 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Info.plist; sourceTree = "<group>"; }; - 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D15AC370486D014006FF6A4 /* Skim.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = Skim.app; sourceTree = BUILT_PRODUCTS_DIR; }; A489FDBA0BC8E8D100BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/InfoWindow.nib; sourceTree = "<group>"; }; A489FDBD0BC8E8DA00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainMenu.nib; sourceTree = "<group>"; }; A489FDC00BC8E8DF00BA14DD /* Italian */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = Italian; path = Italian.lproj/MainWindow.nib; sourceTree = "<group>"; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-17 20:09:00
|
Revision: 2062 http://skim-app.svn.sourceforge.net/skim-app/?rev=2062&view=rev Author: hofman Date: 2007-05-17 13:08:55 -0700 (Thu, 17 May 2007) Log Message: ----------- Rename image Modified Paths: -------------- trunk/Skim.xcodeproj/project.pbxproj Added Paths: ----------- trunk/Images/MoveToolAdorn.tiff Removed Paths: ------------- trunk/Images/MoveToolAdorn.tif Deleted: trunk/Images/MoveToolAdorn.tif =================================================================== (Binary files differ) Copied: trunk/Images/MoveToolAdorn.tiff (from rev 2061, trunk/Images/MoveToolAdorn.tif) =================================================================== (Binary files differ) Modified: trunk/Skim.xcodeproj/project.pbxproj =================================================================== --- trunk/Skim.xcodeproj/project.pbxproj 2007-05-17 18:30:40 UTC (rev 2061) +++ trunk/Skim.xcodeproj/project.pbxproj 2007-05-17 20:08:55 UTC (rev 2062) @@ -125,7 +125,7 @@ CE5478C90B33456300F8AFB6 /* BackAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE5478B80B33456300F8AFB6 /* BackAdorn.tiff */; }; CE5478CA0B33456300F8AFB6 /* ForwardAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE5478B90B33456300F8AFB6 /* ForwardAdorn.tiff */; }; CE5478CB0B33456300F8AFB6 /* ToolbarFullScreen.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE5478BA0B33456300F8AFB6 /* ToolbarFullScreen.tiff */; }; - CE5478CD0B33456300F8AFB6 /* MoveToolAdorn.tif in Resources */ = {isa = PBXBuildFile; fileRef = CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tif */; }; + CE5478CD0B33456300F8AFB6 /* MoveToolAdorn.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tiff */; }; CE5478CE0B33456300F8AFB6 /* ToolbarNext.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE5478BD0B33456300F8AFB6 /* ToolbarNext.tiff */; }; CE5478CF0B33456300F8AFB6 /* ToolbarNotesDrawer.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE5478BE0B33456300F8AFB6 /* ToolbarNotesDrawer.tiff */; }; CE5478D10B33456300F8AFB6 /* ToolbarPrevious.tiff in Resources */ = {isa = PBXBuildFile; fileRef = CE5478C00B33456300F8AFB6 /* ToolbarPrevious.tiff */; }; @@ -433,7 +433,7 @@ CE5478B80B33456300F8AFB6 /* BackAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = BackAdorn.tiff; path = Images/BackAdorn.tiff; sourceTree = "<group>"; }; CE5478B90B33456300F8AFB6 /* ForwardAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ForwardAdorn.tiff; path = Images/ForwardAdorn.tiff; sourceTree = "<group>"; }; CE5478BA0B33456300F8AFB6 /* ToolbarFullScreen.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarFullScreen.tiff; path = Images/ToolbarFullScreen.tiff; sourceTree = "<group>"; }; - CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = MoveToolAdorn.tif; path = Images/MoveToolAdorn.tif; sourceTree = "<group>"; }; + CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = MoveToolAdorn.tiff; path = Images/MoveToolAdorn.tiff; sourceTree = "<group>"; }; CE5478BD0B33456300F8AFB6 /* ToolbarNext.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarNext.tiff; path = Images/ToolbarNext.tiff; sourceTree = "<group>"; }; CE5478BE0B33456300F8AFB6 /* ToolbarNotesDrawer.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarNotesDrawer.tiff; path = Images/ToolbarNotesDrawer.tiff; sourceTree = "<group>"; }; CE5478C00B33456300F8AFB6 /* ToolbarPrevious.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; name = ToolbarPrevious.tiff; path = Images/ToolbarPrevious.tiff; sourceTree = "<group>"; }; @@ -857,7 +857,7 @@ CE5478B70B33456300F8AFB6 /* TextNoteAdorn.tiff */, CE15832B0BA073FF00D5B03F /* UnderlineNoteAdorn.tiff */, CE5478E40B334CAC00F8AFB6 /* MagnifyToolAdorn.tiff */, - CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tif */, + CE5478BC0B33456300F8AFB6 /* MoveToolAdorn.tiff */, CE5478C30B33456300F8AFB6 /* TextToolAdorn.tiff */, CE468C390BF1F0F60007AA12 /* ArrowNoteToolAdorn.tiff */, CE468C3A0BF1F0F60007AA12 /* UnderlineNoteToolAdorn.tiff */, @@ -1032,7 +1032,7 @@ CE5478CA0B33456300F8AFB6 /* ForwardAdorn.tiff in Resources */, CE9DC2E90B9F131900D64F28 /* HighlightNoteAdorn.tiff in Resources */, CE5478E50B334CAC00F8AFB6 /* MagnifyToolAdorn.tiff in Resources */, - CE5478CD0B33456300F8AFB6 /* MoveToolAdorn.tif in Resources */, + CE5478CD0B33456300F8AFB6 /* MoveToolAdorn.tiff in Resources */, CE07158B0B8A3D6500733CC8 /* NoteDocument.icns in Resources */, CE3A42360B7927D3006B64D3 /* AnchoredNoteAdorn.tiff in Resources */, CE380C620B837B6100A1B779 /* NoteViewAdorn.tiff in Resources */, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ama...@us...> - 2007-05-17 18:30:41
|
Revision: 2061 http://skim-app.svn.sourceforge.net/skim-app/?rev=2061&view=rev Author: amaxwell Date: 2007-05-17 11:30:40 -0700 (Thu, 17 May 2007) Log Message: ----------- Allow creating PDF from TIFF, since Skim can be useful for navigating large images. Modified Paths: -------------- trunk/SKDocument.m Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-05-17 14:53:07 UTC (rev 2060) +++ trunk/SKDocument.m 2007-05-17 18:30:40 UTC (rev 2061) @@ -82,11 +82,6 @@ @implementation SKDocument -+ (void)initialize { - if (nil == SKPDFDocumentType) - SKPDFDocumentType = [NSPDFPboardType copy]; -} - - (void)dealloc { [[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKey:SKAutoCheckFileUpdateKey]; [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -530,16 +525,14 @@ autoUpdate = NO; } else { NSError *error = nil; - if ([self revertToContentsOfURL:[self fileURL] ofType:[self fileType] error:&error]) { - [changeDate release]; - } else { - [NSApp presentError:error]; + if (NO == [self revertToContentsOfURL:[self fileURL] ofType:[self fileType] error:&error]) { + [self presentError:error]; [self setLastChangedDate:changeDate]; } if (returnCode == NSAlertAlternateReturn) autoUpdate = YES; } - + [changeDate release]; [self checkFileUpdatesIfNeeded]; } @@ -874,6 +867,11 @@ @implementation SKDocumentController ++ (void)initialize { + if (nil == SKPDFDocumentType) + SKPDFDocumentType = [NSPDFPboardType copy]; +} + - (NSString *)typeFromFileExtension:(NSString *)fileExtensionOrHFSFileType { NSString *type = [super typeFromFileExtension:fileExtensionOrHFSFileType]; if ([type isEqualToString:SKEmbeddedPDFDocumentType] || [type isEqualToString:SKBarePDFDocumentType]) { @@ -884,13 +882,57 @@ return type; } +static NSData *convertTIFFDataToPDF(NSData *tiffData) +{ + // this should accept any image data types we're likely to run across, but PICT returns a zero size image + CGImageSourceRef imsrc = CGImageSourceCreateWithData((CFDataRef)tiffData, (CFDictionaryRef)[NSDictionary dictionaryWithObject:(id)kUTTypeTIFF forKey:(id)kCGImageSourceTypeIdentifierHint]); + + NSMutableData *pdfData = nil; + + if (CGImageSourceGetCount(imsrc)) { + CGImageRef cgImage = CGImageSourceCreateImageAtIndex(imsrc, 0, NULL); + + pdfData = [NSMutableData dataWithCapacity:[tiffData length]]; + CGDataConsumerRef consumer = CGDataConsumerCreateWithCFData((CFMutableDataRef)pdfData); + + // create full size image, assuming pixel == point + const CGRect rect = CGRectMake(0, 0, CGImageGetWidth(cgImage), CGImageGetHeight(cgImage)); + + CGContextRef ctxt = CGPDFContextCreate(consumer, &rect, NULL); + CGPDFContextBeginPage(ctxt, NULL); + CGContextDrawImage(ctxt, rect, cgImage); + CGPDFContextEndPage(ctxt); + + CGContextFlush(ctxt); + + CGDataConsumerRelease(consumer); + CGContextRelease(ctxt); + CGImageRelease(cgImage); + } + + CFRelease(imsrc); + + return pdfData; +} + - (void)newDocumentFromClipboard:(id)sender { - NSString *pboardType = [[NSPasteboard generalPasteboard] availableTypeFromArray:[NSArray arrayWithObjects:NSPDFPboardType, NSPostScriptPboardType, nil]]; + + // allow any filter services to convert to TIFF data if we can't get PDF or PS directly + NSPasteboard *pboard = [NSPasteboard pasteboardByFilteringTypesInPasteboard:[NSPasteboard generalPasteboard]]; + NSString *pboardType = [pboard availableTypeFromArray:[NSArray arrayWithObjects:NSPDFPboardType, NSPostScriptPboardType, NSTIFFPboardType, nil]]; if (nil == pboardType) { NSBeep(); return; } - NSData *data = [[NSPasteboard generalPasteboard] dataForType:pboardType]; + + NSData *data = [pboard dataForType:pboardType]; + + // if it's image data, convert to PDF, then explicitly set the pboard type to PDF + if ([pboardType isEqualToString:NSTIFFPboardType]) { + data = convertTIFFDataToPDF(data); + pboardType = NSPDFPboardType; + } + NSString *type = [pboardType isEqualToString:NSPostScriptPboardType] ? SKPostScriptDocumentType : SKPDFDocumentType; NSError *error = nil; id document = [self makeUntitledDocumentOfType:type error:&error]; @@ -906,8 +948,8 @@ - (BOOL)validateUserInterfaceItem:(id <NSValidatedUserInterfaceItem>)anItem { if ([anItem action] == @selector(newDocumentFromClipboard:)) { - NSPasteboard *pboard = [NSPasteboard generalPasteboard]; - return ([[pboard types] containsObject:NSPDFPboardType] || [[pboard types] containsObject:NSPostScriptPboardType]); + NSPasteboard *pboard = [NSPasteboard pasteboardByFilteringTypesInPasteboard:[NSPasteboard generalPasteboard]]; + return ([[pboard types] firstObjectCommonWithArray:[NSArray arrayWithObjects:NSPDFPboardType, NSPostScriptPboardType, NSTIFFPboardType, nil]] != nil); } else if ([super respondsToSelector:_cmd]) { return [super validateUserInterfaceItem:anItem]; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-17 14:53:08
|
Revision: 2060 http://skim-app.svn.sourceforge.net/skim-app/?rev=2060&view=rev Author: hofman Date: 2007-05-17 07:53:07 -0700 (Thu, 17 May 2007) Log Message: ----------- Scroll to previous location when reloading pdf. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-05-17 11:49:41 UTC (rev 2059) +++ trunk/SKMainWindowController.m 2007-05-17 14:53:07 UTC (rev 2060) @@ -470,12 +470,12 @@ if ([pdfView document] != document) { - PDFDestination *dest; unsigned pageIndex = NSNotFound; + NSRect visibleRect = NSZeroRect; if ([pdfView document]) { - dest = [pdfView currentDestination]; pageIndex = [[pdfView document] indexForPage:[pdfView currentPage]]; + visibleRect = [pdfView convertRect:[pdfView convertRect:[[pdfView documentView] visibleRect] fromView:[pdfView documentView]] toPage:[pdfView currentPage]]; } // these will be invalid. If needed, the document will restore them @@ -512,8 +512,12 @@ [self updateThumbnailSelection]; if (pageIndex != NSNotFound && [document pageCount]) { - PDFPage *page = [document pageAtIndex:MIN(pageIndex, [document pageCount])]; - [pdfView performSelector:@selector(goToPage:) withObject:page afterDelay:0.0]; + PDFPage *page = [document pageAtIndex:MIN(pageIndex, [document pageCount] - 1)]; + [pdfView goToPage:page]; + [[pdfView window] disableFlushWindow]; + [pdfView display]; + [[pdfView documentView] scrollRectToVisible:[pdfView convertRect:[pdfView convertRect:visibleRect fromPage:page] toView:[pdfView documentView]]]; + [[pdfView window] enableFlushWindow]; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ho...@us...> - 2007-05-17 11:49:45
|
Revision: 2059 http://skim-app.svn.sourceforge.net/skim-app/?rev=2059&view=rev Author: hofman Date: 2007-05-17 04:49:41 -0700 (Thu, 17 May 2007) Log Message: ----------- Simplify some code. Fix rounding of arrow locations. Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2007-05-17 10:12:21 UTC (rev 2058) +++ trunk/SKPDFView.m 2007-05-17 11:49:41 UTC (rev 2059) @@ -1825,11 +1825,11 @@ } else if (eventChar == NSLeftArrowFunctionKey) { endPoint.y -= delta; if (endPoint.y < NSMinY(pageBounds)) - endPoint.y = NSMinY(pageBounds); + endPoint.y = NSMinY(pageBounds) + 0.5; } else if (eventChar == NSUpArrowFunctionKey) { endPoint.x -= delta; if (endPoint.x < NSMinX(pageBounds)) - endPoint.x = NSMinX(pageBounds); + endPoint.x = NSMinX(pageBounds) + 0.5; } else if (eventChar == NSDownArrowFunctionKey) { endPoint.x += delta; if (endPoint.x > NSMaxX(pageBounds)) @@ -2200,70 +2200,38 @@ startPoint = wasStartPoint; startPoint.x += NSMinX(wasBounds); startPoint.y += NSMinY(wasBounds); + NSPoint *draggedPoint = draggingStartPoint ? &startPoint : &endPoint; // Resize the annotation. switch ([activePage rotation]) { case 0: - if (draggingStartPoint) { - startPoint.x += relPoint.x; - startPoint.y += relPoint.y; - } else { - endPoint.x += relPoint.x; - endPoint.y += relPoint.y; - } + draggedPoint->x += relPoint.x; + draggedPoint->y += relPoint.y; break; case 90: - if (draggingStartPoint) { - startPoint.x += relPoint.y; - startPoint.y -= relPoint.x; - } else { - endPoint.x += relPoint.y; - endPoint.y -= relPoint.x; - } + draggedPoint->x += relPoint.y; + draggedPoint->y -= relPoint.x; break; case 180: - if (draggingStartPoint) { - startPoint.x -= relPoint.x; - startPoint.y -= relPoint.y; - } else { - endPoint.x -= relPoint.x; - endPoint.y -= relPoint.y; - } + draggedPoint->x -= relPoint.x; + draggedPoint->y -= relPoint.y; break; case 270: - if (draggingStartPoint) { - startPoint.x -= relPoint.y; - startPoint.y += relPoint.x; - } else { - endPoint.x -= relPoint.y; - endPoint.y += relPoint.x; - } + draggedPoint->x -= relPoint.y; + draggedPoint->y += relPoint.x; break; } - if (draggingStartPoint) { - if (startPoint.x > NSMaxX(pageBounds)) - startPoint.x = NSMaxX(pageBounds) - 0.5; - else if (startPoint.x < NSMinX(pageBounds)) - startPoint.x = NSMinX(pageBounds) + 0.5; - if (startPoint.y > NSMaxY(pageBounds)) - startPoint.y = NSMaxY(pageBounds) - 0.5; - else if (startPoint.y < NSMinY(pageBounds)) - startPoint.y = NSMinY(pageBounds) + 0.5; - startPoint.x = floorf(startPoint.x) + 0.5; - startPoint.y = floorf(startPoint.y) + 0.5; - } else { - if (endPoint.x > NSMaxX(pageBounds)) - endPoint.x = NSMaxX(pageBounds) - 0.5; - else if (endPoint.x < NSMinX(pageBounds)) - endPoint.x = NSMinX(pageBounds) + 0.5; - if (endPoint.y > NSMaxY(pageBounds)) - endPoint.y = NSMaxY(pageBounds) - 0.5; - else if (endPoint.y < NSMinY(pageBounds)) - endPoint.y = NSMinY(pageBounds) + 0.5; - endPoint.x = floorf(endPoint.x) + 0.5; - endPoint.y = floorf(endPoint.y) + 0.5; - } + if (draggedPoint->x > NSMaxX(pageBounds)) + draggedPoint->x = NSMaxX(pageBounds) - 0.5; + else if (draggedPoint->x < NSMinX(pageBounds)) + draggedPoint->x = NSMinX(pageBounds) + 0.5; + if (draggedPoint->y > NSMaxY(pageBounds)) + draggedPoint->y = NSMaxY(pageBounds) - 0.5; + else if (draggedPoint->y < NSMinY(pageBounds)) + draggedPoint->y = NSMinY(pageBounds) + 0.5; + draggedPoint->x = floorf(draggedPoint->x) + 0.5; + draggedPoint->y = floorf(draggedPoint->y) + 0.5; newBounds.origin.x = floorf(fmin(startPoint.x, endPoint.x)); newBounds.size.width = ceilf(fmax(endPoint.x, startPoint.x)) - NSMinX(newBounds); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |