Changeset 918 for trunk/src


Ignore:
Timestamp:
Sep 13, 1999, 2:36:35 PM (26 years ago)
Author:
phaller
Message:

Fix: updated to current wine 19990913

Location:
trunk/src/shell32/new
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/new/brsfolder.cpp

    r800 r918  
    1313#include "debugtools.h"
    1414#include "winreg.h"
     15#include "authors.h"
    1516#include "winnls.h"
    1617#include "commctrl.h"
     
    9697        if (SUCCEEDED(IShellFolder_GetDisplayNameOf(lpsf, lpi, dwFlags, &str)))
    9798        {
    98           bSuccess = StrRetToStrNA (lpFriendlyName, MAX_PATH, &str, lpi);
     99          if(FAILED(StrRetToStrNA (lpFriendlyName, MAX_PATH, &str, lpi)))
     100          {
     101              bSuccess = FALSE;
     102          }
    99103        }
    100104        else
     
    118122        HWND            hwnd=GetParent(hwndTreeView);
    119123
    120         TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent);
    121        
     124        TRACE("%p %p %x\n",lpsf, pidl, (INT)hParent);   
    122125        SetCapture(GetParent(hwndTreeView));
    123126        SetCursor(LoadCursorA(0, IDC_WAITA));
     
    158161                tvins.hParent      = hParent;
    159162
    160                 hPrev = (HTREEITEM)TreeView_InsertItemW (hwndTreeView, &tvins);
     163                hPrev = (HTREEITEM)TreeView_InsertItemA (hwndTreeView, &tvins);
    161164
    162165              }
  • trunk/src/shell32/new/pidl.cpp

    r873 r918  
    142142}
    143143
    144 
    145144/*************************************************************************
    146145 * ILGetDisplayName                     [SHELL32.15]
     
    852851               HANDLE   handle;
    853852
    854                if ( len < sizeof (WIN32_FIND_DATAA))
     853               if ( len < sizeof (WIN32_FIND_DATAA)) {
     854                 ERR_(shell)("%d does not find sizeof(finddata)\n",len);
    855855                 return E_INVALIDARG;
     856               }
    856857
    857858               SHGetPathFromIDListA(pidl, pszPath);
     
    879880HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
    880881{
    881         FIXME_(shell)("sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
    882 
     882        if (! psf || !dest )  return E_INVALIDARG;
     883
     884        switch (nFormat)
     885        {
     886          case SHGDFIL_FINDDATA:
     887            {
     888               WIN32_FIND_DATAW * pfd = (WIN32_FIND_DATAW*)dest;
     889               WCHAR    pszPath[MAX_PATH];
     890               HANDLE   handle;
     891
     892               if ( len < sizeof (WIN32_FIND_DATAW)) {
     893                 ERR_(shell)("%d does not find sizeof(finddata)\n",len);
     894                 return E_INVALIDARG;
     895               }
     896               SHGetPathFromIDListW(pidl, pszPath);
     897               if ((handle  = FindFirstFileW ( pszPath, pfd)))
     898                 FindClose (handle);
     899            }
     900            return NOERROR;
     901          default: /* fallthrough */
     902            break;
     903        }
     904        FIXME_(shell)("(sf=%p pidl=%p nFormat=0x%04x %p 0x%04x), unhandled.\n",psf,pidl,nFormat,dest,len);
    883905        return SHGetDataFromIDListA( psf, pidl, nFormat, dest, len);
    884906}
  • trunk/src/shell32/new/shell32_main.cpp

    r898 r918  
    656656        }
    657657        break;
     658    case WM_CLOSE:
     659      EndDialog(hWnd, TRUE);
     660      break;
    658661    }
    659662    return 0;
  • trunk/src/shell32/new/shellpath.cpp

    r873 r918  
    433433}
    434434/*************************************************************************
     435 * PathMatchSingleMask
     436 *
     437 * NOTES
     438 *     internal (used by PathMatchSpec)
     439 */
     440static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
     441{
     442  while (*name && *mask && *mask!=';') {
     443    if (*mask=='*') {
     444      do {
     445        if (PathMatchSingleMaskA(name,mask+1)) return 1;  /* try substrings */
     446      } while (*name++);
     447      return 0;
     448    }
     449    if (toupper(*mask)!=toupper(*name) && *mask!='?') return 0;
     450    name++;
     451    mask++;
     452  }
     453  if (!*name) {
     454    while (*mask=='*') mask++;
     455    if (!*mask || *mask==';') return 1;
     456  }
     457  return 0;
     458}
     459static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
     460{
     461  while (*name && *mask && *mask!=';') {
     462    if (*mask=='*') {
     463      do {
     464        if (PathMatchSingleMaskW(name,mask+1)) return 1;  /* try substrings */
     465      } while (*name++);
     466      return 0;
     467    }
     468    if (towupper(*mask)!=towupper(*name) && *mask!='?') return 0;
     469    name++;
     470    mask++;
     471  }
     472  if (!*name) {
     473    while (*mask=='*') mask++;
     474    if (!*mask || *mask==';') return 1;
     475  }
     476  return 0;
     477}
     478/*************************************************************************
    435479 * PathMatchSpec [SHELL32.46]
    436480 *
     
    438482 *     used from COMDLG32
    439483 */
    440 
    441484BOOL WINAPI PathMatchSpecA(LPCSTR name, LPCSTR mask)
    442 {       LPCSTR _name;
    443 
    444         TRACE("%s %s stub\n",name,mask);
    445 
    446         _name = name;
    447         while (*_name && *mask)
    448         { if (*mask ==';')
    449           { mask++;
    450             _name = name;
     485{
     486  TRACE("%s %s\n",name,mask);
     487
     488  if (!lstrcmpA( mask, "*.*" )) return 1;   /* we don't require a period */
     489
     490  while (*mask) {
     491    if (PathMatchSingleMaskA(name,mask)) return 1;    /* helper function */
     492    while (*mask && *mask!=';') mask++;
     493    if (*mask==';') {
     494      mask++;
     495      while (*mask==' ') mask++;      /*  masks may be separated by "; " */
    451496          }
    452           else if (*mask == '*')
    453           { mask++;
    454             while (*mask == '*') mask++;                /* Skip consecutive '*' */
    455             if (!*mask || *mask==';') return TRUE;      /* '*' matches everything */
    456             while (*_name && (toupper(*_name) != toupper(*mask))) _name++;
    457             if (!*_name)
    458             { while ( *mask && *mask != ';') mask++;
    459               _name = name;
    460             }
    461           }
    462           else if ( (*mask == '?') || (toupper(*mask) == toupper(*_name)) )
    463           { mask++;
    464             _name++;
    465           }
    466           else
    467           { while ( *mask && *mask != ';') mask++;
    468           }
    469         }
    470         return (!*_name && (!*mask || *mask==';'));
     497        }
     498  return 0;
    471499}
    472500BOOL WINAPI PathMatchSpecW(LPCWSTR name, LPCWSTR mask)
    473501{       WCHAR stemp[4];
    474         LPCWSTR _name;
    475        
    476         TRACE("%s %s stub\n",debugstr_w(name),debugstr_w(mask));
    477 
     502  TRACE("%ls %ls\n",name,mask);
    478503        lstrcpyAtoW(stemp,"*.*");       
    479         if (!lstrcmpW( mask, stemp )) return 1;
    480 
    481         _name = name;
    482         while (*_name && *mask)
    483         { if (*mask ==';')
    484           { mask++;
    485             _name = name;
     504  if (!lstrcmpW( mask, stemp )) return 1;   /* we don't require a period */
     505
     506  while (*mask) {
     507    if (PathMatchSingleMaskW(name,mask)) return 1;    /* helper function */
     508    while (*mask && *mask!=';') mask++;
     509    if (*mask==';') {
     510      mask++;
     511      while (*mask==' ') mask++;       /* masks may be separated by "; " */
    486512          }
    487           else if (*mask == '*')
    488           { mask++;
    489             while (*mask == '*') mask++;                /* Skip consecutive '*' */
    490             if (!*mask || *mask==';') return TRUE;      /* '*' matches everything */
    491             while (*_name && (towupper(*_name) != towupper(*mask))) _name++;
    492             if (!*_name)
    493             { while ( *mask && *mask != ';') mask++;
    494               _name = name;
    495             }
    496           }
    497           else if ( (*mask == '?') || (towupper(*mask) == towupper(*_name)) )
    498           { mask++;
    499             _name++;
    500           }
    501           else
    502           { while ( *mask && *mask != ';') mask++;
    503           }
    504         }
    505         return (!*_name && (!*mask || *mask==';'));
     513        }
     514  return 0;
    506515}
    507516BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
  • trunk/src/shell32/new/shlfolder.cpp

    r857 r918  
    834834          {
    835835            pObj  = (LPUNKNOWN)IContextMenu_Constructor((IShellFolder *)This, This->absPidl, apidl, cidl);
     836            hr = S_OK;
    836837          }
    837838          else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1))
  • trunk/src/shell32/new/shlview.cpp

    r898 r918  
    233233        TRACE("%p\n",This);
    234234
    235         dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER |
     235        dwStyle = WS_TABSTOP | WS_VISIBLE | WS_CHILD | WS_BORDER | WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
    236236                  LVS_SHAREIMAGELISTS | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_AUTOARRANGE;
    237237
     
    794794        ShellView_OnActivate(This, SVUIA_ACTIVATE_FOCUS);
    795795
     796        /* Set the focus to the listview */
     797        SetFocus(This->hWndList);
     798
     799        /* Notify the ICommDlgBrowser interface */
     800        OnStateChange(This,CDBOSC_SETFOCUS);
     801
    796802        return 0;
    797803}
     
    805811
    806812        ShellView_OnActivate(This, SVUIA_ACTIVATE_NOFOCUS);
     813        /* Notify the ICommDlgBrowser */
     814        OnStateChange(This,CDBOSC_KILLFOCUS);
    807815
    808816        return 0;
     
    866874            TRACE("-- NM_KILLFOCUS %p\n",This);
    867875            ShellView_OnDeactivate(This);
     876            /* Notify the ICommDlgBrowser interface */
     877            OnStateChange(This,CDBOSC_KILLFOCUS);
    868878            break;
    869879
     
    10361046                                break;
    10371047
     1048          case WM_GETDLGCODE:   return SendMessageA(pThis->hWndList,uMessage,0,0);
     1049
    10381050          case WM_DESTROY:      pRevokeDragDrop(pThis->hWnd);
    10391051                                break;
     
    12931305                                SV_CLASS_NAME,
    12941306                                NULL,
    1295                                 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS,
     1307                                WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_TABSTOP,
    12961308                                prcView->left,
    12971309                                prcView->top,
Note: See TracChangeset for help on using the changeset viewer.