summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2003-07-15 16:52:47 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2003-07-15 16:52:47 (GMT)
commitf47b9d01ce7d5af42288d9d7ce5bd512f9a05867 (patch)
treed181e7472c2c6cb99cf0cd0fc96136d018ecbb44 /Source/MFCDialog
parentaeab59d9e71df3cc036942aa9ea294c53c2ce9c8 (diff)
downloadCMake-f47b9d01ce7d5af42288d9d7ce5bd512f9a05867.zip
CMake-f47b9d01ce7d5af42288d9d7ce5bd512f9a05867.tar.gz
CMake-f47b9d01ce7d5af42288d9d7ce5bd512f9a05867.tar.bz2
ENH: remove local broken implementation of convert to windows path
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.cpp32
1 files changed, 4 insertions, 28 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index 209f3ad..78a096e 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -21,30 +21,6 @@
static char THIS_FILE[] = __FILE__;
#endif
-// Convert to Win32 path (slashes). But it's not in cmSystemTools, so
-// the 2 billions people that are using the CMake API can not mistake
-// it with cmMakeMyCoffeeButNoSugarPlease().
-
-std::string ConvertToWindowsPath(const char* path)
-{
- // Convert to output path.
- // Remove the "" around it (if any) since it's an output path for
- // the shell. If another shell-oriented feature is not designed
- // for a GUI use, then we are in trouble.
-
- std::string s = cmSystemTools::ConvertToOutputPath(path);
- std::string::iterator i = s.begin();
- if (*i == '\"')
- {
- s.erase(i, i + 1);
- }
- i = s.begin() + s.length() - 1;
- if (*i == '\"')
- {
- s.erase(i, i + 1);
- }
- return s;
-}
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
@@ -747,7 +723,7 @@ void CMakeSetupDialog::OnChangeWhereBuild()
cachem->LoadCache(path.c_str()) &&
it.Find("CMAKE_HOME_DIRECTORY"))
{
- path = ConvertToWindowsPath(it.GetValue());
+ path = cmSystemTools::ConvertToOutputPath(it.GetValue());
this->m_WhereSource = path.c_str();
this->m_WhereSourceControl.SetWindowText(this->m_WhereSource);
this->OnChangeWhereSource();
@@ -1399,15 +1375,15 @@ void CMakeSetupDialog::ChangeDirectoriesFromFile(const char* buffer)
cachem->LoadCache(path.c_str()) &&
it.Find("CMAKE_HOME_DIRECTORY"))
{
- path = ConvertToWindowsPath(path.c_str());
+ path = cmSystemTools::ConvertToOutputPath(path.c_str());
this->m_WhereBuild = path.c_str();
- path = ConvertToWindowsPath(it.GetValue());
+ path = cmSystemTools::ConvertToOutputPath(it.GetValue());
this->m_WhereSource = path.c_str();
}
else
{
- path = ConvertToWindowsPath(path.c_str());
+ path = cmSystemTools::ConvertToOutputPath(path.c_str());
this->m_WhereSource = this->m_WhereBuild = path.c_str();
}
}