|
From: <cre...@us...> - 2006-06-26 19:48:35
|
Revision: 1425 Author: creecode Date: 2006-06-26 12:48:29 -0700 (Mon, 26 Jun 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1425&view=rev Log Message: ----------- FSRef-ized Modified Paths: -------------- Frontier/branches/FSRef_Migration/Common/source/shellwindow.c Modified: Frontier/branches/FSRef_Migration/Common/source/shellwindow.c =================================================================== --- Frontier/branches/FSRef_Migration/Common/source/shellwindow.c 2006-06-26 18:55:18 UTC (rev 1424) +++ Frontier/branches/FSRef_Migration/Common/source/shellwindow.c 2006-06-26 19:48:29 UTC (rev 1425) @@ -52,6 +52,12 @@ #include "tablestructure.h" #include "cancoon.h" +#ifdef MACVERSION + + #include "MoreFilesX.h" + +#endif + #ifdef WIN95VERSION #include "FrontierWinMain.h" #endif @@ -451,23 +457,36 @@ short windowgetvnum (WindowPtr w) { + + // + // 2006-06-23 creedon: FSRef-ized + // hdlwindowinfo hinfo; if (!getwindowinfo (w, &hinfo)) return (0); -#ifdef MACVERSION - return ((**hinfo).fspec.vRefNum); -#endif + #ifdef MACVERSION + + short vnum; + + FSGetVRefNum ( &(**hinfo).fspec.fsref, &vnum ); + + return ( vnum ); + + #endif -#ifdef WIN95VERSION - return -1; // *** need new field? -#endif - } /*windowgetvnum*/ + #ifdef WIN95VERSION + return -1; // *** need new field? + + #endif -boolean windowsetfspec (WindowPtr w, tyfilespec *fspec) { + } // windowgetvnum + + +boolean windowsetfspec (WindowPtr w, ptrfilespec fspec) { hdlwindowinfo hinfo; bigstring bstitle; @@ -485,7 +504,7 @@ } /*windowsetfspec*/ -boolean windowgetfspec (WindowPtr w, tyfilespec *fspec) { +boolean windowgetfspec (WindowPtr w, ptrfilespec fspec) { /* 6.18.97 dmb: return boolean value indicating whether or not the @@ -1961,11 +1980,7 @@ //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); } @@ -2000,7 +2015,10 @@ shellsetwindowtitle (hinfo, bstitle); // 7.24.97 dmb: was windowsettitle - copystring (bstitle, fsname (&(**hinfo).fspec)); + // do we need to do this? + + (**hinfo).fspec.path = CFStringCreateWithPascalString (kCFAllocatorDefault, bstitle, kCFStringEncodingMacRoman ); + } fl = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |