Clone
ixen <ixen@copyhandler.com>
committed
on 09 Apr 11
Added preliminary command-line option '--ImportTaskDefinition' - currently works only when launching first instance of CH (advances [#254404… Show more
Added preliminary command-line option '--ImportTaskDefinition' - currently works only when launching first instance of CH (advances [#2544046]).

Show less

LoggerImprovements + 5 more
src/ch/ClipboardMonitor.cpp (+1 -5)
164 164                         SetPropValue<PP_RECENTPATHS>(rConfig, dlg.m_bdData.cvRecent);
165 165
166 166                         SetPropValue<PP_FDEXTENDEDVIEW>(rConfig, dlg.m_bdData.bExtended);
167 167                         SetPropValue<PP_FDWIDTH>(rConfig, dlg.m_bdData.cx);
168 168                         SetPropValue<PP_FDHEIGHT>(rConfig, dlg.m_bdData.cy);
169 169                         SetPropValue<PP_FDSHORTCUTLISTSTYLE>(rConfig, dlg.m_bdData.iView);
170 170                         SetPropValue<PP_FDIGNORESHELLDIALOGS>(rConfig, dlg.m_bdData.bIgnoreDialogs);
171 171                         rConfig.Write();
172 172
173 173                         if(iResult == IDOK)
174 174                         {
175 175                                 // get dest path
176 176                                 CString strData;
177 177                                 dlg.GetPath(strData);
178 178                                 tTaskDefinition.SetDestinationPath(chcore::PathFromString(strData));
179 179
180 180                                 // load resource strings
181 181                                 SetTaskPropValue<eTO_AlternateFilenameFormatString_First>(tTaskDefinition.GetConfiguration(), GetResManager().LoadString(IDS_FIRSTCOPY_STRING));
182 182                                 SetTaskPropValue<eTO_AlternateFilenameFormatString_AfterFirst>(tTaskDefinition.GetConfiguration(), GetResManager().LoadString(IDS_NEXTCOPY_STRING));
183 183
184                                   CTaskPtr spTask = pData->m_pTasks->CreateTask();
185                                   spTask->SetTaskDefinition(tTaskDefinition);
  184                                 CTaskPtr spTask = pData->m_pTasks->CreateTask(tTaskDefinition);
186 185
187                                   // add task to a list of tasks and start
188                                   pData->m_pTasks->Add(spTask);
189  
190 186                                 // write spTask to a file
191 187                                 spTask->Store();
192 188
193 189                                 // start processing
194 190                                 spTask->BeginProcessing();
195 191                         }
196 192                 }
197 193
198 194                 // do we need to check for turning computer off
199 195                 if(uiShutCounter == 0 && GetPropValue<PP_PSHUTDOWNAFTREFINISHED>(GetConfig()))
200 196                 {
201 197                         if(pData->m_pTasks->AreAllFinished())
202 198                         {
203 199                                 TRACE("Shut down windows\n");
204 200                                 bool bShutdown=true;
205 201                                 if (GetPropValue<PP_PTIMEBEFORESHUTDOWN>(GetConfig()) != 0)
206 202                                 {
207 203                                         CShutdownDlg dlg;
208 204                                         dlg.m_iOverallTime = GetPropValue<PP_PTIMEBEFORESHUTDOWN>(GetConfig());
209 205                                         if (dlg.m_iOverallTime < 0)