Ignore:
Timestamp:
Sep 7, 2000, 8:13:50 PM (25 years ago)
Author:
sandervl
Message:

shell32 merge with old code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/folders.c

    r4121 r4202  
    1 /* $Id: folders.c,v 1.1 2000-08-30 13:52:51 sandervl Exp $ */
     1/* $Id: folders.c,v 1.2 2000-09-07 18:13:50 sandervl Exp $ */
    22/*
    33 *      Copyright 1997  Marcus Meissner
     
    206206        else    /* object is file */
    207207        {
     208#ifdef __WIN32OS2__
     209          if (_ILGetExtension (pSimplePidl, sTemp, MAX_PATH))
     210          {
     211            if (HCR_MapTypeToValue(sTemp, sTemp, MAX_PATH, TRUE)
     212              && HCR_GetDefaultIcon(sTemp, sTemp, MAX_PATH, &dwNr))
     213            {
     214              if (!strcmp("%1",sTemp))            /* icon is in the file */
     215              {
     216                SHGetPathFromIDListA(This->pidl, sTemp);
     217                dwNr = 0;
     218              }
     219              lstrcpynA(szIconFile, sTemp, cchMax);
     220              *piIndex = dwNr;
     221            } else
     222            {
     223              //icon is in the file/file is icon
     224              if (stricmp(sTemp,"EXE") == 0) //CB: add more
     225              {
     226                SHGetPathFromIDListA(This->pidl, sTemp);
     227                dwNr = 0;
     228                lstrcpynA(szIconFile, sTemp, cchMax);
     229                *piIndex = dwNr;
     230              } else //default icon
     231              {
     232                lstrcpynA(szIconFile, "shell32.dll", cchMax);
     233                *piIndex = 0;
     234              }
     235            }
     236          } else                                  /* default icon */
     237          {
     238            lstrcpynA(szIconFile, "shell32.dll", cchMax);
     239            *piIndex = 0;
     240          }
     241        }
     242#else
    208243          if (_ILGetExtension (pSimplePidl, sTemp, MAX_PATH)
    209244              && HCR_MapTypeToValue(sTemp, sTemp, MAX_PATH, TRUE)
     
    224259          }
    225260        }
    226 
     261#endif
    227262        TRACE("-- %s %x\n", szIconFile, *piIndex);
    228263        return NOERROR;
     
    319354}
    320355
     356#ifdef __WIN32OS2__
     357/************************************************************************
     358 * IEIPersistFile_IsDirty (IPersistFile)
     359 */
     360static HRESULT WINAPI IEIPersistFile_fnIsDirty(IPersistFile* iface)
     361{
     362  dprintf(("SHELL32: Folders: IEIPersistFile_fnIsDirty not implemented.\n"));
     363  return E_NOTIMPL;
     364}
     365
     366/************************************************************************
     367 * IEIPersistFile_Save (IPersistFile)
     368 */
     369static HRESULT WINAPI IEIPersistFile_fnSave(IPersistFile* iface, LPCOLESTR pszFileName, DWORD dwMode)
     370{
     371  dprintf(("SHELL32: Folders: IEIPersistFile_fnSave not implemented.\n"));
     372  return E_NOTIMPL;
     373}
     374
     375
     376/************************************************************************
     377 * IEIPersistFile_SaveCompleted (IPersistFile)
     378 */
     379static HRESULT WINAPI IEIPersistFile_fnSaveCompleted(IPersistFile* iface, LPCOLESTR pszFileName)
     380{
     381  dprintf(("SHELL32: Folders: IEIPersistFile_fnSaveCompleted not implemented.\n"));
     382  return E_NOTIMPL;
     383}
     384
     385
     386/************************************************************************
     387 * IEIPersistFile_GetCurFile (IPersistFile)
     388 */
     389static HRESULT WINAPI IEIPersistFile_fnGetCurFile(IPersistFile* iface, LPOLESTR* pszFileName)
     390{
     391  dprintf(("SHELL32: Folders: IEIPersistFile_fnGetCurFile not implemented.\n"));
     392  return E_NOTIMPL;
     393}
     394#endif
     395
    321396static struct ICOM_VTABLE(IPersistFile) pfvt =
    322397{
     
    326401        IEIPersistFile_fnRelease,
    327402        IEIPersistFile_fnGetClassID,
     403#ifdef __WIN32OS2__
     404        IEIPersistFile_fnIsDirty,       /* IEIPersistFile_fnIsDirty */
     405#else
    328406        (void *) 0xdeadbeef /* IEIPersistFile_fnIsDirty */,
     407#endif
    329408        IEIPersistFile_fnLoad,
     409#ifdef __WIN32OS2__
     410        IEIPersistFile_fnSave,          /* IEIPersistFile_fnSave */
     411        IEIPersistFile_fnSaveCompleted, /* IEIPersistFile_fnSaveCompleted */
     412        IEIPersistFile_fnGetCurFile     /* IEIPersistFile_fnGetCurFile */
     413#else
    330414        (void *) 0xdeadbeef /* IEIPersistFile_fnSave */,
    331415        (void *) 0xdeadbeef /* IEIPersistFile_fnSaveCompleted */,
    332416        (void *) 0xdeadbeef /* IEIPersistFile_fnGetCurFile */
     417#endif
    333418};
    334419
Note: See TracChangeset for help on using the changeset viewer.