}
void frmMain::RefreshAddressBook( wxCommandEvent& event ){
-
- // TODO: Check Account Type.
+
+ // Check if ActiveAccount is empty. If not then check if
+ // account type is not local otherwise continue.
if (!ActiveAccount.IsEmpty()){
-
- frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
- frameActMgr->AddTask(3, wxT(""), ActiveAccount,
- wxT(""), wxT(""), wxT(""), wxT(""));
-
+
+ if (ActiveAccountType != wxT("Local")){
+
+ // Account type is not local.
+
+ frmActivityMgr *frameActMgr = static_cast<frmActivityMgr*>(ActMgrPtr);
+ frameActMgr->AddTask(3, wxT(""), ActiveAccount,
+ wxT(""), wxT(""), wxT(""), wxT(""));
+
+ } else {
+
+ wxMessageBox(_("The refresh address book command is not supported with this type of account."), wxT("Not supported for this type of account"));
+
+ }
+
}
}