|
From: <cre...@us...> - 2006-07-15 22:17:09
|
Revision: 1462 Author: creecode Date: 2006-07-15 15:17:05 -0700 (Sat, 15 Jul 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1462&view=rev Log Message: ----------- tweaks to get Windows working minor formatting tweaks Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/headers/shell.h Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h Frontier/branches/FSRef_Migration/Common/source/shellwindow.c Modified: Frontier/branches/FSRef_Migration/Common/headers/shell.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/shell.h 2006-07-15 22:16:37 UTC (rev 1461) +++ Frontier/branches/FSRef_Migration/Common/headers/shell.h 2006-07-15 22:17:05 UTC (rev 1462) @@ -772,9 +772,9 @@ extern short windowgetvnum (WindowPtr); -extern boolean windowsetfspec (WindowPtr, ptrfilespec ); +extern boolean windowsetfspec ( WindowPtr, ptrfilespec ); -extern boolean windowgetfspec (WindowPtr, ptrfilespec ); +extern boolean windowgetfspec ( WindowPtr, ptrfilespec ); extern boolean windowgetpath (WindowPtr, bigstring); Modified: Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h =================================================================== --- Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h 2006-07-15 22:16:37 UTC (rev 1461) +++ Frontier/branches/FSRef_Migration/Common/headers/shelltypes.h 2006-07-15 22:17:05 UTC (rev 1462) @@ -179,12 +179,11 @@ typedef struct tyfilespec { - long volumeID; char fullSpecifier [258]; } tyfilespec, *ptrfilespec, **hdlfilespec; - #define fsname ( fs ) ( fs ) -> fullSpecifier + #define fsname( fs ) ( fs ) -> fullSpecifier #endif // WIN95VERSION Modified: Frontier/branches/FSRef_Migration/Common/source/shellwindow.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/shellwindow.c 2006-07-15 22:16:37 UTC (rev 1461) +++ Frontier/branches/FSRef_Migration/Common/source/shellwindow.c 2006-07-15 22:17:05 UTC (rev 1462) @@ -504,7 +504,7 @@ } /*windowsetfspec*/ -boolean windowgetfspec (WindowPtr w, ptrfilespec fspec) { +boolean windowgetfspec ( WindowPtr w, ptrfilespec fspec ) { /* 6.18.97 dmb: return boolean value indicating whether or not the @@ -653,6 +653,7 @@ tysavedfont savedfont; short fontnum; long resourceSize; + if (!getwindowinfo (w, &hinfo)) /*defensive driving*/ return (false); @@ -669,7 +670,9 @@ //I think a more insidious problem was that the sizeof() was returning //a short that was not being picked up right when run under spotlight. //This may be a spotlight bug though. + resourceSize = sizeof (savedfont); + if (!loadresource (&fspec, (short) (**h).rnum, 'styl', 128, nil, resourceSize, &savedfont, resourcefork)) { /* 2005-09-02 creedon - added support for fork parameter, see resources.c: openresourcefile and pushresourcefile */ (**h).defaultfont = config.defaultfont; @@ -1980,11 +1983,15 @@ //Must pass a CGrafPtr to pushport on OS X to avoid a crash { CGrafPtr thePort; + #if TARGET_API_MAC_CARBON == 1 thePort = GetWindowPort(w); + #else + thePort = (CGrafPtr)w; + #endif pushport (thePort); } - + setfontsizestyle (config.defaultfont, config.defaultsize, config.defaultstyle); popport (); @@ -2017,8 +2024,18 @@ // do we need to do this? - (**hinfo).fspec.path = CFStringCreateWithPascalString (kCFAllocatorDefault, bstitle, kCFStringEncodingMacRoman ); - + #ifdef MACVERSION + + (**hinfo).fspec.path = CFStringCreateWithPascalString (kCFAllocatorDefault, bstitle, kCFStringEncodingMacRoman ); + + #endif // MACVERSION + + #ifdef WIN95VERSION + + copystring ( bstitle, fsname ( &( **hinfo ).fspec ) ); + + #endif // WIN95VERSION + } fl = true; @@ -3157,6 +3174,3 @@ return (fl); } /*shellgetdatabase*/ - - - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |