From: Kiri Date: Thu, 13 Aug 2015 09:30:36 +0000 (+0100) Subject: Display error message when trying to refresh address book from a local account. X-Git-Tag: release-0.05~84^2 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=b85066836998d2e8834dc224e61e9855381671e4 Display error message when trying to refresh address book from a local account. --- diff --git a/source/frmMain.cpp b/source/frmMain.cpp index 8e6ec60..c062c15 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -1210,15 +1210,26 @@ void frmMain::ShowContactEditorEdit( wxCommandEvent& event ) } 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(ActMgrPtr); - frameActMgr->AddTask(3, wxT(""), ActiveAccount, - wxT(""), wxT(""), wxT(""), wxT("")); - + + if (ActiveAccountType != wxT("Local")){ + + // Account type is not local. + + frmActivityMgr *frameActMgr = static_cast(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")); + + } + } }