summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-19 21:23:59 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-09-19 21:23:59 (GMT)
commitb7fa92c9e1de1091e407eba98f7710f15f4eae2c (patch)
treeca451004be090676c432d63f7241c69edb5afd71
parent8f3d8e747084238ea54b2b930ad988d68c64edbe (diff)
downloadCMake-b7fa92c9e1de1091e407eba98f7710f15f4eae2c.zip
CMake-b7fa92c9e1de1091e407eba98f7710f15f4eae2c.tar.gz
CMake-b7fa92c9e1de1091e407eba98f7710f15f4eae2c.tar.bz2
Add support for exiting after loading
-rw-r--r--Source/WXDialog/cmWXMainFrame.cxx19
-rw-r--r--Source/WXDialog/cmWXMainFrame.h2
2 files changed, 20 insertions, 1 deletions
diff --git a/Source/WXDialog/cmWXMainFrame.cxx b/Source/WXDialog/cmWXMainFrame.cxx
index 829b5c8..137d916 100644
--- a/Source/WXDialog/cmWXMainFrame.cxx
+++ b/Source/WXDialog/cmWXMainFrame.cxx
@@ -216,12 +216,17 @@ cmMainFrame::cmMainFrame(const wxString& title, const wxSize& size)
this->ConnectEvent( this->m_GeneratorMenu, wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction) &cmMainFrame::OnGeneratorSelected );
+
+ this->ConnectEvent( this, wxEVT_TIMER,
+ (wxObjectEventFunction) &cmMainFrame::OnExitTimer );
+
this->Connect(cmCacheProperty::Menu_Popup_Ignore, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) &cmMainFrame::OnPopupMenuIgnore);
this->Connect(cmCacheProperty::Menu_Popup_Delete, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) &cmMainFrame::OnPopupMenuDelete);
this->Connect(cmCacheProperty::Menu_Popup_Help, wxEVT_COMMAND_MENU_SELECTED,
(wxObjectEventFunction) &cmMainFrame::OnPopupMenuHelp);
+
}
cmMainFrame::~cmMainFrame()
@@ -489,12 +494,18 @@ void cmMainFrame::OnPropertyChanged(wxEvent& event)
void cmMainFrame::OnResize(wxSizeEvent& event)
{
-
+
this->wxFrame::OnSize(event);
// Expand inner pannel when window resizes
this->ResizeInternal();
+}
+void cmMainFrame::OnExitTimer(wxEvent& event)
+{
+ this->Close();
+ this->Refresh();
}
+
void cmMainFrame::ResizeInternal()
{
// Expand inner pannel when window resizes
@@ -588,6 +599,12 @@ void cmMainFrame::Initialize(cmCommandLineInfo* cmdInfo)
*/
this->LoadCacheFromDiskToGUI();
+ if ( cmdInfo->m_ExitAfterLoad )
+ {
+ std::cout << "Set timer" << std::endl;
+ this->m_ExitTimer = new wxTimer(this, this->GetId());
+ this->m_ExitTimer->Start(3000);
+ }
}
//! Set the current generator
diff --git a/Source/WXDialog/cmWXMainFrame.h b/Source/WXDialog/cmWXMainFrame.h
index 110e081..e33990a 100644
--- a/Source/WXDialog/cmWXMainFrame.h
+++ b/Source/WXDialog/cmWXMainFrame.h
@@ -66,6 +66,7 @@ public:
void OnPopupMenu(wxMouseEvent& event);
void OnCacheStatusBar(wxEvent& event);
void OnStatusBar(wxEvent& event);
+ void OnExitTimer(wxEvent& event);
//! Callbacks for menu events
void OnPopupMenuIgnore(wxEvent& event);
@@ -214,6 +215,7 @@ private:
CacheMapType* m_CacheEntries;
cmake* m_CMakeInstance;
+ wxTimer* m_ExitTimer;
enum Events {
ID_MainFrame,