**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
-BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxFrame* pParentFrame, BackgroundProcessingDocument* pDocument, const char* const pszProcessTitle, int iTotalUnits)
- : wxEvtHandler(), m_pMyThread(pMyThread), m_pParentFrame(pParentFrame), m_pDocument(pDocument), m_strProcessTitle(pszProcessTitle),
+BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxWindow* pParentFrame, BackgroundProcessingDocument* pDocument, wxChar const* pszProcessTitle, int iTotalUnits)
+ : wxEvtHandler(), m_pMyThread(pMyThread), m_pParentFrame(pParentFrame), m_pDocument(pDocument), m_strProcessTitle(pszProcessTitle),
m_iTotalUnits(iTotalUnits), m_iNumThreads(0), m_bDone(false), m_bFail(false), m_bCancelled(false), m_iRunning(0),
m_pTimer(NULL), m_bWorkersDeleted(false), m_bBackgroundManagerAdded(false)
{
m_iNumThreads = theApp->getNumberCPU();
// ++m_iNumThreads;
m_iTotalUnits(iTotalUnits), m_iNumThreads(0), m_bDone(false), m_bFail(false), m_bCancelled(false), m_iRunning(0),
m_pTimer(NULL), m_bWorkersDeleted(false), m_bBackgroundManagerAdded(false)
{
m_iNumThreads = theApp->getNumberCPU();
// ++m_iNumThreads;
m_vecpThreads[iThread] = createWorker (iThread, iStartUnit, iNumUnits);
if (! m_vecpThreads[iThread]) {
m_bFail = true;
m_vecpThreads[iThread] = createWorker (iThread, iStartUnit, iNumUnits);
if (! m_vecpThreads[iThread]) {
m_bFail = true;
addTaskEvent.SetInt (m_iTotalUnits);
addTaskEvent.SetClientData (this);
wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
addTaskEvent.SetInt (m_iTotalUnits);
addTaskEvent.SetClientData (this);
wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
#ifdef USE_BKGMGR
wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_UNIT_TICK);
addTaskEvent.SetInt (m_iUnitsDone - 1);
#ifdef USE_BKGMGR
wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_UNIT_TICK);
addTaskEvent.SetInt (m_iUnitsDone - 1);
wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
eventLog.SetString( msg );
wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
eventLog.SetString( msg );
wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event