Changeset b24bad149059…
Parent a3f4dec502da…
by
Changes to 6 files · Browse files at b24bad149059 Showing diff from parent a3f4dec502da Diff from another changeset...
@@ -44,17 +44,17 @@ return true;
}
-void KilnOpenRepo(const CString& strPath)
+void KilnOpenRepo(HWND hWnd, const CString& strPath)
{
CString strKilnUrl;
if (KilnGetUrl(strPath, &strKilnUrl))
{
// Open the repository in the default web browser
- ::ShellExecute(NULL, NULL, strKilnUrl, NULL, NULL, SW_SHOW);
+ ::ShellExecute(hWnd, NULL, strKilnUrl, NULL, NULL, SW_SHOW);
}
}
-void KilnOpenFiles(const CString& strPath, const CAtlArray<CString>& arrFiles)
+void KilnOpenFiles(HWND hWnd, const CString& strPath, const CAtlArray<CString>& arrFiles)
{
CString strKilnUrl;
if (KilnGetUrl(strPath, &strKilnUrl))
@@ -71,7 +71,7 @@ {
CString strRelPath;
GetRelPath(strHgRoot, arrFiles[i], strRelPath);
- ::ShellExecute(NULL, NULL, strKilnUrl + strRelPath, NULL, NULL, SW_SHOW);
+ ::ShellExecute(hWnd, NULL, strKilnUrl + strRelPath, NULL, NULL, SW_SHOW);
}
}
}
|
@@ -16,5 +16,6 @@ #pragma once
bool KilnGetUrl(const CString& strPath, CString* pstrKilnUrl = NULL);
-void KilnOpenRepo(const CString& strPath);
-void KilnOpenFiles(const CString& strPath, const CAtlArray<CString>& arrFiles);
+void KilnOpenRepo(HWND hWnd, const CString& strPath);
+void KilnOpenFiles(HWND hWnd, const CString& strPath,
+ const CAtlArray<CString>& arrFiles);
|
@@ -630,7 +630,7 @@ const CMenuIdCmdMap::CPair* p = m_mapMenuId.Lookup(idCmd);
if (p != NULL)
{
- RunDialog(p->m_value.strName);
+ RunDialog(lpcmi->hwnd, p->m_value.strName);
hr = S_OK;
}
else
@@ -821,7 +821,7 @@}
-void CTortoiseHgCmenuBase::RunDialog(const CString& strCmd)
+void CTortoiseHgCmenuBase::RunDialog(HWND hWnd, const CString& strCmd)
{
CString strDir = GetTHgProgRoot();
if (strDir.IsEmpty())
@@ -873,12 +873,12 @@ }
else if (strCmd == "kiln")
{
- KilnOpenRepo(strCwd);
+ KilnOpenRepo(hWnd, strCwd);
return;
}
else if (strCmd == "kilnfiles")
{
- KilnOpenFiles(strCwd, m_arrFiles);
+ KilnOpenFiles(hWnd, strCwd, m_arrFiles);
return;
}
|
@@ -38,7 +38,7 @@ CMenuDescriptionMap m_mapMenuDesc;
CMenuIdCmdMap m_mapMenuId;
- virtual void RunDialog(const CString& strCmd);
+ virtual void RunDialog(HWND hWnd, const CString& strCmd);
void TweakMenuForVista(HMENU hMenu);
void InitMenuMaps(const CMenuDescription *pMenuDescs, int nCount);
|
@@ -79,13 +79,13 @@ return ResultFromShort(idCmd - idCmdFirst);
}
-void CTortoiseHgDropHandler::RunDialog(const CString& strCmd)
+void CTortoiseHgDropHandler::RunDialog(HWND hWnd, const CString& strCmd)
{
if (strCmd == "drag_move" || strCmd == "drag_copy") {
// Append the current directory as the dest.
m_arrFiles.Add(m_strFolder);
}
- CTortoiseHgCmenuBase::RunDialog(strCmd);
+ CTortoiseHgCmenuBase::RunDialog(hWnd, strCmd);
}
STDMETHODIMP CTortoiseHgDropHandler::Initialize(LPCITEMIDLIST pIDFolder,
|
@@ -22,7 +22,7 @@ public CComCoClass<CTortoiseHgDropHandler, &CLSID_TortoiseHgDropHandler>
{
protected:
- virtual void RunDialog(const CString& strCmd);
+ virtual void RunDialog(HWND hWnd, const CString& strCmd);
public:
CTortoiseHgDropHandler();
|
Loading...