[Bibdesk-commit] 合作项目
尊敬的财务负责人: 您好! 因我公司享有国家优惠政策,纳税率底于一般纳税公司。为了贵公司的利益得到提高,更能方便、 快捷的开到税务发票,现长期对外代开发票,贵公司如有下列情况需要可一一为您效劳: 一、 公司做帐、进、出口差额的; 二、 客户压低货价、利润微薄的; 三、 采购时需要正式票据报销的; 四、 其它涉税项目的。 我们以金额大小收费: 一、 商品销售发票(1%--2%) 二、 增殖税专用发票(4%--7%) 三、 运输、广告、其它服务(1%--2%) 四、 海关缴款书(3%--5%) 专业代理进出口报关,代办产地证:FA/CO,及大使馆加签,代办商检,植检,熏蒸证。提供通关单证。如有不祥欢迎电来邮咨询! 祝:生意兴隆达三江! 财源广进永不停! 注:请保留以备后用! 联系电话:(0)13713769387 邮 [EMAIL PROTECTED] 联 系 人: 张先生 - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12140] trunk/bibdesk
Revision: 12140 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12140view=rev Author: hofman Date: 2007-12-31 04:20:07 -0800 (Mon, 31 Dec 2007) Log Message: --- Display red paperclip for missing linked files. Modified Paths: -- trunk/bibdesk/BibItem.m trunk/bibdesk/NSImage_BDSKExtensions.h trunk/bibdesk/NSImage_BDSKExtensions.m Modified: trunk/bibdesk/BibItem.m === --- trunk/bibdesk/BibItem.m 2007-12-31 07:17:55 UTC (rev 12139) +++ trunk/bibdesk/BibItem.m 2007-12-31 12:20:07 UTC (rev 12140) @@ -1365,11 +1365,14 @@ }else if([field isEqualToString:BDSKRelevanceString]){ return [NSNumber numberWithFloat:[self searchScore]]; }else if([field isEqualToString:BDSKLocalFileString]){ -unsigned count = [[self localFiles] count]; +NSArray *localFiles = [self localFiles]; +unsigned count = [localFiles count]; +BOOL hasMissingFile = count [[localFiles valueForKey:@URL] containsObject:[NSNull null]]; NSDictionary *cellDictionary = nil; if (count 0) { NSString *label = 1 == count ? NSLocalizedString(@1 item, @) : [NSString stringWithFormat:NSLocalizedString(@%d items, @), count]; -cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:[NSImage paperclipImage], OATextWithIconCellImageKey, label, OATextWithIconCellStringKey, nil]; +NSImage *image = hasMissingFile ? [NSImage redPaperclipImage] : [NSImage paperclipImage]; +cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:image, OATextWithIconCellImageKey, label, OATextWithIconCellStringKey, nil]; } return cellDictionary; }else if([field isEqualToString:BDSKRemoteURLString]){ Modified: trunk/bibdesk/NSImage_BDSKExtensions.h === --- trunk/bibdesk/NSImage_BDSKExtensions.h 2007-12-31 07:17:55 UTC (rev 12139) +++ trunk/bibdesk/NSImage_BDSKExtensions.h 2007-12-31 12:20:07 UTC (rev 12140) @@ -49,6 +49,7 @@ + (NSImage *)imageForURL:(NSURL *)aURL; + (NSImage *)imageForFile:(NSString *)path; + (NSImage *)paperclipImage; ++ (NSImage *)redPaperclipImage; - (NSImage *)imageFlippedHorizontally; - (NSImage *)highlightedImage; Modified: trunk/bibdesk/NSImage_BDSKExtensions.m === --- trunk/bibdesk/NSImage_BDSKExtensions.m 2007-12-31 07:17:55 UTC (rev 12139) +++ trunk/bibdesk/NSImage_BDSKExtensions.m 2007-12-31 12:20:07 UTC (rev 12140) @@ -186,52 +186,65 @@ return image != [NSNull null] ? image : nil; } +static inline NSImage *createPaperclipImageWithColor(NSColor *color) { +NSSize size = NSMakeSize(32, 32); +NSImage *image = [[NSImage alloc] initWithSize:size]; +[image setBackgroundColor:[NSColor clearColor]]; + +NSBezierPath *path = [NSBezierPath bezierPath]; +[image lockFocus]; + +// I started out with the idea of making this resolution-independent and scaling to an arbitrary size, but transforming the points was too annoying. I started out with a 1x1 grid subdivided into 0.125 ticks in OmniGraffle and drew a paperclip using lines and semicircles. The path coordinates were taken directly from that graffle diagram, and the transform and line width were adjusted by trial and error. +NSAffineTransform *t = [NSAffineTransform transform]; +[t rotateByDegrees:-35]; +[t translateXBy:0 yBy:10]; +[t scaleXBy:2 yBy:2]; +[t concat]; +[path setLineWidth:0.5]; + +// start at the outside (right) and work inward +[path moveToPoint:NSMakePoint(4, 8)]; +[path lineToPoint:NSMakePoint(4, 2)]; + +NSPoint center = NSMakePoint(2, 2); +CGFloat radius = [path currentPoint].x - center.x; +[path appendBezierPathWithArcWithCenter:center radius:radius startAngle:0 endAngle:180 clockwise:YES]; +[path lineToPoint:NSMakePoint(0, 10)]; + +center = NSMakePoint(1.5, 10); +radius = center.x - [path currentPoint].x; +[path appendBezierPathWithArcWithCenter:center radius:radius startAngle:180 endAngle:0 clockwise:YES]; +[path lineToPoint:NSMakePoint(3, 4)]; + +center = NSMakePoint(2, 4); +radius = [path currentPoint].x - center.x; +[path appendBezierPathWithArcWithCenter:center radius:radius startAngle:0 endAngle:180 clockwise:YES]; +[path lineToPoint:NSMakePoint(1, 8)]; + +[color setStroke]; +[path stroke]; + +[image unlockFocus]; + +return image; +} + + (NSImage *)paperclipImage; { static NSImage *image = nil; -if(image == nil){ -NSSize size = NSMakeSize(32, 32); -image = [[NSImage alloc] initWithSize:size]; -[image setBackgroundColor:[NSColor clearColor]]; - -NSBezierPath *path = [NSBezierPath bezierPath]; -[image lockFocus]; - -
[Bibdesk-commit] SF.net SVN: bibdesk: [12141] trunk/bibdesk/Info.plist
Revision: 12141 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12141view=rev Author: hofman Date: 2007-12-31 04:28:06 -0800 (Mon, 31 Dec 2007) Log Message: --- Larger default column width for Local File, so it fits the text in the default font. Also set default column width for Remote URL. Modified Paths: -- trunk/bibdesk/Info.plist Modified: trunk/bibdesk/Info.plist === --- trunk/bibdesk/Info.plist2007-12-31 12:20:07 UTC (rev 12140) +++ trunk/bibdesk/Info.plist2007-12-31 12:28:06 UTC (rev 12141) @@ -950,13 +950,15 @@ keyLocal-Url/key real18/real keyLocal File/key -real50/real +real70/real keyPublication Date/key real40/real keyRating/key real70/real keyRead/key real30/real +keyRemote URL/key +real70/real keyTitle/key real300/real keyUrl/key This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12142] trunk/bibdesk
Revision: 12142 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12142view=rev Author: hofman Date: 2007-12-31 04:49:29 -0800 (Mon, 31 Dec 2007) Log Message: --- Change enum to simplify some code. Modified Paths: -- trunk/bibdesk/BDSKCondition.h trunk/bibdesk/BDSKConditionController.m Modified: trunk/bibdesk/BDSKCondition.h === --- trunk/bibdesk/BDSKCondition.h 2007-12-31 12:28:06 UTC (rev 12141) +++ trunk/bibdesk/BDSKCondition.h 2007-12-31 12:49:29 UTC (rev 12142) @@ -80,11 +80,11 @@ enum { BDSKDateField, +BDSKLinkedField, +BDSKStringField, BDSKBooleanField, BDSKTriStateField, -BDSKRatingField, -BDSKLinkedField, -BDSKStringField +BDSKRatingField }; @interface BDSKCondition : NSObject NSCopying, NSCoding { Modified: trunk/bibdesk/BDSKConditionController.m === --- trunk/bibdesk/BDSKConditionController.m 2007-12-31 12:28:06 UTC (rev 12141) +++ trunk/bibdesk/BDSKConditionController.m 2007-12-31 12:49:29 UTC (rev 12142) @@ -297,14 +297,10 @@ NSString *newValue = [change objectForKey:NSKeyValueChangeNewKey]; int oldFieldType = [oldValue fieldType]; int newFieldType = [newValue fieldType]; -int oldComparisonType = oldFieldType == BDSKDateField ? 0 : oldFieldType == BDSKLinkedField ? 1 : 2; -int newComparisonType = newFieldType == BDSKDateField ? 0 : newFieldType == BDSKLinkedField ? 1 : 2; -if(oldComparisonType != newComparisonType){ +if(MIN(oldFieldType, BDSKStringField) != MIN(newFieldType, BDSKStringField)) [self layoutComparisonControls]; -} -if(oldFieldType != newFieldType){ +if(oldFieldType != newFieldType) [self layoutValueControls]; -} [[undoManager prepareWithInvocationTarget:condition] setKey:oldValue]; } else if ([keyPath isEqualToString:@dateComparison]) { [self layoutValueControls]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12144] trunk/bibdesk_vendorsrc/amaxwell/FileView/ FileView.m
Revision: 12144 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12144view=rev Author: hofman Date: 2007-12-31 07:26:30 -0800 (Mon, 31 Dec 2007) Log Message: --- Extend iconrect for redisplay, as the shadow can extend outside the rect. Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m2007-12-31 13:20:18 UTC (rev 12143) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m2007-12-31 15:26:30 UTC (rev 12144) @@ -1261,7 +1261,7 @@ NSUInteger r, c; // should always succeed if ([self _getGridRow:r column:c atPoint:_leftArrowFrame.origin]) -[self setNeedsDisplayInRect:[self _rectOfIconInRow:r column:c]]; +[self setNeedsDisplayInRect:NSInsetRect([self _rectOfIconInRow:r column:c], -8.0, -8.0)]; } - (void)rightArrowAction:(id)sender @@ -1272,7 +1272,7 @@ NSUInteger r, c; // should always succeed if ([self _getGridRow:r column:c atPoint:_rightArrowFrame.origin]) -[self setNeedsDisplayInRect:[self _rectOfIconInRow:r column:c]]; +[self setNeedsDisplayInRect:NSInsetRect([self _rectOfIconInRow:r column:c], -8.0, -8.0)]; } - (BOOL)_hasArrows { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12145] trunk/bibdesk
Revision: 12145 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12145view=rev Author: hofman Date: 2007-12-31 08:01:00 -0800 (Mon, 31 Dec 2007) Log Message: --- Add a template accessor to sort an array of publications by author. Modified Paths: -- trunk/bibdesk/NSArray_BDSKExtensions.h trunk/bibdesk/NSArray_BDSKExtensions.m Modified: trunk/bibdesk/NSArray_BDSKExtensions.h === --- trunk/bibdesk/NSArray_BDSKExtensions.h 2007-12-31 15:26:30 UTC (rev 12144) +++ trunk/bibdesk/NSArray_BDSKExtensions.h 2007-12-31 16:01:00 UTC (rev 12145) @@ -58,6 +58,7 @@ - (NSArray *)firstSixObjects; - (NSArray *)arrayDroppingFirstObject; - (NSArray *)arrayDroppingLastObject; +- (NSArray *)arraySortedByAuthor; - (NSIndexSet *)indexesOfObjects:(NSArray *)objects; - (NSIndexSet *)indexesOfObjectsIdenticalTo:(NSArray *)objects; - (NSArray *)objectsAtIndexSpecifiers:(NSArray *)indexes; Modified: trunk/bibdesk/NSArray_BDSKExtensions.m === --- trunk/bibdesk/NSArray_BDSKExtensions.m 2007-12-31 15:26:30 UTC (rev 12144) +++ trunk/bibdesk/NSArray_BDSKExtensions.m 2007-12-31 16:01:00 UTC (rev 12145) @@ -37,6 +37,7 @@ */ #import NSArray_BDSKExtensions.h +#import BDSKTableSortDescriptor.h @implementation NSArray (BDSKExtensions) @@ -126,6 +127,11 @@ return [self count] ? [self subarrayWithRange:NSMakeRange(0, [self count] - 1)] : self; } +- (NSArray *)arraySortedByAuthor; +{ +return [self sortedArrayUsingDescriptors:[NSArray arrayWithObjects:[BDSKTableSortDescriptor tableSortDescriptorForIdentifier:BDSKAuthorString ascending:YES], nil]]; +} + - (NSArray *)objectsAtIndexSpecifiers:(NSArray *)indexes; { NSMutableArray *array = [NSMutableArray array]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12146] trunk/bibdesk_vendorsrc/amaxwell/FileView
Revision: 12146 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12146view=rev Author: amaxwell Date: 2007-12-31 08:42:10 -0800 (Mon, 31 Dec 2007) Log Message: --- Fix an assertion failure that showed up in a crash log: -[FVFinderIcon initWithURLScheme:] was being passed a URL with a nil scheme. Return missing file icon in that case. Move the check for http into the webview subclass, since it may be changed in future, and the web icon does the right thing with schemes it doesn't understand. Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m 2007-12-31 16:01:00 UTC (rev 12145) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVIcon.m 2007-12-31 16:42:10 UTC (rev 12146) @@ -115,15 +115,14 @@ // CFURLGetFSRef won't like a nil URL NSParameterAssert(nil != representedURL); -if ([representedURL isEqual:missingFileURL]) { +NSString *scheme = [representedURL scheme]; + +// initWithURLScheme requires a scheme, so there's not much we can do without it +if ([representedURL isEqual:missingFileURL] || nil == scheme) { return [[[FVFinderIcon allocWithZone:[self zone]] initWithFinderIconOfURL:nil] autorelease]; } else if (NO == [representedURL isFileURL]) { -NSString *scheme = [representedURL scheme]; -if ([scheme isEqualToString:@http]) -return [[[FVWebViewIcon allocWithZone:[self zone]] initWithURL:representedURL] autorelease]; -else -return [[[FVFinderIcon allocWithZone:[self zone]] initWithURLScheme:scheme] autorelease]; +return [[[FVWebViewIcon allocWithZone:[self zone]] initWithURL:representedURL] autorelease]; } OSStatus err = noErr; Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2007-12-31 16:01:00 UTC (rev 12145) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2007-12-31 16:42:10 UTC (rev 12146) @@ -51,11 +51,11 @@ } - (id)initWithURL:(NSURL *)aURL; -{ -NSParameterAssert([[aURL scheme] isEqualToString:@http]); +{ +NSParameterAssert(nil != [aURL scheme] NO == [aURL isFileURL]); -// if this is disabled, return a finder icon instead -if (FVWebIconDisabled) { +// if this is disabled or not an http URL, return a finder icon instead +if (FVWebIconDisabled || NO == [[aURL scheme] isEqualToString:@http]) { NSZone *zone = [self zone]; [self release]; self = [[FVFinderIcon allocWithZone:zone] initWithURLScheme:[aURL scheme]]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12148] trunk/bibdesk/BDSKSortCommand.m
Revision: 12148 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12148view=rev Author: amaxwell Date: 2007-12-31 09:07:25 -0800 (Mon, 31 Dec 2007) Log Message: --- fix warning Modified Paths: -- trunk/bibdesk/BDSKSortCommand.m Modified: trunk/bibdesk/BDSKSortCommand.m === --- trunk/bibdesk/BDSKSortCommand.m 2007-12-31 16:44:29 UTC (rev 12147) +++ trunk/bibdesk/BDSKSortCommand.m 2007-12-31 17:07:25 UTC (rev 12148) @@ -42,7 +42,7 @@ @implementation BDSKSortCommand -static normalizedKey(NSString *key) { +static NSString *normalizedKey(NSString *key) { static NSArray *specialKeys = nil; if (specialKeys == nil) { specialKeys = [[NSMutableArray alloc] initWithObjects: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12150] trunk/bibdesk_vendorsrc/amaxwell/FileView
Revision: 12150 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12150view=rev Author: hofman Date: 2007-12-31 10:02:04 -0800 (Mon, 31 Dec 2007) Log Message: --- Import headers for linked frameworks in implementation file, otherwise we cannot import FVPreviewer when linking to Tiger. Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.h trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.h === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.h 2007-12-31 17:23:34 UTC (rev 12149) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.h 2007-12-31 18:02:04 UTC (rev 12150) @@ -37,11 +37,8 @@ */ #import Cocoa/Cocoa.h -#import Quartz/Quartz.h -#import QTKit/QTKit.h -#import WebKit/WebKit.h [EMAIL PROTECTED] FVScaledImageView; [EMAIL PROTECTED] FVScaledImageView, QTMovieView, PDFView, WebView; @interface FVPreviewer : NSWindowController { IBOutlet QTMovieView *movieView; Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m 2007-12-31 17:23:34 UTC (rev 12149) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPreviewer.m 2007-12-31 18:02:04 UTC (rev 12150) @@ -38,6 +38,9 @@ #import FVPreviewer.h #import FVScaledImageView.h +#import Quartz/Quartz.h +#import QTKit/QTKit.h +#import WebKit/WebKit.h @implementation FVPreviewer This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12151] trunk/bibdesk/BDSKEditor.m
Revision: 12151 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12151view=rev Author: hofman Date: 2007-12-31 10:04:32 -0800 (Mon, 31 Dec 2007) Log Message: --- Use consistent menu title. Modified Paths: -- trunk/bibdesk/BDSKEditor.m Modified: trunk/bibdesk/BDSKEditor.m === --- trunk/bibdesk/BDSKEditor.m 2007-12-31 18:02:04 UTC (rev 12150) +++ trunk/bibdesk/BDSKEditor.m 2007-12-31 18:04:32 UTC (rev 12151) @@ -1081,7 +1081,7 @@ atIndex:++i]; [item setRepresentedObject:[NSNumber numberWithUnsignedInt:anIndex]]; -item = [menu insertItemWithTitle:NSLocalizedString(@Auto File,@Menu item title) +item = [menu insertItemWithTitle:NSLocalizedString(@Consolidate,@Menu item title) action:@selector(consolidateLinkedFiles:) keyEquivalent:@ atIndex:++i]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12154] trunk/bibdesk/Bibdesk_Prefix.pch
Revision: 12154 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12154view=rev Author: amaxwell Date: 2007-12-31 10:18:49 -0800 (Mon, 31 Dec 2007) Log Message: --- Check and set NSINTEGER_DEFINED, use typedef instead of define for types. Modified Paths: -- trunk/bibdesk/Bibdesk_Prefix.pch Modified: trunk/bibdesk/Bibdesk_Prefix.pch === --- trunk/bibdesk/Bibdesk_Prefix.pch2007-12-31 18:17:51 UTC (rev 12153) +++ trunk/bibdesk/Bibdesk_Prefix.pch2007-12-31 18:18:49 UTC (rev 12154) @@ -40,12 +40,18 @@ #if !defined(MAC_OS_X_VERSION_10_5) || (MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_10_5) #ifndef NSAppKitVersionNumber10_4 -#define NSUInteger unsigned -#define NSInteger int -#define CGFloat float #define NSAppKitVersionNumber10_4 824 #endif +#ifndef NSINTEGER_DEFINED +typedef int NSInteger; +typedef unsigned int NSUInteger; +typedef float CGFloat; +#define NSIntegerMax INT_MAX +#define NSUIntegerMax UINT_MAX +#define NSINTEGER_DEFINED 1 +#endif + enum { // An empty area, or did not hit in the cell NSCellHitNone = 0, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12153] trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/ objc.h
Revision: 12153 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12153view=rev Author: amaxwell Date: 2007-12-31 10:17:51 -0800 (Mon, 31 Dec 2007) Log Message: --- use guard macro to avoid redefinition Modified Paths: -- trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h Modified: trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h === --- trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h 2007-12-31 18:17:16 UTC (rev 12152) +++ trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h 2007-12-31 18:17:51 UTC (rev 12153) @@ -17,8 +17,13 @@ #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5 // New types for Leopard; don't explode if they leak into the frameworks early +#ifndef NSINTEGER_DEFINED typedef int NSInteger; typedef unsigned int NSUInteger; +#define NSIntegerMax INT_MAX +#define NSUIntegerMax UINT_MAX +#define NSINTEGER_DEFINED 1 +#endif #import OmniBase/assertions.h #import stdlib.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12152] trunk/bibdesk_vendorsrc/amaxwell/FileView/ FileView.h
Revision: 12152 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12152view=rev Author: amaxwell Date: 2007-12-31 10:17:16 -0800 (Mon, 31 Dec 2007) Log Message: --- use typedef instead of define, set NSINTEGER_DEFINED to avoid redefinition Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h2007-12-31 18:04:32 UTC (rev 12151) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h2007-12-31 18:17:16 UTC (rev 12152) @@ -40,10 +40,11 @@ // define here, since this is the only public header for the project #ifndef NSINTEGER_DEFINED -#define NSUInteger unsigned -#define NSInteger int -#define CGFloat float +typedef int NSInteger; +typedef unsigned int NSUInteger; +typedef float CGFloat; #define NSIntegerMax INT_MAX +#define NSINTEGER_DEFINED 1 #endif #ifndef NSAppKitVersionNumber10_4 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12155] trunk/bibdesk/Bibdesk_Prefix.pch
Revision: 12155 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12155view=rev Author: amaxwell Date: 2007-12-31 10:33:25 -0800 (Mon, 31 Dec 2007) Log Message: --- Add guard for CGFloat as well. Modified Paths: -- trunk/bibdesk/Bibdesk_Prefix.pch Modified: trunk/bibdesk/Bibdesk_Prefix.pch === --- trunk/bibdesk/Bibdesk_Prefix.pch2007-12-31 18:18:49 UTC (rev 12154) +++ trunk/bibdesk/Bibdesk_Prefix.pch2007-12-31 18:33:25 UTC (rev 12155) @@ -43,15 +43,25 @@ #define NSAppKitVersionNumber10_4 824 #endif +// From NSObjCRuntime.h #ifndef NSINTEGER_DEFINED typedef int NSInteger; typedef unsigned int NSUInteger; -typedef float CGFloat; -#define NSIntegerMax INT_MAX -#define NSUIntegerMax UINT_MAX +#define NSIntegerMaxLONG_MAX +#define NSIntegerMinLONG_MIN +#define NSUIntegerMax ULONG_MAX #define NSINTEGER_DEFINED 1 -#endif +#endif /* NSINTEGER_DEFINED */ +// From CGBase.h +#ifndefCGFLOAT_DEFINED +typedef float CGFloat; +#define CGFLOAT_MIN FLT_MIN +#define CGFLOAT_MAX FLT_MAX +#define CGFLOAT_IS_DOUBLE 0 +#define CGFLOAT_DEFINED 1 +#endif /* CGFLOAT_DEFINED */ + enum { // An empty area, or did not hit in the cell NSCellHitNone = 0, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12158] trunk/bibdesk
Revision: 12158 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12158view=rev Author: hofman Date: 2007-12-31 10:37:59 -0800 (Mon, 31 Dec 2007) Log Message: --- Add Quick Look action to document and editor. Add menu items in contextual menus and main menu, with shortcut Cmd-Y. Modified Paths: -- trunk/bibdesk/BDSKEditor.h trunk/bibdesk/BDSKEditor.m trunk/bibdesk/BibDocument+Menus.m trunk/bibdesk/BibDocument_Actions.h trunk/bibdesk/BibDocument_Actions.m trunk/bibdesk/BibDocument_DataSource.m trunk/bibdesk/English.lproj/MainMenu.nib/classes.nib trunk/bibdesk/English.lproj/MainMenu.nib/keyedobjects.nib Modified: trunk/bibdesk/BDSKEditor.h === --- trunk/bibdesk/BDSKEditor.h 2007-12-31 18:34:22 UTC (rev 12157) +++ trunk/bibdesk/BDSKEditor.h 2007-12-31 18:37:59 UTC (rev 12158) @@ -209,6 +209,8 @@ - (IBAction)copyNotesForLinkedFile:(id)sender; +- (IBAction)previewAction:(id)sender; + /*! @method updateSafariRecentDownloadsMenu: @abstract Updates the menu of items for local paths of recent downloads from Safari. Modified: trunk/bibdesk/BDSKEditor.m === --- trunk/bibdesk/BDSKEditor.m 2007-12-31 18:34:22 UTC (rev 12157) +++ trunk/bibdesk/BDSKEditor.m 2007-12-31 18:37:59 UTC (rev 12158) @@ -81,6 +81,7 @@ #import NSObject_BDSKExtensions.h #import BDSKEditorTableView.h #import BDSKEditorTextFieldCell.h +#import FileView/FVPreviewer.h static NSString *BDSKEditorFrameAutosaveName = @BDSKEditor window autosave name; @@ -461,6 +462,21 @@ } } +- (IBAction)previewAction:(id)sender { +NSURL *theURL = [sender representedObject]; +if (theURL == nil) { +NSArray *theURLs = [publication valueForKeyPath:@localFiles.URL]; +if ([theURLs count]) +theURL = [theURLs firstObject]; +else +theURL = [[publication valueForKeyPath:@remoteURLs.URL] firstObject]; +} +if (theURL [theURL isEqual:[NSNull null]] == NO) { +[FVPreviewer setWebViewContextMenuDelegate:self]; +[FVPreviewer previewURL:theURL]; +} +} + - (IBAction)showCiteKeyWarning:(id)sender{ if ([publication hasEmptyOrDefaultCiteKey]) { NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@Cite Key Not Set, @Message in alert dialog when duplicate citye key was found) @@ -1370,6 +1386,9 @@ else if (theAction == @selector(copyNotesForLinkedFile:)) { return [menuItem representedObject] != nil || [[publication valueForKey:@linkedFiles] count] 0; } + else if (theAction == @selector(previewAction:)) { + return [menuItem representedObject] != nil || [[publication valueForKey:@linkedFiles] count] + [[publication valueForKey:@linkedURLs] count] == 1; + } else if (theAction == @selector(editSelectedFieldAsRawBibTeX:)) { if (isEditable == NO) return NO; Modified: trunk/bibdesk/BibDocument+Menus.m === --- trunk/bibdesk/BibDocument+Menus.m 2007-12-31 18:34:22 UTC (rev 12157) +++ trunk/bibdesk/BibDocument+Menus.m 2007-12-31 18:37:59 UTC (rev 12158) @@ -257,6 +257,11 @@ return ([menuItem representedObject] != nil || [[self selectedFileURLs] count] 0); } +- (BOOL) validatePreviewMenuItem:(NSMenuItem*) menuItem { +return ([menuItem representedObject] != nil || +[[self selectedFileURLs] count] + [[[self selectedPublications] valueForKeyPath:@@unionOfArrays.remoteURLs] count]); +} + - (BOOL) validateDuplicateTitleToBooktitleMenuItem:(NSMenuItem*) menuItem { return ([self numberOfSelectedPubs] 0 [self hasExternalGroupsSelected] == NO); } @@ -700,6 +705,9 @@ else if(act == @selector(copyNotesForLinkedFile:)) { return [self validateCopyNotesForLinkedFileMenuItem:menuItem]; } + else if(act == @selector(previewAction:)) { + return [self validatePreviewMenuItem:menuItem]; + } else if(act == @selector(toggleShowingCustomCiteDrawer:)) { return [self validateToggleToggleCustomCiteDrawerMenuItem:menuItem]; } Modified: trunk/bibdesk/BibDocument_Actions.h === --- trunk/bibdesk/BibDocument_Actions.h 2007-12-31 18:34:22 UTC (rev 12157) +++ trunk/bibdesk/BibDocument_Actions.h 2007-12-31 18:37:59 UTC (rev 12158) @@ -214,6 +214,8 @@ - (IBAction)copyNotesForLinkedFile:(id)sender; +- (IBAction)previewAction:(id)sender; + - (IBAction)migrateFiles:(id)sender; #pragma mark View Actions Modified: trunk/bibdesk/BibDocument_Actions.m === --- trunk/bibdesk/BibDocument_Actions.m 2007-12-31 18:34:22 UTC (rev 12157) +++
[Bibdesk-commit] SF.net SVN: bibdesk: [12157] trunk/bibdesk_vendorsrc/OmniGroup
Revision: 12157 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12157view=rev Author: amaxwell Date: 2007-12-31 10:34:22 -0800 (Mon, 31 Dec 2007) Log Message: --- Fix definitions. Modified Paths: -- trunk/bibdesk_vendorsrc/OmniGroup/OmniAppKit/OAUtilities.h trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h Modified: trunk/bibdesk_vendorsrc/OmniGroup/OmniAppKit/OAUtilities.h === --- trunk/bibdesk_vendorsrc/OmniGroup/OmniAppKit/OAUtilities.h 2007-12-31 18:33:39 UTC (rev 12156) +++ trunk/bibdesk_vendorsrc/OmniGroup/OmniAppKit/OAUtilities.h 2007-12-31 18:34:22 UTC (rev 12157) @@ -8,7 +8,16 @@ // $Header: svn+ssh://source.omnigroup.com/Source/svn/Omni/tags/OmniSourceRelease_2007-10-25/OmniGroup/Frameworks/OmniAppKit/OAUtilities.h 91281 2007-09-14 19:08:31Z bungi $ #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5 + +// From CGBase.h +#ifndefCGFLOAT_DEFINED typedef float CGFloat; +#define CGFLOAT_MIN FLT_MIN +#define CGFLOAT_MAX FLT_MAX +#define CGFLOAT_IS_DOUBLE 0 +#define CGFLOAT_DEFINED 1 +#endif /* CGFLOAT_DEFINED */ + #define cgFloatValue floatValue #else #define cgFloatValue doubleValue Modified: trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h === --- trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h 2007-12-31 18:33:39 UTC (rev 12156) +++ trunk/bibdesk_vendorsrc/OmniGroup/OmniBase/objc.h 2007-12-31 18:34:22 UTC (rev 12157) @@ -17,14 +17,17 @@ #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5 // New types for Leopard; don't explode if they leak into the frameworks early +// From NSObjCRuntime.h #ifndef NSINTEGER_DEFINED typedef int NSInteger; typedef unsigned int NSUInteger; -#define NSIntegerMax INT_MAX -#define NSUIntegerMax UINT_MAX +#define NSIntegerMaxLONG_MAX +#define NSIntegerMinLONG_MIN +#define NSUIntegerMax ULONG_MAX #define NSINTEGER_DEFINED 1 -#endif +#endif /* NSINTEGER_DEFINED */ + #import OmniBase/assertions.h #import stdlib.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12159] trunk/bibdesk
Revision: 12159 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12159view=rev Author: hofman Date: 2007-12-31 11:26:26 -0800 (Mon, 31 Dec 2007) Log Message: --- Allow Quick Look for multiple items, show the first one. Modified Paths: -- trunk/bibdesk/BDSKEditor.m trunk/bibdesk/BibDocument+Menus.m Modified: trunk/bibdesk/BDSKEditor.m === --- trunk/bibdesk/BDSKEditor.m 2007-12-31 18:37:59 UTC (rev 12158) +++ trunk/bibdesk/BDSKEditor.m 2007-12-31 19:26:26 UTC (rev 12159) @@ -1387,7 +1387,7 @@ return [menuItem representedObject] != nil || [[publication valueForKey:@linkedFiles] count] 0; } else if (theAction == @selector(previewAction:)) { - return [menuItem representedObject] != nil || [[publication valueForKey:@linkedFiles] count] + [[publication valueForKey:@linkedURLs] count] == 1; + return [menuItem representedObject] != nil || [[publication valueForKey:@linkedFiles] count] || [[publication valueForKey:@linkedURLs] count]; } else if (theAction == @selector(editSelectedFieldAsRawBibTeX:)) { if (isEditable == NO) Modified: trunk/bibdesk/BibDocument+Menus.m === --- trunk/bibdesk/BibDocument+Menus.m 2007-12-31 18:37:59 UTC (rev 12158) +++ trunk/bibdesk/BibDocument+Menus.m 2007-12-31 19:26:26 UTC (rev 12159) @@ -259,7 +259,8 @@ - (BOOL) validatePreviewMenuItem:(NSMenuItem*) menuItem { return ([menuItem representedObject] != nil || -[[self selectedFileURLs] count] + [[[self selectedPublications] valueForKeyPath:@@unionOfArrays.remoteURLs] count]); +[[self selectedFileURLs] count] || +[[[self selectedPublications] valueForKeyPath:@@unionOfArrays.remoteURLs] count]); } - (BOOL) validateDuplicateTitleToBooktitleMenuItem:(NSMenuItem*) menuItem { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12160] trunk/bibdesk/NSImage_BDSKExtensions.m
Revision: 12160 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12160view=rev Author: hofman Date: 2007-12-31 12:04:16 -0800 (Mon, 31 Dec 2007) Log Message: --- Remove static to avoid compiler warning. Simplify drawing of paperclip: remove some implied lines, scale points instead of an extra scale transform, explicit radius. Modified Paths: -- trunk/bibdesk/NSImage_BDSKExtensions.m Modified: trunk/bibdesk/NSImage_BDSKExtensions.m === --- trunk/bibdesk/NSImage_BDSKExtensions.m 2007-12-31 19:26:26 UTC (rev 12159) +++ trunk/bibdesk/NSImage_BDSKExtensions.m 2007-12-31 20:04:16 UTC (rev 12160) @@ -186,8 +186,8 @@ return image != [NSNull null] ? image : nil; } -static inline NSImage *createPaperclipImageWithColor(NSColor *color) { -NSSize size = NSMakeSize(32, 32); +static NSImage *createPaperclipImageWithColor(NSColor *color) { +NSSize size = NSMakeSize(32.0, 32.0); NSImage *image = [[NSImage alloc] initWithSize:size]; [image setBackgroundColor:[NSColor clearColor]]; @@ -196,36 +196,23 @@ // I started out with the idea of making this resolution-independent and scaling to an arbitrary size, but transforming the points was too annoying. I started out with a 1x1 grid subdivided into 0.125 ticks in OmniGraffle and drew a paperclip using lines and semicircles. The path coordinates were taken directly from that graffle diagram, and the transform and line width were adjusted by trial and error. NSAffineTransform *t = [NSAffineTransform transform]; -[t rotateByDegrees:-35]; -[t translateXBy:0 yBy:10]; -[t scaleXBy:2 yBy:2]; +[t rotateByDegrees:-35.0]; +[t translateXBy:0.0 yBy:10.0]; [t concat]; -[path setLineWidth:0.5]; // start at the outside (right) and work inward -[path moveToPoint:NSMakePoint(4, 8)]; -[path lineToPoint:NSMakePoint(4, 2)]; +[path moveToPoint:NSMakePoint(8.0, 16.0)]; +[path appendBezierPathWithArcWithCenter:NSMakePoint(4.0, 4.0) radius:4.0 startAngle:0.0 endAngle:180.0 clockwise:YES]; +[path appendBezierPathWithArcWithCenter:NSMakePoint(3.0, 20.0) radius:3.0 startAngle:180.0 endAngle:0.0 clockwise:YES]; +[path appendBezierPathWithArcWithCenter:NSMakePoint(4.0, 8.0) radius:2.0 startAngle:0.0 endAngle:180.0 clockwise:YES]; +[path lineToPoint:NSMakePoint(2.0, 16.0)]; -NSPoint center = NSMakePoint(2, 2); -CGFloat radius = [path currentPoint].x - center.x; -[path appendBezierPathWithArcWithCenter:center radius:radius startAngle:0 endAngle:180 clockwise:YES]; -[path lineToPoint:NSMakePoint(0, 10)]; - -center = NSMakePoint(1.5, 10); -radius = center.x - [path currentPoint].x; -[path appendBezierPathWithArcWithCenter:center radius:radius startAngle:180 endAngle:0 clockwise:YES]; -[path lineToPoint:NSMakePoint(3, 4)]; - -center = NSMakePoint(2, 4); -radius = [path currentPoint].x - center.x; -[path appendBezierPathWithArcWithCenter:center radius:radius startAngle:0 endAngle:180 clockwise:YES]; -[path lineToPoint:NSMakePoint(1, 8)]; - [color setStroke]; +[path setLineWidth:1.0]; [path stroke]; [image unlockFocus]; - +[[image TIFFRepresentation] writeToFile:@/Users/hofman/Desktop/paperclip1.tiff atomically:YES]; return image; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12156] trunk/bibdesk_vendorsrc/amaxwell/FileView
Revision: 12156 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12156view=rev Author: amaxwell Date: 2007-12-31 10:33:39 -0800 (Mon, 31 Dec 2007) Log Message: --- Fix prefix header and CGFloat definitions. Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h2007-12-31 18:33:25 UTC (rev 12155) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.h2007-12-31 18:33:39 UTC (rev 12156) @@ -39,14 +39,25 @@ #import Cocoa/Cocoa.h // define here, since this is the only public header for the project +// From NSObjCRuntime.h #ifndef NSINTEGER_DEFINED typedef int NSInteger; typedef unsigned int NSUInteger; -typedef float CGFloat; -#define NSIntegerMax INT_MAX +#define NSIntegerMaxLONG_MAX +#define NSIntegerMinLONG_MIN +#define NSUIntegerMax ULONG_MAX #define NSINTEGER_DEFINED 1 -#endif +#endif /* NSINTEGER_DEFINED */ +// From CGBase.h +#ifndefCGFLOAT_DEFINED +typedef float CGFloat; +#define CGFLOAT_MIN FLT_MIN +#define CGFLOAT_MAX FLT_MAX +#define CGFLOAT_IS_DOUBLE 0 +#define CGFLOAT_DEFINED 1 +#endif /* CGFLOAT_DEFINED */ + #ifndef NSAppKitVersionNumber10_4 #define NSAppKitVersionNumber10_4 824 #endif Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch 2007-12-31 18:33:25 UTC (rev 12155) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch 2007-12-31 18:33:39 UTC (rev 12156) @@ -6,16 +6,25 @@ #import Cocoa/Cocoa.h #endif -// 10.4 SDK compatibility +// From NSObjCRuntime.h #ifndef NSINTEGER_DEFINED -#define NSUInteger unsigned -#define NSInteger int -#define CGFloat float -#define NSIntegerMax INT_MAX -// avoid redefinition in FileView.h +typedef int NSInteger; +typedef unsigned int NSUInteger; +#define NSIntegerMaxLONG_MAX +#define NSIntegerMinLONG_MIN +#define NSUIntegerMax ULONG_MAX #define NSINTEGER_DEFINED 1 -#endif +#endif /* NSINTEGER_DEFINED */ +// From CGBase.h +#ifndefCGFLOAT_DEFINED +typedef float CGFloat; +#define CGFLOAT_MIN FLT_MIN +#define CGFLOAT_MAX FLT_MAX +#define CGFLOAT_IS_DOUBLE 0 +#define CGFLOAT_DEFINED 1 +#endif /* CGFLOAT_DEFINED */ + // from 10.5 header #ifndef NSAppKitVersionNumber10_4 #define NSAppKitVersionNumber10_4 824 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12162] trunk/bibdesk_vendorsrc/amaxwell/FileView/ FileView.m
Revision: 12162 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12162view=rev Author: amaxwell Date: 2007-12-31 13:37:37 -0800 (Mon, 31 Dec 2007) Log Message: --- Scale and darken shadow to be more consistent with IconServices. I'm not sure that it's possible to match exactly. Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m2007-12-31 20:33:07 UTC (rev 12161) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView.m2007-12-31 21:37:37 UTC (rev 12162) @@ -144,7 +144,10 @@ __subtitleAttributes = [ta copy]; __shadow = [[NSShadow alloc] init]; -[__shadow setShadowOffset:NSMakeSize(0.0, -3.0)]; +// IconServices shadows look darker than the normal NSShadow (especially Leopard folder shadows) so try to match +[__shadow setShadowColor:[NSColor colorWithCalibratedWhite:0 alpha:0.4]]; +[__shadow setShadowOffset:NSMakeSize(0.0, -2.0)]; +// this will have to be scaled when drawing, since it's in a global coordinate space [__shadow setShadowBlurRadius:5.0]; // QTMovie raises if +initialize isn't sent on the AppKit thread @@ -1025,6 +1028,9 @@ BOOL useSubtitle = [_dataSource respondsToSelector:@selector(fileView:subtitleAtIndex:)]; NSFileManager *fileManager = [NSFileManager defaultManager]; +// shadow needs to be scaled as the icon scale changes to approximate the IconServices shadow +[__shadow setShadowBlurRadius:2.0 * [self iconScale]]; + // iterate each row/column to see if it's in the dirty rect, and evaluate the current cache state for (r = rMin; r rMax; r++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12163] trunk/bibdesk_vendorsrc/amaxwell/FileView
Revision: 12163 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12163view=rev Author: amaxwell Date: 2007-12-31 13:46:37 -0800 (Mon, 31 Dec 2007) Log Message: --- Avoid drawing a second shadow when a fallback icon is used, which gets rid of the really black shadows on Leopard. This affected FVQLIcon and FVWebViewIcon. Draw a white border with rounded corners around a web page. Since web content is generally viewed inside a window, it's odd to see it without a border of some kind. Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQLIcon.m trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQLIcon.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQLIcon.m2007-12-31 21:37:37 UTC (rev 12162) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVQLIcon.m2007-12-31 21:46:37 UTC (rev 12163) @@ -135,4 +135,6 @@ if (didLock) pthread_mutex_unlock(_mutex); } +- (BOOL)needsShadow { return (NULL != _imageRef || [_fallbackIcon needsShadow]); } + @end Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2007-12-31 21:37:37 UTC (rev 12162) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2007-12-31 21:46:37 UTC (rev 12163) @@ -201,8 +201,25 @@ NSSize size = [self size]; CGContextRef context = [FVBitmapContextCache newBitmapContextOfWidth:size.width height:size.height]; NSGraphicsContext *nsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:[view isFlipped]]; + +[NSGraphicsContext saveGraphicsState]; // save previous context + +[NSGraphicsContext setCurrentContext:nsContext]; +[nsContext saveGraphicsState]; +[[NSColor whiteColor] setFill]; +NSRect rect = NSMakeRect(0, 0, size.width, size.height); +[[NSBezierPath bezierPathWithRoundRect:rect xRadius:5 yRadius:5] fill]; +[nsContext restoreGraphicsState]; + +[_webView setFrame:NSInsetRect(rect, 10, 10)]; + +CGContextSaveGState(context); +CGContextTranslateCTM(context, 10, 10); [view displayRectIgnoringOpacity:[view bounds] inContext:nsContext]; +CGContextRestoreGState(context); +[NSGraphicsContext restoreGraphicsState]; // restore previous context + pthread_mutex_lock(_mutex); // full image is large, so cache it to disk in case we get a -releaseResources or another view needs it @@ -383,4 +400,6 @@ } } +- (BOOL)needsShadow { return nil == _fallbackIcon || [_fallbackIcon needsShadow]; } + @end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12164] trunk/bibdesk_vendorsrc/amaxwell/FileView/ FVWebViewIcon.m
Revision: 12164 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12164view=rev Author: amaxwell Date: 2007-12-31 15:44:38 -0800 (Mon, 31 Dec 2007) Log Message: --- set interpolation quality for resampling Modified Paths: -- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m === --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2007-12-31 21:46:37 UTC (rev 12163) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVWebViewIcon.m 2007-12-31 23:44:38 UTC (rev 12164) @@ -162,7 +162,10 @@ // these will always be the same size, so use the context cache CGContextRef ctxt = [FVBitmapContextCache newBitmapContextOfWidth:width height:height]; +CGContextSaveGState(ctxt); +CGContextSetInterpolationQuality(ctxt, kCGInterpolationHigh); CGContextDrawImage(ctxt, CGRectMake(0, 0, CGBitmapContextGetWidth(ctxt), CGBitmapContextGetHeight(ctxt)), _fullImageRef); +CGContextRestoreGState(ctxt); CGImageRef smallImage = CGBitmapContextCreateImage(ctxt); [FVBitmapContextCache disposeOfBitmapContext:ctxt]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12165] trunk/bibdesk/BDSKTextWithIconCell.m
Revision: 12165 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12165view=rev Author: amaxwell Date: 2007-12-31 17:34:25 -0800 (Mon, 31 Dec 2007) Log Message: --- Fixing cellSize apparently fixed the expansion tooltip problem as well. Modified Paths: -- trunk/bibdesk/BDSKTextWithIconCell.m Modified: trunk/bibdesk/BDSKTextWithIconCell.m === --- trunk/bibdesk/BDSKTextWithIconCell.m2007-12-31 23:44:38 UTC (rev 12164) +++ trunk/bibdesk/BDSKTextWithIconCell.m2008-01-01 01:34:25 UTC (rev 12165) @@ -281,24 +281,6 @@ [self drawIconWithFrame:imageRect inView:controlView]; } -// default rect on 10.5 is very wide, and it shows the expansion tooltip even for cells that aren't truncated -- (NSRect)expansionFrameWithFrame:(NSRect)aRect inView:(NSView *)controlView -{ -_calculateDrawingRectsAndSizes; - -NSDivideRect(textRect, ignored, textRect, SIZE_OF_TEXT_FIELD_BORDER, NSMinXEdge); -textRect = NSInsetRect(textRect, 1.0f, 0.0); - -NSAttributedString *label = [self attributedStringValue]; -NSRect expansionRect = [super expansionFrameWithFrame:aRect inView:controlView]; -// if it all fits in the textRect, we don't need the expansion tooltip -if ([label size].width = NSWidth(textRect)) -expansionRect = NSZeroRect; -else -expansionRect.size.width = [label size].width; -return expansionRect; -} - - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)flag; { return [super trackMouse:theEvent inRect:cellFrame ofView:controlView untilMouseUp:flag]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12166] trunk/bibdesk/BDSKGroupCell.m
Revision: 12166 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12166view=rev Author: amaxwell Date: 2007-12-31 18:07:19 -0800 (Mon, 31 Dec 2007) Log Message: --- Implement cellSize for the group cell, which fixes expansion rect tooltips. Modified Paths: -- trunk/bibdesk/BDSKGroupCell.m Modified: trunk/bibdesk/BDSKGroupCell.m === --- trunk/bibdesk/BDSKGroupCell.m 2008-01-01 01:34:25 UTC (rev 12165) +++ trunk/bibdesk/BDSKGroupCell.m 2008-01-01 02:07:19 UTC (rev 12166) @@ -217,6 +217,26 @@ else \ textRect.origin.y += floorf(vOffset); \ +- (NSSize)cellSize; +{ +NSSize cellSize = [super cellSize]; +NSSize countSize = NSZeroSize; +float countSep = 0.0; +if ([[self objectValue] isRetrieving] || [[self objectValue] failedDownload]) { +countSize = NSMakeSize(16, 16); +countSep = 1.0; +} +else if ([[self objectValue] count] 0) { +countSize = [countString size]; +countSep = 0.5 * countSize.height - 0.5; +} +float countWidth = countSize.width + 2 * countSep + 2 * BORDER_BETWEEN_EDGE_AND_COUNT; +// cellSize.height approximates the icon size +cellSize.width += cellSize.height + countWidth; +cellSize.width += BORDER_BETWEEN_EDGE_AND_IMAGE + BORDER_BETWEEN_IMAGE_AND_TEXT + BORDER_BETWEEN_COUNT_AND_TEXT; +return cellSize; +} + - (NSRect)textRectForBounds:(NSRect)aRect { NSView *controlView = [self controlView]; _calculateDrawingRectsAndSizes; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] www.selfbanking.com.ar
Please see this site in Subject - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk: [12169] trunk/bibdesk/Bibdesk.xcodeproj/project. pbxproj
Revision: 12169 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12169view=rev Author: amaxwell Date: 2007-12-31 22:45:28 -0800 (Mon, 31 Dec 2007) Log Message: --- Change version to 984 Modified Paths: -- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj Modified: trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj === --- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2008-01-01 06:00:27 UTC (rev 12168) +++ trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2008-01-01 06:45:28 UTC (rev 12169) @@ -4468,7 +4468,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = F95C5E970D10E87C00C81970 /* BibDesk-Debug.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 983; + CURRENT_PROJECT_VERSION = 984; DEBUG_INFORMATION_FORMAT = dwarf; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -4508,7 +4508,7 @@ i386, ); COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 983; + CURRENT_PROJECT_VERSION = 984; FRAMEWORK_SEARCH_PATHS = ; GCC_ENABLE_CPP_RTTI = NO; GCC_ENABLE_FIX_AND_CONTINUE = NO; @@ -4563,7 +4563,7 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 983; + CURRENT_PROJECT_VERSION = 984; DEBUG_INFORMATION_FORMAT = dwarf; FRAMEWORK_SEARCH_PATHS = ; GCC_ENABLE_CPP_EXCEPTIONS = NO; @@ -4915,7 +4915,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = $(NATIVE_ARCH); - CURRENT_PROJECT_VERSION = 983; + CURRENT_PROJECT_VERSION = 984; DEBUG_INFORMATION_FORMAT = dwarf; GCC_AUTO_VECTORIZATION = NO; GCC_PREPROCESSOR_DEFINITIONS = ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit