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::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
DECLARE_EVENT_TYPE(GETSELECTEDLIST, wxID_ANY);
DECLARE_EVENT_TYPE(SYNCACCOUNT, wxID_ANY);
DECLARE_EVENT_TYPE(IMPORT_RESULTSSHOW, wxID_ANY);
+DECLARE_EVENT_TYPE(RELOADCONTACTLIST, wxID_ANY);
struct UCNotif{
wxString ContactAccount;
void OpenNewABDialog( wxCommandEvent& event );
void LoadPreferences( wxActivateEvent& event );
void LoadPreferences();
- void LoadContactList( wxTreeEvent& event );
void ShowContactInfo( wxListEvent& event );
void OpenContactInfo( wxListEvent& event );
void OpenContactInfo( wxCommandEvent& event );
void ShowContactEditorNew( wxCommandEvent& event );
void ShowContactEditorEdit( wxCommandEvent& event );
void RefreshAddressBook( wxCommandEvent& event );
- void ShowActivityWindow( wxCommandEvent& event );
+ void ShowActivityWindow( wxCommandEvent& event );
+ void LoadContactList( wxTreeEvent& event );
wxTreeItemId FindItemNamed(wxTreeCtrl &tree,
const std::wstring &name);
void ConflictResolution( wxCommandEvent& event );
void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollection SSLCertInc);
void GetListControl(wxListCtrl *lstContactsPtr, wxArrayString *ContactsFileIndexPtr);
void ShowImportResults( wxCommandEvent& event );
+ void ReloadContactList( wxCommandEvent& event );
XABViewMode GetViewMode();
DECLARE_EVENT_TABLE()