String file = GetSelectedFileName(dirBegin, stype, GetDiffContext());
if (file.empty()) return;
- theApp.OpenFileToExternalEditor(file);
+ CMergeApp::OpenFileToExternalEditor(file);
}
void CDirView::DoOpenParentFolder(SIDE_TYPE stype)
{
if (bContinue)
{
- if (!theApp.CreateBackup(true, (*iter).dest))
+ if (!CMergeApp::CreateBackup(true, (*iter).dest))
{
String strErr = _("Error backing up file");
AfxMessageBox(strErr.c_str(), MB_OK | MB_ICONERROR);
*/
void FileFiltersDlg::EditFileFilter(const String& path)
{
- theApp.OpenFileToExternalEditor(path);
+ CMergeApp::OpenFileToExternalEditor(path);
}
/**
// Ask user what to do about FILE_ATTRIBUTE_READONLY
String strPath = path;
bool bApplyToAll = false;
- if (theApp.HandleReadonlySave(strPath, false, bApplyToAll) == IDCANCEL)
+ if (CMergeApp::HandleReadonlySave(strPath, false, bApplyToAll) == IDCANCEL)
return S_OK;
path = strPath.c_str();
// Take a chance to create a backup
- if (!theApp.CreateBackup(false, path))
+ if (!CMergeApp::CreateBackup(false, path))
return S_OK;
// Write data to an intermediate file
String tempPath = env::GetTemporaryPath();
{
String filename = ucr::toTString(m_pImgMergeWindow->GetFileName(pane));
bool bApplyToAll = false;
- if (theApp.HandleReadonlySave(filename, false, bApplyToAll) == IDCANCEL)
+ if (CMergeApp::HandleReadonlySave(m_filePaths[pane], false, bApplyToAll) == IDCANCEL)
return false;
- theApp.CreateBackup(false, filename);
+ CMergeApp::CreateBackup(false, m_filePaths[pane]);
if (!m_pImgMergeWindow->SaveImage(pane))
{
String str = strutils::format_string2(_("Saving file failed.\n%1\n%2\nDo you want to:\n\t- use a different filename (Press OK)\n\t- abort the current operation (Press Cancel)?"), filename, GetSysError());
if (configLog.WriteLogFile(sError))
{
String sFileName = configLog.GetFileName();
- theApp.OpenFileToExternalEditor(sFileName);
+ CMergeApp::OpenFileToExternalEditor(sFileName);
}
else
{
static void OpenContributersFile(int&)
{
- theApp.OpenFileToExternalEditor(paths::ConcatPath(env::GetProgPath(), ContributorsPath));
+ CMergeApp::OpenFileToExternalEditor(paths::ConcatPath(env::GetProgPath(), ContributorsPath));
}
static void OpenUrl(int&)
strSavePath = theApp.m_strSaveAsPath;
}
- nRetVal = theApp.HandleReadonlySave(strSavePath, false, bApplyToAll);
+ nRetVal = CMergeApp::HandleReadonlySave(strSavePath, false, bApplyToAll);
if (nRetVal == IDCANCEL)
return false;
- if (!theApp.CreateBackup(false, strSavePath))
+ if (!CMergeApp::CreateBackup(false, strSavePath))
return false;
// false as long as the user is not satisfied
return;
int nRealLine = ComputeRealLine(GetCursorPos().y) + 1;
- theApp.OpenFileToExternalEditor(sFileName, nRealLine);
+ CMergeApp::OpenFileToExternalEditor(sFileName, nRealLine);
}
/**
if (retVal)
{
if (m_bOpenToEditor)
- theApp.OpenFileToExternalEditor(m_sPatchFile);
+ CMergeApp::OpenFileToExternalEditor(m_sPatchFile);
}
return retVal;
}