summaryrefslogtreecommitdiffstats
path: root/Source/WXDialog/cmWXMainFrame.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-11-14 23:18:49 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-11-14 23:18:49 (GMT)
commitc91ca248f6b0cb9a1eebf47dce9a56e51e40b1db (patch)
tree20962dedb748112e81a87b80fd97967b07b0ad7a /Source/WXDialog/cmWXMainFrame.cxx
parent9f6e61361c2672d98c80014da693fb2beebfe9a9 (diff)
downloadCMake-c91ca248f6b0cb9a1eebf47dce9a56e51e40b1db.zip
CMake-c91ca248f6b0cb9a1eebf47dce9a56e51e40b1db.tar.gz
CMake-c91ca248f6b0cb9a1eebf47dce9a56e51e40b1db.tar.bz2
Add progress reporting
Diffstat (limited to 'Source/WXDialog/cmWXMainFrame.cxx')
-rw-r--r--Source/WXDialog/cmWXMainFrame.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/Source/WXDialog/cmWXMainFrame.cxx b/Source/WXDialog/cmWXMainFrame.cxx
index 605433f..3a7f482 100644
--- a/Source/WXDialog/cmWXMainFrame.cxx
+++ b/Source/WXDialog/cmWXMainFrame.cxx
@@ -239,6 +239,7 @@ cmMainFrame::cmMainFrame(const wxString& title, const wxSize& size)
this->Connect(cmCacheProperty::Menu_Popup_Help, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) &cmMainFrame::OnPopupMenuHelp);
+ this->m_CMakeInstance->SetProgressCallback(&cmMainFrame::ProgressCallback, this);
}
cmMainFrame::~cmMainFrame()
@@ -279,6 +280,27 @@ void cmMainFrame::MessageCallback(const char* m, const char* title, bool& nomore
}
+void cmMainFrame::ProgressCallback(const char* m, float prog,
+ void* clientData)
+{
+
+ if ( clientData )
+ {
+ cmMainFrame* self = static_cast<cmMainFrame*>( clientData );
+ char tmp[1024];
+ if (prog >= 0)
+ {
+ sprintf(tmp,"%s %i%%",m,(int)(100*prog));
+ }
+ else
+ {
+ sprintf(tmp,"%s",m);
+ }
+ self->SetStatusText(tmp);
+ wxYield();
+ }
+}
+
void cmMainFrame::DisplayMessage(const char* m, const char* title, bool& nomore)
{
this->CursorNormal(false);
@@ -829,6 +851,7 @@ void cmMainFrame::RunCMake(bool generateProjectFiles)
cmSystemTools::Error(
"Error in configuration process, project files may be invalid");
}
+
// update the GUI with any new values in the caused by the
// generation process
this->LoadCacheFromDiskToGUI();
@@ -1438,6 +1461,7 @@ void cmMainFrame::CursorBusy(bool s)
{
this->m_CursorChanged = true;
}
+ wxYield();
}
void cmMainFrame::CursorNormal(bool s)
@@ -1447,6 +1471,7 @@ void cmMainFrame::CursorNormal(bool s)
{
this->m_CursorChanged = false;
}
+ wxYield();
}
void cmMainFrame::OnSourceUpdated(wxCommandEvent& event)