|
From: <cre...@us...> - 2006-06-24 01:00:20
|
Revision: 1403 Author: creecode Date: 2006-06-23 18:00:11 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1403&view=rev Log Message: ----------- FSRef-ized Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/about.c Modified: Frontier/branches/FSRef_Migration/Common/source/about.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/about.c 2006-06-15 13:17:26 UTC (rev 1402) +++ Frontier/branches/FSRef_Migration/Common/source/about.c 2006-06-24 01:00:11 UTC (rev 1403) @@ -68,17 +68,19 @@ #include "processinternal.h" #include "launch.h" -#ifdef WIN95VERSION - #include "Winland.h" - #define idfrontiericon IDB_FRONTIER_BITMAP -#endif #ifdef MACVERSION + #include "MoreFilesX.h" #define idfrontiericon 128 #endif +#ifdef WIN95VERSION + #include "Winland.h" + #define idfrontiericon IDB_FRONTIER_BITMAP +#endif + static long aboutopenticks; /*so we can tell how long it's been up*/ @@ -266,31 +268,37 @@ static void ccdrawfrontiericon (Rect rcicn, boolean flpressed) { + + // + // 2006-06-18 creedon: FSRef-ized + // + // 7.0b53 PBS: draw an OS X style icon + // - #if TARGET_API_MAC_CARBON == 1 /*PBS 7.0b53: draw an OS X style icon*/ - IconRef iconref; tyfilespec programfspec; short label; - OSErr ec; + OSErr err; Rect r = rcicn; + FSSpec fs; getapplicationfilespec (nil, &programfspec); + + ( void ) extendfilespec ( &programfspec, &programfspec ); + + err = FSRefMakeFSSpec ( &programfspec.fsref, &fs ); - if (GetIconRefFromFile (&programfspec, &iconref, &label) == noErr) { + if (GetIconRefFromFile (&fs, &iconref, &label) == noErr) { - ec = PlotIconRef (&r, kAlignAbsoluteCenter, flpressed? kTransformSelected : 0, kIconServicesNormalUsageFlag, iconref); + err = PlotIconRef (&r, kAlignAbsoluteCenter, flpressed? kTransformSelected : 0, kIconServicesNormalUsageFlag, iconref); ReleaseIconRef (iconref); - if (ec == noErr) + if (err == noErr) return; - } /*if*/ - #endif + } // if - ploticonresource (&rcicn, kAlignAbsoluteCenter, flpressed? kTransformSelected : 0, idfrontiericon); - - } /*ccdrawfrontiericon*/ + } // ccdrawfrontiericon static boolean ccgettextitemrect (short item, Rect *r) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |