Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated AppXestiaCalendar.cpp/.h
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 25 Dec 2016 01:28:49 +0000 (01:28 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 25 Dec 2016 01:28:49 +0000 (01:28 +0000)
source/AppXestiaCalendar.cpp
source/AppXestiaCalendar.h

index 6ba325c..5ccf62b 100644 (file)
@@ -30,7 +30,7 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
        mnuManage->AppendSeparator();
        
        wxMenuItem* mnuManageExit;
-       mnuManageExit = new wxMenuItem( mnuManage, wxID_EXIT, wxString( wxT("Exit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL );
+       mnuManageExit = new wxMenuItem( mnuManage, wxID_EXIT, wxString( wxT("Quit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL );
        mnuManage->Append( mnuManageExit );
        
        menuBar->Append( mnuManage, wxT("Manage") ); 
@@ -70,10 +70,18 @@ frmMainADT::frmMainADT( wxWindow* parent, wxWindowID id, const wxString& title,
        this->Layout();
        
        this->Centre( wxBOTH );
+       
+       // Connect Events
+       this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );
+       this->Connect( mnuManageExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
 }
 
 frmMainADT::~frmMainADT()
 {
+       // Disconnect Events
+       this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );
+       this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
+       
 }
 
 frmUpdateADT::frmUpdateADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
index faaf083..21b70ce 100644 (file)
@@ -55,6 +55,11 @@ class frmMainADT : public wxFrame
                wxMenu* mnuCreate;
                wxMenu* mnuHelp;
                wxBoxSizer* szrMain;
+               
+               // Virtual event handlers, overide them in your derived class
+               virtual void QuitApp( wxCloseEvent& event ) { event.Skip(); }
+               virtual void QuitApp( wxCommandEvent& event ) { event.Skip(); }
+               
        
        public:
                
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy