• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision29436 (tree)
Time2022-07-30 01:54:50
Authorstefankueng

Log Message

replace OutputDebugString with CTraceToOutputDebugString

Change Summary

Incremental Difference

--- trunk/src/TortoiseShell/ContextMenu.cpp (revision 29435)
+++ trunk/src/TortoiseShell/ContextMenu.cpp (revision 29436)
@@ -1412,6 +1412,8 @@
14121412 //* path is a path to a single file/directory for commands which only act on single items (log, checkout, ...)
14131413 //* pathfile is a path to a temporary file which contains a list of file paths
14141414 std::wstring svnCmd = L" /command:";
1415+ CTraceToOutputDebugString::Instance()(__FUNCTION__ );
1416+
14151417 switch (cmd)
14161418 {
14171419 case ShellMenuUpgradeWC:
@@ -2575,29 +2577,31 @@
25752577 Microsoft::WRL::ComPtr<IServiceProvider> serviceProvider;
25762578 if (SUCCEEDED(site.As(&serviceProvider)))
25772579 {
2578- OutputDebugString(L"got IServiceProvider");
2580+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": got IServiceProvider\n");
25792581 Microsoft::WRL::ComPtr<IShellBrowser> shellBrowser;
25802582 if (SUCCEEDED(serviceProvider->QueryService(SID_SShellBrowser, IID_IShellBrowser, &shellBrowser)))
25812583 {
2582- OutputDebugString(L"got IShellBrowser");
2584+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": got IShellBrowser\n");
25832585 Microsoft::WRL::ComPtr<IShellView> shellView;
25842586 if (SUCCEEDED(shellBrowser->QueryActiveShellView(&shellView)))
25852587 {
2586- OutputDebugString(L"got IShellView");
2588+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": got IShellView\n");
25872589 Microsoft::WRL::ComPtr<IDispatch> spdispView;
25882590 if (SUCCEEDED(shellView->GetItemObject(SVGIO_BACKGROUND, IID_PPV_ARGS(&spdispView))))
25892591 {
2590- OutputDebugString(L"got IDispatch");
2592+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": got IDispatch\n");
25912593 Microsoft::WRL::ComPtr<IShellFolderViewDual> spFolderView;
25922594 if (SUCCEEDED(spdispView.As(&spFolderView)))
25932595 {
2594- OutputDebugString(L"got IShellFolderViewDual");
2596+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": got IShellFolderViewDual\n");
25952597 Microsoft::WRL::ComPtr<IDispatch> spdispShell;
25962598 if (SUCCEEDED(spFolderView->get_Application(&spdispShell)))
25972599 {
2600+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": got Application IDispatch\n");
25982601 Microsoft::WRL::ComPtr<IShellDispatch2> spdispShell2;
25992602 if (SUCCEEDED(spdispShell.As(&spdispShell2)))
26002603 {
2604+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": got IShellDispatch2\n");
26012605 // without this, the launched app is not moved to the foreground
26022606 AllowSetForegroundWindow(ASFW_ANY);
26032607
--- trunk/src/TortoiseShell/ExplorerCommand.cpp (revision 29435)
+++ trunk/src/TortoiseShell/ExplorerCommand.cpp (revision 29436)
@@ -185,6 +185,7 @@
185185
186186 HRESULT __stdcall CExplorerCommand::GetTitle(IShellItemArray * /*psiItemArray*/, LPWSTR *ppszName)
187187 {
188+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
188189 if (m_title.empty())
189190 {
190191 *ppszName = nullptr;
@@ -196,6 +197,7 @@
196197
197198 HRESULT __stdcall CExplorerCommand::GetIcon(IShellItemArray * /*psiItemArray*/, LPWSTR *ppszIcon)
198199 {
200+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
199201 if (m_iconId == 0)
200202 {
201203 SHStrDupW(L"", ppszIcon);
@@ -207,19 +209,23 @@
207209 return S_OK;
208210 }
209211
210-HRESULT __stdcall CExplorerCommand::GetToolTip(IShellItemArray * /*psiItemArray*/, LPWSTR * /*ppszInfotip*/)
212+HRESULT __stdcall CExplorerCommand::GetToolTip(IShellItemArray * /*psiItemArray*/, LPWSTR * ppszInfotip)
211213 {
214+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
215+ *ppszInfotip = nullptr;
212216 return E_NOTIMPL;
213217 }
214218
215219 HRESULT __stdcall CExplorerCommand::GetCanonicalName(GUID *pguidCommandName)
216220 {
217- *pguidCommandName = CLSID_NULL;
221+ CTraceToOutputDebugString::Instance()(__FUNCTION__);
222+ *pguidCommandName = __uuidof(this);
218223 return S_OK;
219224 }
220225
221226 HRESULT __stdcall CExplorerCommand::GetState(IShellItemArray * /*psiItemArray*/, BOOL /*fOkToBeSlow*/, EXPCMDSTATE *pCmdState)
222227 {
228+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
223229 *pCmdState = ECS_ENABLED;
224230 if (m_title.empty())
225231 return E_FAIL;
@@ -228,6 +234,7 @@
228234
229235 HRESULT __stdcall CExplorerCommand::Invoke(IShellItemArray * /*psiItemArray*/, IBindCtx * /*pbc*/)
230236 {
237+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
231238 std::wstring cwdFolder;
232239 if (m_paths.empty())
233240 {
@@ -244,7 +251,6 @@
244251 cwdFolder = cwdFolder.substr(0, cwdFolder.rfind('\\'));
245252 }
246253 }
247-
248254 CShellExt::InvokeCommand(m_cmd, cwdFolder, m_appDir, m_uuidSource,
249255 GetForegroundWindow(), m_itemStates, m_itemStatesFolder, m_paths,
250256 m_paths.empty() ? L"" : m_paths[0],
@@ -254,6 +260,7 @@
254260
255261 HRESULT __stdcall CExplorerCommand::GetFlags(EXPCMDFLAGS *pFlags)
256262 {
263+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
257264 *pFlags = ECF_DEFAULT;
258265 if (!m_subItems.empty())
259266 *pFlags = ECF_HASSUBCOMMANDS;
@@ -264,6 +271,7 @@
264271
265272 HRESULT __stdcall CExplorerCommand::EnumSubCommands(IEnumExplorerCommand **ppEnum)
266273 {
274+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
267275 if (m_subItems.empty())
268276 return E_INVALIDARG;
269277 *ppEnum = new CExplorerCommandEnum(m_subItems);
@@ -273,6 +281,7 @@
273281
274282 HRESULT __stdcall CExplorerCommand::SetSite(IUnknown *pUnkSite)
275283 {
284+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
276285 m_site = pUnkSite;
277286 return S_OK;
278287 }
@@ -279,5 +288,6 @@
279288
280289 HRESULT __stdcall CExplorerCommand::GetSite(REFIID riid, void **ppvSite)
281290 {
291+ CTraceToOutputDebugString::Instance()(__FUNCTION__ ": title: %s\n", m_title.c_str());
282292 return m_site.CopyTo(riid, ppvSite);
283293 }
--- trunk/src/TortoiseShell/ExplorerCommand.h (revision 29435)
+++ trunk/src/TortoiseShell/ExplorerCommand.h (revision 29436)
@@ -45,7 +45,7 @@
4545 size_t m_iCur;
4646 };
4747
48-class CExplorerCommand : public IExplorerCommand
48+class __declspec(uuid("30351351-7B7D-4FCC-81B4-1E394CA267EB")) CExplorerCommand : public IExplorerCommand
4949 , IObjectWithSite
5050 {
5151 friend class CExplorerCommandEnum;
Show on old repository browser