DEFINE_EVENT_TYPE(GETSELECTEDLIST);
DEFINE_EVENT_TYPE(SYNCACCOUNT);
DEFINE_EVENT_TYPE(IMPORT_RESULTSSHOW);
+DEFINE_EVENT_TYPE(RELOADCONTACTLIST);
BEGIN_EVENT_TABLE(frmMain, wxFrame)
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_BUTTON_CLICKED, frmMain::ConflictResolution)
EVT_COMMAND(wxID_ANY, GETSELECTEDLIST, frmMain::GetSelectedList)
EVT_COMMAND(wxID_ANY, SYNCACCOUNT, frmMain::SyncAccount)
EVT_COMMAND(wxID_ANY, IMPORT_RESULTSSHOW, frmMain::ShowImportResults)
+EVT_COMMAND(wxID_ANY, RELOADCONTACTLIST, frmMain::ReloadContactList)
END_EVENT_TABLE()
frmMain::frmMain( wxWindow* parent )
}
+void frmMain::QuitApp( wxCloseEvent& event )
+{
+
+ QuitApp();
+
+}
+
void frmMain::QuitApp( wxCommandEvent& event )
+{
+
+ QuitApp();
+
+}
+
+void frmMain::QuitApp()
{
//-------------------------------------------------------------------
// frmMain::QuitApp: Quits the application by simply closing this
// window which causes the exit as frmMain is the main window.
//
// wxCommandEvent Accepts a referenced event command.
+ //-------------------------------------------------------------------
+
+ //-------------------------------------------------------------------
+ // frmMain::QuitApp: Quits the application by simply closing this
+ // window which causes the exit as frmMain is the main window.
+ //
+ // wxCommandEvent Accepts a referenced event command.
//-------------------------------------------------------------------
//Go through the windows and close each one (be it search
std::exit(0);
-}
-
-void frmMain::QuitApp()
-{
- //-------------------------------------------------------------------
- // frmMain::QuitApp: Quits the application by simply closing this
- // window which causes the exit as frmMain is the main window.
- //
- // wxCommandEvent Accepts a referenced event command.
- //-------------------------------------------------------------------
-
Close();
}
void frmMain::SyncAccount( wxCommandEvent& event ){
- wxString *AccNameInc = (wxString*)event.GetClientData();
+ wxString AccNameInc = event.GetString();
frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
- frameActMgr->AddTask(3, wxT(""), *AccNameInc,
+ frameActMgr->AddTask(3, wxT(""), AccNameInc,
wxT(""), wxT(""), wxT(""), wxT(""));
}
delete ResultData;
ResultData = NULL;
+}
+
+void frmMain::ReloadContactList( wxCommandEvent &event ){
+
+ // Check if the account name given is the current
+ // account selected.
+
+ if (ActiveAccount == event.GetString()){
+
+ wxTreeEvent NullEvent;
+ LoadContactList(NullEvent);
+
+ }
+
}
\ No newline at end of file