ueventdata->ItemLabel = _("Stopped");
wxPostEvent(static_cast<frmActivityMgr*>(ActMgrPtr), uevent);
- iter->second = 5;
+ iter->second = 6;
} else if (iter->second == 4){
}
+ // Delete the connection object if finished.
+
+ if (iter->second > 4){
+
+ std::map<int,ConnectionObject*>::iterator ConnObjectIter = ActListConnObjectsPtr->find(iter->first);
+
+ delete ConnObjectIter->second;
+ ConnObjectIter->second = nullptr;
+
+ }
+
// Insert a finish date.
wxDateTime adt;
adt = adt.Now();
ActListFinDTPtr->insert(std::make_pair(iter->first, adt));
-
- // Delete the connection object.
-
- std::map<int, CardDAV*>::iterator ConnObject = ActListConnPtr->find(iter->first);
- delete ConnObject->second;
- ConnObject->second = NULL;
-
+
}
if (ClearupProcessed == TRUE){
std::map<int,wxString> *ActListDetail, bool *TasksActive,
wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
- std::map<int,wxDateTime> *ActListFinDT, std::map<int, CardDAV*> *ActListConn){
+ std::map<int,wxDateTime> *ActListFinDT, std::map<int,ConnectionObject*> *ActListConnObjects){
// Setup the pointers for wxActListProcTimer.
ActTimerPtr = ActTimer;
ActProcessTimerPtr = ActProcessTimer;
ActListFinDTPtr = ActListFinDT;
- ActListConnPtr = ActListConn;
+ ActListConnObjectsPtr = ActListConnObjects;
}
AccountDir = PrefData.accounts.GetAccountDirectory(i);
AccountType = PrefData.accounts.GetAccountType(i);
-
+
if (AccountDir.IsEmpty()){
continue;
}
- if (AccountType == wxT("Local") || AccountType == wxT("local")){
- continue;
+ if (AccountType != wxT("CardDAV") && AccountType != wxT("carddav")){
+ continue;
}
AccountDir.Trim();