X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=blobdiff_plain;f=source%2Fcommon%2Ftimers.cpp;h=6e49cab03045b9c3b5e91bf148de9c9c893836b5;hp=88bbb3e2501a64bd5af2d82bf219d39db7aae325;hb=f69e09d827e06435ea94bb73aa71ab5f9d5c035b;hpb=e6cd13ea863b88fbb7140e57ab8d3dc31ac9b1b7 diff --git a/source/common/timers.cpp b/source/common/timers.cpp index 88bbb3e..6e49cab 100644 --- a/source/common/timers.cpp +++ b/source/common/timers.cpp @@ -16,19 +16,7 @@ // You should have received a copy of the GNU General Public License along // with Xestia Address Book. If not, see -#include "../actmgr/frmActivityMgr.h" -#include "../frmContact.h" -#include "../frmMain.h" -#include -#include -#include -#include -#include -#include "../bitmaps.h" -#include "../enums.h" -#include "../common/preferences.h" -#include "../common/etag.h" -#include "../common/dirs.h" +#include "timers.h" void wxActTimer::Notify(){ @@ -297,7 +285,7 @@ void wxActListProcTimer::Notify(){ ueventdata->ItemLabel = _("Stopped"); wxPostEvent(static_cast(ActMgrPtr), uevent); - iter->second = 5; + iter->second = 6; } else if (iter->second == 4){ @@ -309,6 +297,17 @@ void wxActListProcTimer::Notify(){ } + // Delete the connection object if finished. + + if (iter->second > 4){ + + std::map::iterator ConnObjectIter = ActListConnObjectsPtr->find(iter->first); + + delete ConnObjectIter->second; + ConnObjectIter->second = nullptr; + + } + // Insert a finish date. wxDateTime adt; @@ -345,7 +344,7 @@ void wxActListProcTimer::SetupPointers(std::map *ActList, std::map *ActListDetail, bool *TasksActive, wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress, void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer, - std::map *ActListFinDT, std::map *ActListConn){ + std::map *ActListFinDT, std::map *ActListConnObjects){ // Setup the pointers for wxActListProcTimer. @@ -360,7 +359,7 @@ void wxActListProcTimer::SetupPointers(std::map *ActList, std::map