This commit is contained in:
dougt%netscape.com 1999-09-14 22:23:26 +00:00
Родитель d1525e5bd4
Коммит 3da6ea847e
1 изменённых файлов: 54 добавлений и 1 удалений

Просмотреть файл

@ -26,6 +26,44 @@
#endif
#ifdef dougt
OSErr DTSetAPPL(constStr255Param volName,
short vRefNum,
OSType creator,
long applParID,
Str255 applName)
{
OSErr error;
UniversalFMPB *pb = NULL;
short dtRefNum;
Boolean realVRefNum;
/* get the real vRefnum */
error = DetermineVRefNum(volName, vRefNum, &realVRefNum);
if (error == noErr)
{
error = DTOpen(volName, vRefNum, &dtRefNum, &newDTDatabase);
if (error == noErr && !newDTDatabase)
{
pb = (UniversalFMPB*) NewPtrClear( sizeof(UniversalFMPB) );
if (pb==NULL) return -1;
pb->dtPB.ioNamePtr = appleName;
pb->dtPB.ioDTRefNum = dtRefNum;
pb->dtPB.ioDirID = appParID;
pb->dtPB.ioFileCreator = creator;
error = PBDTAddAPPLSync(&pb->dtPB);
if (pb) DisposePtr((Ptr)pb);
}
}
}
#endif
/*----------------------------------------------------------------------*
* Constructors/Destructor
*----------------------------------------------------------------------*/
@ -406,6 +444,21 @@ nsAppleSingleDecoder::ProcessFinderInfo(ASEntry inEntry)
pb.hFileInfo.ioFlXFndrInfo = info.ioFlXFndrInfo;
err = PBSetCatInfo(&pb, false);
#ifdef DOUGT
if (info.ioFlFndrInfo.fdType == 'APPL')
{
// need to register in desktop database or bad things will happen
DTSetAPPL( NULL,
mOutSpec.vRefNum,
info.ioFlFndrInfo.fdCreator,
mOutSpec.parID,
mOutSpec.name );
}
#endif
return err;
}