Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Removed references of CardDAV and delete ConnectionObject when finished
[xestiaab/.git] / source / common / timers.cpp
index 88bbb3e..4ba3e94 100644 (file)
@@ -297,7 +297,7 @@ void wxActListProcTimer::Notify(){
                        ueventdata->ItemLabel = _("Stopped");
            
                        wxPostEvent(static_cast<frmActivityMgr*>(ActMgrPtr), uevent);
-                       iter->second = 5;
+                       iter->second = 6;
             
                } else if (iter->second == 4){
             
@@ -309,6 +309,17 @@ void wxActListProcTimer::Notify(){
             
                }
         
+               // 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;
@@ -345,7 +356,7 @@ void wxActListProcTimer::SetupPointers(std::map<int,int> *ActList, std::map<int,
                                        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.
     
@@ -360,7 +371,7 @@ void wxActListProcTimer::SetupPointers(std::map<int,int> *ActList, std::map<int,
        ActTimerPtr = ActTimer;
        ActProcessTimerPtr = ActProcessTimer;
        ActListFinDTPtr = ActListFinDT;
-       ActListConnPtr = ActListConn;
+       ActListConnObjectsPtr = ActListConnObjects;
     
 }
 
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