Ignore:
Timestamp:
Apr 28, 2001, 3:33:49 PM (25 years ago)
Author:
sandervl
Message:

resync with latest wine

File:
1 edited

Legend:

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

    r4121 r5618  
    1 /* $Id: shlfolder.c,v 1.1 2000-08-30 13:52:57 sandervl Exp $ */
    21/*
    32 *      Shell Folder stuff
     
    109 */
    1110#ifdef __WIN32OS2__
    12 #define ICOM_CINTERFACE 1
    13 #include <odin.h>
     11#define WINE_LARGE_INTEGER
     12#define snprintf(a,b,c,d)       sprintf(a,c,d)
    1413#endif
    15 
    1614#include <stdlib.h>
    1715#include <string.h>
     
    2018#include "debugtools.h"
    2119#include "winerror.h"
     20#include "winbase.h"
    2221
    2322#include "oleidl.h"
     
    3231#include "shresdef.h"
    3332#include "shlwapi.h"
    34 
    35 #define INITGUID
    36 #include "initguid.h"
    3733#include "shellfolder.h"
    3834
    39 
    40 DEFAULT_DEBUG_CHANNEL(shell)
     35DEFAULT_DEBUG_CHANNEL(shell);
    4136
    4237
     
    347342
    348343/**************************************************************************
    349 *       we need a seperate IUnknown to handle aggregation
     344*       we need a separate IUnknown to handle aggregation
    350345*       (inner IUnknown)
    351346*/
     
    616611*
    617612* NOTES
    618 *  every folder trys to parse only it's own (the leftmost) pidl and creates a
     613*  every folder tries to parse only its own (the leftmost) pidl and creates a
    619614*  subfolder to evaluate the remaining parts
    620615*  now we can parse into namespaces implemented by shell extensions
     
    658653
    659654          /* build the full pathname to the element */
    660           lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);
     655          WideCharToMultiByte( CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL );
    661656          strcpy(szPath, This->sMyPath);
    662657          PathAddBackslashA(szPath);
     
    691686        }
    692687
    693         *ppidl = pidlTemp;
     688        if (!hr)
     689          *ppidl = pidlTemp;
     690        else
     691          *ppidl = NULL;
    694692
    695693        TRACE("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl? *ppidl:0, hr);
     
    11881186        PathAddBackslashA(szDest);
    11891187        len = strlen (szDest);
    1190         lstrcpynWtoA(szDest+len, lpName, MAX_PATH-len);
    1191        
     1188        WideCharToMultiByte( CP_ACP, 0, lpName, -1, szDest+len, MAX_PATH-len, NULL, NULL );
     1189        szDest[MAX_PATH-1] = 0;
    11921190        TRACE("src=%s dest=%s\n", szSrc, szDest);
    11931191        if ( MoveFileA(szSrc, szDest) )
     
    14981496        int i;
    14991497        char szPath[MAX_PATH];
     1498        BOOL bConfirm = TRUE;
    15001499
    15011500        TRACE("(%p)(%u %p)\n", This, cidl, apidl);
    15021501       
     1502        /* deleting multiple items so give a slightly different warning */
     1503        if(cidl != 1)
     1504        {
     1505          char tmp[8];
     1506          snprintf(tmp, sizeof(tmp), "%d", cidl);
     1507          if(!SHELL_WarnItemDelete(ASK_DELETE_MULTIPLE_ITEM, tmp))
     1508            return E_FAIL;
     1509          bConfirm = FALSE;
     1510        }
     1511
    15031512        for(i=0; i< cidl; i++)
    15041513        {
     
    15101519          {
    15111520            LPITEMIDLIST pidl;
    1512 
    1513             MESSAGE("delete %s\n", szPath);
    1514             if (! SHELL_DeleteDirectoryA(szPath, TRUE)) return E_FAIL;
     1521            TRACE("delete %s\n", szPath);
     1522            if (! SHELL_DeleteDirectoryA(szPath, bConfirm))
     1523            {
     1524              TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm);
     1525              return E_FAIL;
     1526            }
    15151527            pidl = ILCombine(This->absPidl, apidl[i]);
    15161528            SHChangeNotifyA(SHCNE_RMDIR, SHCNF_IDLIST, pidl, NULL);
     
    15211533            LPITEMIDLIST pidl;
    15221534
    1523             MESSAGE("delete %s\n", szPath);
    1524             if (! DeleteFileA(szPath)) return E_FAIL;
     1535            TRACE("delete %s\n", szPath);
     1536            if (! SHELL_DeleteFileA(szPath, bConfirm))
     1537            {
     1538              TRACE("delete %s failed, bConfirm=%d", szPath, bConfirm);
     1539              return E_FAIL;
     1540            }
    15251541            pidl = ILCombine(This->absPidl, apidl[i]);
    15261542            SHChangeNotifyA(SHCNE_DELETE, SHCNF_IDLIST, pidl, NULL);
     
    21332149        {
    21342150          szNext = GetNextElementW(lpszDisplayName, szElement, MAX_PATH);
    2135           lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);
     2151          WideCharToMultiByte( CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL );
    21362152          pidlTemp = _ILCreateDrive(szTempA);
    21372153
     
    24982514                _ILSimpleGetText(pidl, szPath, MAX_PATH);
    24992515                GetDiskFreeSpaceExA(szPath, NULL, &ulBytes, NULL);
    2500 #ifdef __WIN32OS2__
    2501                 StrFormatByteSizeA(ulBytes.LowPart, psd->str.u.cStr, MAX_PATH);
    2502 #else
    25032516                StrFormatByteSizeA(ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH);
    2504 #endif
    25052517              }
    25062518              break;
     
    25102522                _ILSimpleGetText(pidl, szPath, MAX_PATH);
    25112523                GetDiskFreeSpaceExA(szPath, &ulBytes, NULL, NULL);
    2512 #ifdef __WIN32OS2__
    2513                 StrFormatByteSizeA(ulBytes.LowPart, psd->str.u.cStr, MAX_PATH);
    2514 #else
    25152524                StrFormatByteSizeA(ulBytes.s.LowPart, psd->str.u.cStr, MAX_PATH);
    2516 #endif
    25172525              }
    25182526              break;
Note: See TracChangeset for help on using the changeset viewer.