Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Display error message when trying to refresh address book from a local account.
authorKiri <kiri@Kiriha.LasLindas>
Thu, 13 Aug 2015 09:30:36 +0000 (10:30 +0100)
committerKiri <kiri@Kiriha.LasLindas>
Thu, 13 Aug 2015 09:30:36 +0000 (10:30 +0100)
source/frmMain.cpp

index 8e6ec60..c062c15 100644 (file)
@@ -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<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"));
+       
+       }
+       
     }
     
 }
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