Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Code cleanup and move of XABPreferences object creation to outside of the for loop...
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 9 Jul 2016 09:43:59 +0000 (10:43 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sat, 9 Jul 2016 09:43:59 +0000 (10:43 +0100)
source/actmgr/frmActivityMgr.cpp

index 63755f8..546795a 100644 (file)
@@ -218,6 +218,7 @@ void frmActivityMgr::ProcessTasksThread()
        std::map<int,long>::iterator LongIter;
        bool TasksFoundProc = FALSE;
        wxString TaskDetail;
+       XABPreferences PrefData(GetUserPrefDir());
        
        for (std::map<int,int>::iterator iter = ActivityList.begin(); 
         iter != ActivityList.end(); ++iter){
@@ -268,7 +269,6 @@ void frmActivityMgr::ProcessTasksThread()
                // 8 = Completed. (UI Updated). 
                
                frmMain *frmMainPtrGet = static_cast<frmMain*>(frmMainPtr);
-               XABPreferences PrefData(GetUserPrefDir());
                
                if (iter->second == 0){
                
@@ -1221,13 +1221,6 @@ void frmActivityMgr::ProcessTasksThread()
                                                                event.SetClientData(&SSLICNProcData);
                                                                wxPostEvent(frmMainPtrGet, event);
                                        
-                                                               /*timespec n1, n2;
-                                               
-                                                               // Fall asleep until we get an response.
-                                               
-                                                               n1.tv_sec = 0;
-                                                               n1.tv_nsec = 250000000L;*/
-                                       
                                                                while (*PauseMode == TRUE){
                                                                        //nanosleep(&n1, &n2);
                                                                        SleepFor(250000000);
@@ -1466,11 +1459,6 @@ void frmActivityMgr::ProcessTasksThread()
                                                                event.SetClientData(&vCardProcData);
                                                                wxPostEvent(frmMainPtrGet, event);
                                                
-                                                               /*timespec n1, n2;
-                                               
-                                                               n1.tv_sec = 0;
-                                                               n1.tv_nsec = 250000000L;*/
-                                               
                                                                while (*PauseMode == TRUE){
                                                                        //nanosleep(&n1, &n2);
                                                                        SleepFor(250000000);
@@ -1735,11 +1723,6 @@ void frmActivityMgr::ProcessTasksThread()
                                                                event.SetClientData(&vCardProcData);
                                                                wxPostEvent(frmMainPtrGet, event);
                                                
-                                                               /*timespec n1, n2;
-                                               
-                                                               n1.tv_sec = 0;
-                                                               n1.tv_nsec = 250000000L;*/
-                                               
                                                                while (*PauseMode == TRUE){
                                                                        //nanosleep(&n1, &n2);
                                                                        SleepFor(250000000);
@@ -1872,11 +1855,6 @@ void frmActivityMgr::ProcessTasksThread()
                                                                event.SetClientData(&vCardProcData);
                                                                wxPostEvent(frmMainPtrGet, event);
                                        
-                                                               /*timespec n1, n2;
-                                               
-                                                               n1.tv_sec = 0;
-                                                               n1.tv_nsec = 250000000L;*/
-                                       
                                                                while (*PauseMode == TRUE){
                                                                        //nanosleep(&n1, &n2);
                                                                        SleepFor(250000000);
@@ -2041,11 +2019,11 @@ void frmActivityMgr::ProcessTasksThread()
                                                KeepUpdating = FALSE;
                                        
                                        }
-                                       
+
                                }
-                               
+
                                // Mark as completed.
-                       
+
                                wxString AccountNameFinal;
                                AccountNameFinal = PrefData.accounts.GetAccountDirectory(AccountID);
                                AccountNameFinal.Append(wxT(".carddav"));
@@ -2053,7 +2031,7 @@ void frmActivityMgr::ProcessTasksThread()
                                wxCommandEvent reloadevent(RELOADCONTACTLIST);
                                reloadevent.SetString(AccountNameFinal);
                                wxPostEvent(this->GetParent(), reloadevent);
-                               
+
                                iter->second = 4;
                                continue;
                        
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