Changed: Formatting
This commit is contained in:
parent
0cdb27c68b
commit
c988710323
1 changed files with 256 additions and 250 deletions
|
@ -221,14 +221,16 @@ int CDirDialog::DoBrowse ()
|
||||||
// // Get a pointer to the Desktop's IShellFolder interface. //
|
// // Get a pointer to the Desktop's IShellFolder interface. //
|
||||||
if (SUCCEEDED(SHGetDesktopFolder(&pDesktopFolder)))
|
if (SUCCEEDED(SHGetDesktopFolder(&pDesktopFolder)))
|
||||||
{
|
{
|
||||||
|
#ifndef _UNICODE
|
||||||
//
|
//
|
||||||
// IShellFolder::ParseDisplayName requires the file name be in Unicode.
|
// IShellFolder::ParseDisplayName requires the file name be in Unicode.
|
||||||
//
|
//
|
||||||
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, m_strInitDir.GetBuffer (MAX_PATH), -1,
|
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, m_strInitDir.GetBuffer(MAX_PATH), -1, olePath, MAX_PATH);
|
||||||
olePath, MAX_PATH);
|
|
||||||
|
|
||||||
m_strInitDir.ReleaseBuffer(-1);
|
m_strInitDir.ReleaseBuffer(-1);
|
||||||
|
#else
|
||||||
|
wcscpy(olePath, (LPCTSTR)m_strInitDir);
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// Convert the path to an ITEMIDLIST.
|
// Convert the path to an ITEMIDLIST.
|
||||||
//
|
//
|
||||||
|
@ -238,25 +240,29 @@ int CDirDialog::DoBrowse ()
|
||||||
&chEaten,
|
&chEaten,
|
||||||
&pidl,
|
&pidl,
|
||||||
&dwAttributes);
|
&dwAttributes);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
pMalloc->Free(pidl);
|
pMalloc->Free(pidl);
|
||||||
pMalloc->Release();
|
pMalloc->Release();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bInfo.pidlRoot = pidl;
|
bInfo.pidlRoot = pidl;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bInfo.hwndOwner = NULL;
|
bInfo.hwndOwner = NULL;
|
||||||
bInfo.pszDisplayName = m_strPath.GetBuffer(MAX_PATH);
|
bInfo.pszDisplayName = m_strPath.GetBuffer(MAX_PATH);
|
||||||
bInfo.lpszTitle = (m_strTitle.IsEmpty()) ? "Open" : m_strTitle;
|
bInfo.lpszTitle = (m_strTitle.IsEmpty()) ? "Open" : m_strTitle;
|
||||||
bInfo.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
|
bInfo.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
|
||||||
|
|
||||||
|
|
||||||
if ((pidl = ::SHBrowseForFolder(&bInfo)) == NULL)
|
if ((pidl = ::SHBrowseForFolder(&bInfo)) == NULL)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strPath.ReleaseBuffer();
|
m_strPath.ReleaseBuffer();
|
||||||
m_iImageIndex = bInfo.iImage;
|
m_iImageIndex = bInfo.iImage;
|
||||||
|
|
||||||
|
@ -319,9 +325,9 @@ void CBranch_patcherDlg::OnButtonPatch()
|
||||||
UpdateData(true);
|
UpdateData(true);
|
||||||
|
|
||||||
CString diffCmdLine;
|
CString diffCmdLine;
|
||||||
diffCmdLine.Format( "cvs.exe diff -c > %s 2> %s", TEMP_DIFF_FILE, DIFF_ERRORS ); // needs a valid cvs login before! and cvs.exe in the path
|
diffCmdLine.Format(_T("cvs.exe diff -c > %s 2> %s"), TEMP_DIFF_FILE, DIFF_ERRORS); // needs a valid cvs login before! and cvs.exe in the path
|
||||||
CString text;
|
CString text;
|
||||||
text.Format( "Get diff from directory %s?\n\nCommand (choose No to copy it into the clipboard):\n%s", m_SrcDir, diffCmdLine );
|
text.Format(_T("Get diff from directory %s?\n\nCommand (choose No to copy it into the clipboard):\n%s"), m_SrcDir, diffCmdLine);
|
||||||
int result;
|
int result;
|
||||||
if ((result = ::MessageBox(m_hWnd, text, "Confirmation", MB_YESNOCANCEL | MB_ICONQUESTION)) == IDYES)
|
if ((result = ::MessageBox(m_hWnd, text, "Confirmation", MB_YESNOCANCEL | MB_ICONQUESTION)) == IDYES)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue