Ejemplo n.º 1
0
bool CHooks::Save()
{
    CString strhooks;
    for (hookiterator it = begin(); it != end(); ++it)
    {
        strhooks += GetHookTypeString(it->first.htype);
        strhooks += '\n';
        strhooks += it->first.path.GetWinPathString();
        strhooks += '\n';
        strhooks += it->second.commandline;
        strhooks += '\n';
        strhooks += (it->second.bWait ? L"true" : L"false");
        strhooks += '\n';
        strhooks += (it->second.bShow ? L"show" : L"hide");
        strhooks += '\n';
        strhooks += (it->second.bEnforce ? L"enforce" : L"ask");
        strhooks += '\n';
    }

    CRegString reghooks(L"Software\\TortoiseSVN\\hooks");
    reghooks = strhooks;
    if (reghooks.GetLastError() != ERROR_SUCCESS)
        return false;

    return true;
}
Ejemplo n.º 2
0
bool CHooks::Save()
{
	CString strhooks;
	for (hookiterator it = begin(); it != end(); ++it)
	{
		strhooks += GetHookTypeString(it->first.htype);
		strhooks += '\n';
		strhooks += it->first.path.GetWinPathString();
		strhooks += '\n';
		strhooks += it->second.commandline;
		strhooks += '\n';
		strhooks += (it->second.bWait ? _T("true") : _T("false"));
		strhooks += '\n';
		strhooks += (it->second.bShow ? _T("show") : _T("hide"));
		strhooks += '\n';
	}
	CRegString reghooks = CRegString(_T("Software\\TortoiseGit\\hooks"));
	reghooks = strhooks;
	if (reghooks.GetLastError())
		return false;
	return true;
}