From: Steve Brokenshire Date: Sun, 20 Sep 2015 11:55:17 +0000 (+0100) Subject: Processing status no longer remains after task for editing a contact is completed. X-Git-Tag: release-0.05~78 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=48ee8536f42ca5a34cb8d465651519d74a625d19;p=xestiaab%2F.git Processing status no longer remains after task for editing a contact is completed. --- diff --git a/source/common/timers.cpp b/source/common/timers.cpp index d4ec0eb..abe6f5e 100644 --- a/source/common/timers.cpp +++ b/source/common/timers.cpp @@ -216,12 +216,7 @@ void wxActListProcTimer::Notify(){ for (std::map::iterator iter = ActListPtr->begin(); iter != ActListPtr->end(); ++iter){ - // Check for any queued tasks and start one. - - if (iter->second > 4){ - continue; - } - + // Check for any queued tasks and start one. // 0 = Queued. // 1 = Processing. @@ -234,30 +229,62 @@ void wxActListProcTimer::Notify(){ // 8 = Completed. (UI Updated). std::map::iterator LongIter = ActListUIPtr->find(iter->first); + + if (iter->second > 4){ + + continue; + } + std::map::iterator DetailIter = ActListDetailPtr->find(iter->first); - + + wxCommandEvent uevent(ACTMGR_UPDATESTATUSLABEL); + ActivityMgrLabelUpdate *ueventdata = new ActivityMgrLabelUpdate; + uevent.SetClientData(ueventdata); + if (iter->second == 1){ - lstActivityPtr->SetItem(LongIter->second, 2, _("Processing...")); + ueventdata->ItemIndex = LongIter->second; + ueventdata->ItemLabel = _("Processing..."); + ueventdata->ItemDes = _("Adding Contact '") + DetailIter->second + _("'..."); + + wxPostEvent(static_cast(ActMgrPtr), uevent); + + /*lstActivityPtr->SetItem(LongIter->second, 2, _("Processing...")); if (ActListDetailPtr->find(iter->first) != ActListDetailPtr->end()){ lblDetailsPtr->SetLabel(_("Adding Contact '") + DetailIter->second + _("'...")); - } - //CardDAVIter->second. + }*/ } else if (iter->second == 2){ - lstActivityPtr->SetItem(LongIter->second, 2, _("Failed")); - iter->second = 5; - + ueventdata->ItemIndex = LongIter->second; + ueventdata->ItemLabel = _("Failed"); + + wxPostEvent(static_cast(ActMgrPtr), uevent); + iter->second = 5; + + //lstActivityPtr->SetItem(LongIter->second, 2, _("Failed")); + } else if (iter->second == 3){ + + ueventdata->ItemIndex = LongIter->second; + ueventdata->ItemLabel = _("Stopped"); + + wxPostEvent(static_cast(ActMgrPtr), uevent); + iter->second = 5; - lstActivityPtr->SetItem(LongIter->second, 2, _("Stopped")); - iter->second = 6; + //lstActivityPtr->SetItem(LongIter->second, 2, _("Stopped")); + //iter->second = 6; } else if (iter->second == 4){ - lstActivityPtr->SetItem(LongIter->second, 2, _("Completed")); - iter->second = 8; + ueventdata->ItemIndex = LongIter->second; + ueventdata->ItemLabel = _("Completed"); + + wxPostEvent(static_cast(ActMgrPtr), uevent); + iter->second = 8; + + //lstActivityPtr->SetItem(LongIter->second, 2, _("Completed")); + //iter->second = 8; }