diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-09-12 02:46:32 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-09-12 02:46:32 +0000 |
commit | 759f7f34281a2c3d406ce93e52e63272a9d4beba (patch) | |
tree | 491339afc3ba74316d9d9019318836ffb6621ce8 /cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp | |
parent | bug fix to the icepack hello demo. (diff) | |
download | ice-759f7f34281a2c3d406ce93e52e63272a9d4beba.tar.bz2 ice-759f7f34281a2c3d406ce93e52e63272a9d4beba.tar.xz ice-759f7f34281a2c3d406ce93e52e63272a9d4beba.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=335
Diffstat (limited to 'cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp')
-rwxr-xr-x | cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp index cbfe479a5de..3c848196642 100755 --- a/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp +++ b/cpp/demo/IcePatch2/MFC/PatchClientDlg.cpp @@ -18,6 +18,8 @@ #define new DEBUG_NEW #endif +using namespace std; + class DialogPatcherFeedback : public IcePatch2::PatcherFeedback { public: @@ -30,7 +32,7 @@ public: } virtual bool - noFileSummary(const std::string& reason) + noFileSummary(const string& reason) { return IDYES == AfxMessageBox("Cannot load file summary. Perform a thorough patch?", MB_YESNO|MB_ICONSTOP); } @@ -42,7 +44,7 @@ public: } virtual bool - checksumProgress(const std::string& path) + checksumProgress(const string& path) { return _dialog->checksumProgress(path); } @@ -72,7 +74,7 @@ public: } virtual bool - patchStart(const std::string& path, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) + patchStart(const string& path, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) { return _dialog->patchStart(path, size, totalProgress, totalSize); } @@ -123,7 +125,7 @@ CPatchDlg::checksumStart() } bool -CPatchDlg::checksumProgress(const std::string& path) +CPatchDlg::checksumProgress(const string& path) { // TODO: indicate busy progress @@ -175,7 +177,7 @@ CPatchDlg::fileListEnd() } bool -CPatchDlg::patchStart(const std::string& path, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) +CPatchDlg::patchStart(const string& path, Ice::Long size, Ice::Long totalProgress, Ice::Long totalSize) { if(!_isPatch) { @@ -375,18 +377,18 @@ CPatchDlg::OnStartPatch() AfxMessageBox(CString("Please select a patch directory."), MB_OK|MB_ICONEXCLAMATION); return; } - properties->setProperty("IcePatch2.Directory", std::string(path)); + properties->setProperty("IcePatch2.Directory", string(path)); // // Set the thorough patch flag. // - std::string thorough = _thorough->GetCheck() == BST_CHECKED ? "1" : "0"; + string thorough = _thorough->GetCheck() == BST_CHECKED ? "1" : "0"; properties->setProperty("IcePatch2.Thorough", thorough); // // Set the remove orphan flag. // - std::string remove = _remove->GetCheck() == BST_CHECKED ? "1" : "0"; + string remove = _remove->GetCheck() == BST_CHECKED ? "1" : "0"; properties->setProperty("IcePatch2.Remove", remove); DialogPatcherFeedbackPtr feedback = new DialogPatcherFeedback(this); @@ -423,7 +425,7 @@ CPatchDlg::OnStartPatch() { handleException(ex); } - catch(const std::string& ex) + catch(const string& ex) { AfxMessageBox(CString(ex.c_str()), MB_OK|MB_ICONEXCLAMATION); } @@ -477,9 +479,9 @@ CPatchDlg::handleException(const IceUtil::Exception& e) } catch(const IceUtil::Exception& ex) { - std::ostringstream ostr; + ostringstream ostr; ostr << ex; - std::string s = ostr.str(); + string s = ostr.str(); AfxMessageBox(CString(s.c_str()), MB_OK|MB_ICONEXCLAMATION); } |