Merge pull request #530 from RaiKoHoff/MiniPath_Lng

MiniPath: complete set for German Lng
This commit is contained in:
Rainer Kottenhoff 2018-06-27 15:31:07 +02:00 committed by GitHub
commit c0b6f53ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 13 additions and 27 deletions

View File

@ -103,11 +103,11 @@ BOOL GetDirectory(HWND hwndParent,int iTitle,LPWSTR pszFolder,LPCWSTR pszBase,BO
BROWSEINFO bi;
LPITEMIDLIST pidl;
WCHAR szTitle[256];
WCHAR szBase[MAX_PATH];
WCHAR szTitle[256] = { L'\0' };
WCHAR szBase[MAX_PATH] = { L'\0' };
BOOL fOk = FALSE;
lstrcpy(szTitle,L"");
lstrcpy(szTitle, L"");
GetLngString(iTitle,szTitle,COUNTOF(szTitle));
if (!pszBase || !*pszBase)
@ -146,7 +146,7 @@ BOOL GetDirectory2(HWND hwndParent,int iTitle,LPWSTR pszFolder,int iBase)
BROWSEINFO bi;
LPITEMIDLIST pidl,pidlRoot;
WCHAR szTitle[256];
WCHAR szTitle[256] = { L'\0' };
BOOL fOk = FALSE;
lstrcpy(szTitle,L"");
@ -175,7 +175,6 @@ BOOL GetDirectory2(HWND hwndParent,int iTitle,LPWSTR pszFolder,int iBase)
CoTaskMemFree(pidlRoot);
return fOk;
}
@ -548,9 +547,7 @@ INT_PTR CALLBACK GotoDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
//
void GotoDlg(HWND hwnd)
{
ThemedDialogBox(g_hLngResContainer,MAKEINTRESOURCE(IDD_GOTO),hwnd,GotoDlgProc);
}

View File

@ -990,7 +990,6 @@ BOOL DirList_SelectItem(HWND hwnd,LPCWSTR lpszDisplayName,LPCWSTR lpszFullPath)
}
return(FALSE);
}
@ -1001,15 +1000,16 @@ BOOL DirList_SelectItem(HWND hwnd,LPCWSTR lpszDisplayName,LPCWSTR lpszFullPath)
//
// Create a valid DL_FILTER structure
//
void DirList_CreateFilter(PDL_FILTER pdlf,LPCWSTR lpszFileSpec,
BOOL bExcludeFilter)
void DirList_CreateFilter(PDL_FILTER pdlf,LPCWSTR lpszFileSpec,BOOL bExcludeFilter)
{
ZeroMemory(pdlf,sizeof(DL_FILTER));
lstrcpyn(pdlf->tFilterBuf,lpszFileSpec,(DL_FILTER_BUFSIZE-1));
if (lpszFileSpec)
lstrcpyn(pdlf->tFilterBuf, lpszFileSpec, (DL_FILTER_BUFSIZE - 1));
pdlf->bExcludeFilter = bExcludeFilter;
if (!lstrcmp(lpszFileSpec,L"*.*") || !lstrlen(lpszFileSpec))
return;
if (!lpszFileSpec || !lstrcmp(lpszFileSpec, L"*.*") || !lstrlen(lpszFileSpec)) { return; }
pdlf->nCount = 1;
pdlf->pFilter[0] = &pdlf->tFilterBuf[0]; // Zeile zum Ausprobieren
@ -1022,7 +1022,6 @@ void DirList_CreateFilter(PDL_FILTER pdlf,LPCWSTR lpszFileSpec,
p = StrChr(pdlf->pFilter[pdlf->nCount], L';');
pdlf->nCount++; // Increase number of filters
}
}
@ -1540,7 +1539,6 @@ LPITEMIDLIST IL_Create(LPCITEMIDLIST pidl1,UINT cb1,
//
UINT IL_GetSize(LPCITEMIDLIST pidl)
{
LPITEMIDLIST pidlTmp;
UINT cb = 0;
@ -1553,9 +1551,7 @@ UINT IL_GetSize(LPCITEMIDLIST pidl)
cb += pidlTmp->mkid.cb;
return cb;
}
@ -1572,21 +1568,15 @@ BOOL IL_GetDisplayName(LPSHELLFOLDER lpsf,
LPWSTR lpszDisplayName,
int nDisplayName)
{
STRRET str;
if (NOERROR == lpsf->lpVtbl->GetDisplayNameOf(lpsf,
pidl,
dwFlags,
&str))
if (NOERROR == lpsf->lpVtbl->GetDisplayNameOf(lpsf,pidl,dwFlags,&str))
{
// Shlwapi.dll provides new function:
return StrRetToBuf(&str,pidl,lpszDisplayName,nDisplayName);
// ...but I suppose my version is faster ;-)
/*switch (str.uType)
{
case STRRET_WSTR:
WideCharToMultiByte(CP_ACP,
0,
@ -1610,7 +1600,6 @@ BOOL IL_GetDisplayName(LPSHELLFOLDER lpsf,
break;
}
return TRUE;*/
}

View File

@ -2080,7 +2080,7 @@ LRESULT MsgCommand(HWND hwnd,WPARAM wParam,LPARAM lParam)
case IDM_VIEW_OPTIONS:
OptionsPropSheet(hwnd,g_hInstance);
OptionsPropSheet(hwnd, g_hLngResContainer);
break;