On Tuesday, December 11, 2007, at 09:57AM, "Christiaan Hofman" <[EMAIL PROTECTED]> wrote: >Can you replace the ArrowImage as well?
Eh? Replace the image resource in the project? No. > >On 11 Dec 2007, at 6:41 PM, [EMAIL PROTECTED] wrote: > >> Revision: 11854 >> http://bibdesk.svn.sourceforge.net/bibdesk/? >> rev=11854&view=rev >> Author: amaxwell >> Date: 2007-12-11 09:41:18 -0800 (Tue, 11 Dec 2007) >> >> Log Message: >> ----------- >> Use 10.5 template image for arrow. >> >> Modified Paths: >> -------------- >> trunk/bibdesk/BDSKEditorTextFieldCell.m >> trunk/bibdesk/Bibdesk_Prefix.pch >> >> Modified: trunk/bibdesk/BDSKEditorTextFieldCell.m >> =================================================================== >> --- trunk/bibdesk/BDSKEditorTextFieldCell.m 2007-12-11 16:33:47 UTC >> (rev 11853) >> +++ trunk/bibdesk/BDSKEditorTextFieldCell.m 2007-12-11 17:41:18 UTC >> (rev 11854) >> @@ -46,8 +46,16 @@ >> [self setBezeled:YES]; >> [self setDrawsBackground:YES]; >> [self setHasButton:NO]; >> - buttonCell = [[NSButtonCell alloc] initImageCell:[NSImage >> imageNamed:@"ArrowImage"]]; >> - [buttonCell setAlternateImage:[NSImage >> imageNamed:@"ArrowImage_Pressed"]]; >> + NSImage *arrowImage = [NSImage >> imageNamed:NSImageNameFollowLinkFreestandingTemplate]; >> + if (arrowImage) { >> + arrowImage = [[arrowImage copy] autorelease]; >> + [arrowImage setScalesWhenResized:YES]; >> + [arrowImage setSize:NSMakeSize(12, 12)]; >> + buttonCell = [[NSButtonCell alloc] initImageCell:arrowImage]; >> + } else { >> + buttonCell = [[NSButtonCell alloc] initImageCell:[NSImage >> imageNamed:@"ArrowImage"]]; >> + [buttonCell setAlternateImage:[NSImage >> imageNamed:@"ArrowImage_Pressed"]]; >> + } >> [buttonCell setButtonType:NSMomentaryChangeButton]; >> [buttonCell setBordered:NO]; >> [buttonCell setImagePosition:NSImageOnly]; >> >> Modified: trunk/bibdesk/Bibdesk_Prefix.pch >> =================================================================== >> --- trunk/bibdesk/Bibdesk_Prefix.pch 2007-12-11 16:33:47 UTC (rev >> 11853) >> +++ trunk/bibdesk/Bibdesk_Prefix.pch 2007-12-11 17:41:18 UTC (rev >> 11854) >> @@ -34,8 +34,10 @@ >> #define __FILENAMEASNSSTRING__ \ >> [[NSString stringWithFileSystemRepresentation:__FILE__] >> lastPathComponent] >> >> -BDSK_PRIVATE_EXTERN void BDSKLog(NSString *format, ...); >> -BDSK_PRIVATE_EXTERN void BDSKLogv(NSString *format, va_list argList); >> +// >> +// everything inside this #define should be removed when we start >> using the 10.5 SDK >> +// >> +#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 >> @@ -44,9 +46,6 @@ >> #define NSAppKitVersionNumber10_4 824 >> #endif >> >> - >> -#if !defined(MAC_OS_X_VERSION_10_5) || >> (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5) >> - >> enum { >> // An empty area, or did not hit in the cell >> NSCellHitNone = 0, >> @@ -81,12 +80,22 @@ >> - (void)setCacheModel:(int)cacheModel; >> @end >> >> +#define NSImageNameFollowLinkFreestandingTemplate >> @"NSFollowLinkFreestandingTemplate" >> + >> #else >> #warning 10.5: remove this >> -#endif >> +#endif // end of 10.4 transition defines >> >> +#if defined(MAC_OS_X_VERSION_10_5) && >> MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 >> +#warning 10.5: remove ASL hacks >> +#else >> +BDSK_PRIVATE_EXTERN void BDSKLog(NSString *format, ...); >> +BDSK_PRIVATE_EXTERN void BDSKLogv(NSString *format, va_list argList); >> + >> +// these are only needed on Tiger; Leopard logs to asl by default >> #define NSLog BDSKLog >> #define NSLogv BDSKLogv >> +#endif >> >> #if defined (OMNI_ASSERTIONS_ON) >> >> >> >> This was sent by the SourceForge.net collaborative development >> platform, the world's largest Open Source development site. >> >> ---------------------------------------------------------------------- >> --- >> SF.Net email is sponsored by: >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> Bibdesk-commit mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/bibdesk-commit > > >------------------------------------------------------------------------- >SF.Net email is sponsored by: >Check out the new SourceForge.net Marketplace. >It's the best place to buy or sell services for >just about anything Open Source. >http://sourceforge.net/services/buy/index.php >_______________________________________________ >Bibdesk-develop mailing list >Bibdesk-develop@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/bibdesk-develop > > ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Bibdesk-develop mailing list Bibdesk-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-develop