Revision: 4636
http://winmerge.svn.sourceforge.net/winmerge/?rev=4636&view=rev
Author: jtuc
Date: 2007-10-16 09:56:52 -0700 (Tue, 16 Oct 2007)
Log Message:
-----------
Patch #1804762 continued
Modified Paths:
--------------
trunk/Src/7zCommon.cpp
trunk/Src/AboutDlg.cpp
trunk/Src/DirCmpReportDlg.cpp
trunk/Src/DirView.cpp
trunk/Src/FileFiltersDlg.cpp
trunk/Src/MainFrm.cpp
trunk/Src/MergeDoc.cpp
trunk/Src/OpenDlg.cpp
trunk/Src/PatchDlg.cpp
trunk/Src/PatchDlg.h
trunk/Src/PatchTool.cpp
trunk/Src/ProjectFilePathsDlg.cpp
trunk/Src/PropGeneral.cpp
trunk/Src/SourceControl.cpp
trunk/Src/VssPrompt.cpp
Modified: trunk/Src/7zCommon.cpp
===================================================================
--- trunk/Src/7zCommon.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/7zCommon.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -923,11 +923,11 @@
envelope->Name = sFilename;
if (sSubdir.length())
{
- envelope->Name.insert(0, '\\');
+ envelope->Name.insert(0, _T("\\"));
envelope->Name.insert(0, sSubdir);
}
envelope->FullPath = sFilename;
- envelope->FullPath.insert(0, '\\');
+ envelope->FullPath.insert(0, _T("\\"));
envelope->FullPath.insert(0, m_bRight ?
di.getRightFilepath(pDoc->GetRightBasePath()) :
di.getLeftFilepath(pDoc->GetLeftBasePath()));
@@ -984,7 +984,7 @@
if (m_strFolderPrefix.GetLength())
{
if (envelope->Name.length())
- envelope->Name.insert(0, '\\');
+ envelope->Name.insert(0, _T("\\"));
envelope->Name.insert(0, m_strFolderPrefix);
}
@@ -1098,7 +1098,7 @@
}
if (path && !MultiStepCompressArchive(path))
{
- AfxMessageBox(IDS_UNKNOWN_ARCHIVE_FORMAT, MB_ICONEXCLAMATION);
+ LangMessageBox(IDS_UNKNOWN_ARCHIVE_FORMAT, MB_ICONEXCLAMATION);
}
#ifdef _DEBUG
afxDump << m_rgImpliedFoldersLeft;
Modified: trunk/Src/AboutDlg.cpp
===================================================================
--- trunk/Src/AboutDlg.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/AboutDlg.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -77,10 +77,8 @@
LangFormatString1(m_strVersion, IDS_VERSION_FMT, sVersion);
#ifdef _UNICODE
- CString strUnicode;
- VERIFY(strUnicode.LoadString(IDS_UNICODE));
m_strVersion += _T(" ");
- m_strVersion += strUnicode;
+ m_strVersion += theApp.LoadString(IDS_UNICODE).c_str();
#endif
CString sPrivateBuild = version.GetPrivateBuild();
Modified: trunk/Src/DirCmpReportDlg.cpp
===================================================================
--- trunk/Src/DirCmpReportDlg.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/DirCmpReportDlg.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -147,7 +147,7 @@
if (m_sReportFile.IsEmpty() && !m_bCopyToClipboard)
{
- AfxMessageBox(IDS_MUST_SPECIFY_OUTPUT, MB_ICONSTOP);
+ LangMessageBox(IDS_MUST_SPECIFY_OUTPUT, MB_ICONSTOP);
m_ctlReportFile.SetFocus();
return;
}
@@ -156,7 +156,7 @@
{
if (paths_DoesPathExist(m_sReportFile) == IS_EXISTING_FILE)
{
- int overWrite = AfxMessageBox(IDS_REPORT_FILEOVERWRITE,
+ int overWrite = LangMessageBox(IDS_REPORT_FILEOVERWRITE,
MB_YESNO | MB_ICONWARNING | MB_DONT_ASK_AGAIN,
IDS_DIFF_FILEOVERWRITE);
if (overWrite == IDNO)
Modified: trunk/Src/DirView.cpp
===================================================================
--- trunk/Src/DirView.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/DirView.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -878,7 +878,7 @@
case CDirDoc::AllowUpwardDirectory::No:
break;
default:
- AfxMessageBox(IDS_INVALID_DIRECTORY, MB_ICONSTOP);
+ LangMessageBox(IDS_INVALID_DIRECTORY, MB_ICONSTOP);
break;
}
}
@@ -964,7 +964,7 @@
{
if (pDoc->GetRecursive())
{
- AfxMessageBox(IDS_FILEISDIR, MB_ICONINFORMATION);
+ LangMessageBox(IDS_FILEISDIR, MB_ICONINFORMATION);
return false;
}
else
@@ -973,7 +973,7 @@
// Don't add folders to MRU
if (GetPairComparability(path1.c_str(), path2.c_str()) != IS_EXISTING_DIR)
{
- AfxMessageBox(IDS_INVALID_DIRECTORY, MB_ICONSTOP);
+ LangMessageBox(IDS_INVALID_DIRECTORY, MB_ICONSTOP);
return false;
}
// Fall through and compare directories
@@ -983,9 +983,9 @@
{
// Open left-only item to editor if its not a folder or binary
if (isDir)
- AfxMessageBox(IDS_FOLDERUNIQUE, MB_ICONINFORMATION);
+ LangMessageBox(IDS_FOLDERUNIQUE, MB_ICONINFORMATION);
else if ((*di1)->diffcode.isBin())
- AfxMessageBox(IDS_CANNOT_OPEN_BINARYFILE, MB_ICONSTOP);
+ LangMessageBox(IDS_CANNOT_OPEN_BINARYFILE, MB_ICONSTOP);
else
DoOpenWithEditor(SIDE_LEFT);
return false;
@@ -994,9 +994,9 @@
{
// Open right-only item to editor if its not a folder or binary
if (isDir)
- AfxMessageBox(IDS_FOLDERUNIQUE, MB_ICONINFORMATION);
+ LangMessageBox(IDS_FOLDERUNIQUE, MB_ICONINFORMATION);
else if ((*di1)->diffcode.isBin())
- AfxMessageBox(IDS_CANNOT_OPEN_BINARYFILE, MB_ICONSTOP);
+ LangMessageBox(IDS_CANNOT_OPEN_BINARYFILE, MB_ICONSTOP);
else
DoOpenWithEditor(SIDE_RIGHT);
return false;
@@ -1054,7 +1054,7 @@
isDir = true;
if (GetPairComparability(path1.c_str(), path2.c_str()) != IS_EXISTING_DIR)
{
- AfxMessageBox(IDS_INVALID_DIRECTORY, MB_ICONSTOP);
+ LangMessageBox(IDS_INVALID_DIRECTORY, MB_ICONSTOP);
return false;
}
}
@@ -1146,7 +1146,7 @@
{
if (!IsBinaryUnpacker(infoUnpacker))
{
- AfxMessageBox(IDS_FILEBINARY, MB_ICONSTOP);
+ LangMessageBox(IDS_FILEBINARY, MB_ICONSTOP);
return;
}
}
@@ -2440,7 +2440,7 @@
if (report.GenerateReport(errStr))
{
if (errStr.IsEmpty())
- AfxMessageBox(IDS_REPORT_SUCCESS, MB_OK | MB_ICONINFORMATION);
+ LangMessageBox(IDS_REPORT_SUCCESS, MB_OK | MB_ICONINFORMATION);
else
ResMsgBox1(IDS_REPORT_ERROR, errStr, MB_OK | MB_ICONSTOP);
}
@@ -2490,7 +2490,7 @@
{
if (!HasZipSupport())
{
- AfxMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
+ LangMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
return;
}
@@ -2508,7 +2508,7 @@
{
if (!HasZipSupport())
{
- AfxMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
+ LangMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
return;
}
@@ -2526,7 +2526,7 @@
{
if (!HasZipSupport())
{
- AfxMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
+ LangMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
return;
}
@@ -2546,7 +2546,7 @@
{
if (!HasZipSupport())
{
- AfxMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
+ LangMessageBox(IDS_NO_ZIP_SUPPORT, MB_ICONINFORMATION);
return;
}
Modified: trunk/Src/FileFiltersDlg.cpp
===================================================================
--- trunk/Src/FileFiltersDlg.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/FileFiltersDlg.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -402,7 +402,7 @@
if (globalPath.empty() && userPath.empty())
{
- AfxMessageBox(IDS_FILEFILTER_NO_USERFOLDER, MB_ICONSTOP);
+ LangMessageBox(IDS_FILEFILTER_NO_USERFOLDER, MB_ICONSTOP);
return;
}
@@ -576,19 +576,19 @@
// If user wants to, overwrite existing filter
if (paths_DoesPathExist(userPath.c_str()) == IS_EXISTING_FILE)
{
- int res = AfxMessageBox(IDS_FILEFILTER_OVERWRITE, MB_YESNO |
+ int res = LangMessageBox(IDS_FILEFILTER_OVERWRITE, MB_YESNO |
MB_ICONWARNING);
if (res == IDYES)
{
if (!CopyFile(s, userPath.c_str(), FALSE))
{
- AfxMessageBox(IDS_FILEFILTER_INSTALLFAIL, MB_ICONSTOP);
+ LangMessageBox(IDS_FILEFILTER_INSTALLFAIL, MB_ICONSTOP);
}
}
}
else
{
- AfxMessageBox(IDS_FILEFILTER_INSTALLFAIL, MB_ICONSTOP);
+ LangMessageBox(IDS_FILEFILTER_INSTALLFAIL, MB_ICONSTOP);
}
}
else
Modified: trunk/Src/MainFrm.cpp
===================================================================
--- trunk/Src/MainFrm.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/MainFrm.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -672,7 +672,7 @@
&& filelocLeft.encoding.m_codepage != filelocRight.encoding.m_codepage)
{
CString msg;
- msg.Format(IDS_SUGGEST_IGNORECODEPAGE, filelocLeft.encoding.m_codepage, filelocRight.encoding.m_codepage);
+ msg.Format(theApp.LoadString(IDS_SUGGEST_IGNORECODEPAGE).c_str(), filelocLeft.encoding.m_codepage, filelocRight.encoding.m_codepage);
int msgflags = MB_YESNO | MB_ICONWARNING | MB_DONT_ASK_AGAIN;
// Two files with different codepages
// Warn and propose to use the default codepage for both
@@ -698,7 +698,7 @@
String leftEncoding = filelocLeft.encoding.GetName();
String rightEncoding = filelocRight.encoding.GetName();
CString msg;
- msg.Format(IDS_DIFFERENT_UNICODINGS, leftEncoding.c_str(), rightEncoding.c_str());
+ msg.Format(theApp.LoadString(IDS_DIFFERENT_UNICODINGS).c_str(), leftEncoding.c_str(), rightEncoding.c_str());
int msgflags = MB_OK | MB_ICONWARNING | MB_DONT_ASK_AGAIN;
// Two files with different codepages
// Warn and propose to use the default codepage for both
@@ -2050,7 +2050,7 @@
if (pMergeDoc->m_ptBuf[0]->IsModified() || pMergeDoc->m_ptBuf[1]->IsModified())
{
bOpenDialog = FALSE;
- AfxMessageBox(IDS_SAVEFILES_FORPATCH, MB_ICONSTOP);
+ LangMessageBox(IDS_SAVEFILES_FORPATCH, MB_ICONSTOP);
}
else
{
@@ -2072,13 +2072,13 @@
const DIFFITEM item = pView->GetItemAt(ind);
if (item.diffcode.isBin())
{
- AfxMessageBox(IDS_CANNOT_CREATE_BINARYPATCH, MB_ICONWARNING |
+ LangMessageBox(IDS_CANNOT_CREATE_BINARYPATCH, MB_ICONWARNING |
MB_DONT_DISPLAY_AGAIN, IDS_CANNOT_CREATE_BINARYPATCH);
bValidFiles = FALSE;
}
else if (item.diffcode.isDirectory())
{
- AfxMessageBox(IDS_CANNOT_CREATE_DIRPATCH, MB_ICONWARNING |
+ LangMessageBox(IDS_CANNOT_CREATE_DIRPATCH, MB_ICONWARNING |
MB_DONT_DISPLAY_AGAIN, IDS_CANNOT_CREATE_DIRPATCH);
bValidFiles = FALSE;
}
@@ -2486,7 +2486,7 @@
// If dircompare contains results, warn user that they are lost
if (pDirDoc->HasDiffs())
{
- int res = AfxMessageBox(IDS_DIR_RESULTS_EMPTIED, MB_OKCANCEL |
+ int res = LangMessageBox(IDS_DIR_RESULTS_EMPTIED, MB_OKCANCEL |
MB_ICONWARNING | MB_DONT_DISPLAY_AGAIN, IDS_DIR_RESULTS_EMPTIED);
if (res == IDCANCEL)
return;
@@ -2835,7 +2835,7 @@
GetAllViews(&editViews, NULL, &dirViews);
if (editViews.GetCount() > 0 || dirViews.GetCount() > 0)
- AfxMessageBox(IDS_FONT_CHANGE, MB_ICONINFORMATION | MB_DONT_DISPLAY_AGAIN, IDS_FONT_CHANGE);
+ LangMessageBox(IDS_FONT_CHANGE, MB_ICONINFORMATION | MB_DONT_DISPLAY_AGAIN, IDS_FONT_CHANGE);
}
/**
@@ -2975,7 +2975,7 @@
if (code != 0)
{
- if (AfxMessageBox(IDS_VSS_CHECKINERROR, MB_ICONWARNING | MB_YESNO) == IDYES)
+ if (LangMessageBox(IDS_VSS_CHECKINERROR, MB_ICONWARNING | MB_YESNO) == IDYES)
{
// undo checkout operation
args.Format(_T("uncheckout -rm \"%s\""), sname.c_str());
@@ -2988,13 +2988,13 @@
if (code != 0)
{
- AfxMessageBox(IDS_VSS_UNCOERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_VSS_UNCOERROR, MB_ICONSTOP);
return;
}
}
else
{
- AfxMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
return;
}
}
@@ -3003,7 +3003,7 @@
}
else
{
- AfxMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
return;
}
}
@@ -3085,7 +3085,8 @@
*/
void CMainFrame::OnSaveProject()
{
- CPropertySheet sht(IDS_PROJFILEDLG_CAPTION);
+ String title = theApp.LoadString(IDS_PROJFILEDLG_CAPTION);
+ CPropertySheet sht(title.c_str());
ProjectFilePathsDlg pathsDlg;
sht.AddPage(&pathsDlg);
sht.m_psh.dwFlags |= PSH_NOAPPLYNOW; // Hide 'Apply' button since we don't need it
@@ -3365,7 +3366,7 @@
const int count = dirViews.GetCount() + (mergeViews.GetCount() / 2);
if (count > 1)
{
- ret = AfxMessageBox(IDS_CLOSEALL_WINDOWS, MB_YESNO | MB_ICONWARNING);
+ ret = LangMessageBox(IDS_CLOSEALL_WINDOWS, MB_YESNO | MB_ICONWARNING);
}
return (ret == IDYES);
}
Modified: trunk/Src/MergeDoc.cpp
===================================================================
--- trunk/Src/MergeDoc.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/MergeDoc.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -653,7 +653,7 @@
nFlags &= ~MB_DONT_DISPLAY_AGAIN;
}
- AfxMessageBox(IDS_FILESSAME, nFlags);
+ LangMessageBox(IDS_FILESSAME, nFlags);
// Exit application if files are identical.
if (GetMainFrame()->m_bExitIfNoDiff)
@@ -915,7 +915,7 @@
if (bInSync == FALSE)
{
- AfxMessageBox(IDS_VIEWS_OUTOFSYNC, MB_ICONSTOP);
+ LangMessageBox(IDS_VIEWS_OUTOFSYNC, MB_ICONSTOP);
return false; // abort copying
}
@@ -3396,5 +3396,5 @@
file.Close();
- AfxMessageBox(IDS_REPORT_SUCCESS, MB_OK | MB_ICONINFORMATION);
+ LangMessageBox(IDS_REPORT_SUCCESS, MB_OK | MB_ICONINFORMATION);
}
Modified: trunk/Src/OpenDlg.cpp
===================================================================
--- trunk/Src/OpenDlg.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/OpenDlg.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -303,7 +303,7 @@
if (m_pathsType == DOES_NOT_EXIST)
{
- AfxMessageBox(IDS_ERROR_INCOMPARABLE, MB_ICONSTOP);
+ LangMessageBox(IDS_ERROR_INCOMPARABLE, MB_ICONSTOP);
return;
}
Modified: trunk/Src/PatchDlg.cpp
===================================================================
--- trunk/Src/PatchDlg.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/PatchDlg.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -117,10 +117,10 @@
if (!file1Ok || !file2Ok)
{
if (!file1Ok)
- AfxMessageBox(IDS_DIFF_ITEM1NOTFOUND, MB_ICONSTOP);
+ LangMessageBox(IDS_DIFF_ITEM1NOTFOUND, MB_ICONSTOP);
if (!file2Ok)
- AfxMessageBox(IDS_DIFF_ITEM2NOTFOUND, MB_ICONSTOP);
+ LangMessageBox(IDS_DIFF_ITEM2NOTFOUND, MB_ICONSTOP);
return;
}
}
@@ -128,7 +128,7 @@
// Check that a result file was specified
if (m_fileResult.IsEmpty())
{
- AfxMessageBox(IDS_MUST_SPECIFY_OUTPUT, MB_ICONSTOP);
+ LangMessageBox(IDS_MUST_SPECIFY_OUTPUT, MB_ICONSTOP);
m_ctlResult.SetFocus();
return;
}
@@ -146,7 +146,7 @@
// Result file already exists and append not selected
if (fileExists && !m_appendFile)
{
- if (AfxMessageBox(IDS_DIFF_FILEOVERWRITE,
+ if (LangMessageBox(IDS_DIFF_FILEOVERWRITE,
MB_YESNO | MB_ICONWARNING | MB_DONT_ASK_AGAIN,
IDS_DIFF_FILEOVERWRITE) != IDYES)
{
@@ -222,13 +222,9 @@
UpdateData(FALSE);
// Add patch styles to combobox
- CString str;
- VERIFY(str.LoadString(IDS_DIFF_NORMAL));
- m_comboStyle.AddString(str);
- VERIFY(str.LoadString(IDS_DIFF_CONTEXT));
- m_comboStyle.AddString(str);
- VERIFY(str.LoadString(IDS_DIFF_UNIFIED));
- m_comboStyle.AddString(str);
+ m_comboStyle.AddString(theApp.LoadString(IDS_DIFF_NORMAL).c_str());
+ m_comboStyle.AddString(theApp.LoadString(IDS_DIFF_CONTEXT).c_str());
+ m_comboStyle.AddString(theApp.LoadString(IDS_DIFF_UNIFIED).c_str());
m_outputStyle = OUTPUT_NORMAL;
m_comboStyle.SetCurSel(0);
@@ -492,6 +488,36 @@
}
/**
+ * @brief Updates patch dialog settings from member variables.
+ */
+void CPatchDlg::UpdateSettings()
+{
+ UpdateData(FALSE);
+
+ switch (m_outputStyle)
+ {
+ case DIFF_OUTPUT_NORMAL:
+ m_comboStyle.SelectString(-1, theApp.LoadString(IDS_DIFF_NORMAL).c_str());
+ break;
+ case DIFF_OUTPUT_CONTEXT:
+ m_comboStyle.SelectString(-1, theApp.LoadString(IDS_DIFF_CONTEXT).c_str());
+ break;
+ case DIFF_OUTPUT_UNIFIED:
+ m_comboStyle.SelectString(-1, theApp.LoadString(IDS_DIFF_UNIFIED).c_str());
+ break;
+ }
+
+ CString str;
+ str.Format(_T("%d"), m_contextLines);
+ m_comboContext.SelectString(-1, str);
+
+ if (m_outputStyle == OUTPUT_CONTEXT || m_outputStyle == OUTPUT_UNIFIED)
+ m_comboContext.EnableWindow(TRUE);
+ else
+ m_comboContext.EnableWindow(FALSE);
+}
+
+/**
* @brief Loads patch dialog settings from registry.
*/
void CPatchDlg::LoadSettings()
@@ -518,32 +544,7 @@
m_openToEditor = theApp.GetProfileInt(_T("PatchCreator"), _T("OpenToEditor"), FALSE);
m_includeCmdLine = theApp.GetProfileInt(_T("PatchCreator"), _T("IncludeCmdLine"), FALSE);
- UpdateData(FALSE);
-
- CString str;
- switch (m_outputStyle)
- {
- case DIFF_OUTPUT_NORMAL:
- VERIFY(str.LoadString(IDS_DIFF_NORMAL));
- m_comboStyle.SelectString(-1, str);
- break;
- case DIFF_OUTPUT_CONTEXT:
- VERIFY(str.LoadString(IDS_DIFF_CONTEXT));
- m_comboStyle.SelectString(-1, str);
- break;
- case DIFF_OUTPUT_UNIFIED:
- VERIFY(str.LoadString(IDS_DIFF_UNIFIED));
- m_comboStyle.SelectString(-1, str);
- break;
- }
-
- str.Format(_T("%d"), m_contextLines);
- m_comboContext.SelectString(-1, str);
-
- if (m_outputStyle == OUTPUT_CONTEXT || m_outputStyle == OUTPUT_UNIFIED)
- m_comboContext.EnableWindow(TRUE);
- else
- m_comboContext.EnableWindow(FALSE);
+ UpdateSettings();
}
/**
@@ -573,30 +574,5 @@
m_openToEditor = FALSE;
m_includeCmdLine = FALSE;
- UpdateData(FALSE);
-
- CString str;
- switch (m_outputStyle)
- {
- case DIFF_OUTPUT_NORMAL:
- VERIFY(str.LoadString(IDS_DIFF_NORMAL));
- m_comboStyle.SelectString(-1, str);
- break;
- case DIFF_OUTPUT_CONTEXT:
- VERIFY(str.LoadString(IDS_DIFF_CONTEXT));
- m_comboStyle.SelectString(-1, str);
- break;
- case DIFF_OUTPUT_UNIFIED:
- VERIFY(str.LoadString(IDS_DIFF_UNIFIED));
- m_comboStyle.SelectString(-1, str);
- break;
- }
-
- str.Format(_T("%d"), m_contextLines);
- m_comboContext.SelectString(-1, str);
-
- if (m_outputStyle == OUTPUT_CONTEXT || m_outputStyle == OUTPUT_UNIFIED)
- m_comboContext.EnableWindow(TRUE);
- else
- m_comboContext.EnableWindow(FALSE);
+ UpdateSettings();
}
Modified: trunk/Src/PatchDlg.h
===================================================================
--- trunk/Src/PatchDlg.h 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/PatchDlg.h 2007-10-16 16:56:52 UTC (rev 4636)
@@ -103,6 +103,7 @@
CList<PATCHFILES, PATCHFILES&> m_fileList; /**< Source files to create patch from */
void ChangeFile(const CString &sFile, BOOL bLeft);
+ void UpdateSettings();
void LoadSettings();
void SaveSettings();
Modified: trunk/Src/PatchTool.cpp
===================================================================
--- trunk/Src/PatchTool.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/PatchTool.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -84,7 +84,7 @@
SplitFilename(m_dlgPatch.m_fileResult, &path, NULL, NULL);
if (!paths_CreateIfNeeded(path.c_str()))
{
- AfxMessageBox(IDS_FOLDER_NOTEXIST, MB_OK | MB_ICONSTOP);
+ LangMessageBox(IDS_FOLDER_NOTEXIST, MB_OK | MB_ICONSTOP);
return 0;
}
@@ -109,13 +109,13 @@
if (!bDiffSuccess)
{
- AfxMessageBox(IDS_FILEERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_FILEERROR, MB_ICONSTOP);
bResult = FALSE;
break;
}
else if (status.bBinaries)
{
- AfxMessageBox(IDS_CANNOT_CREATE_BINARYPATCH, MB_ICONSTOP);
+ LangMessageBox(IDS_CANNOT_CREATE_BINARYPATCH, MB_ICONSTOP);
bResult = FALSE;
break;
}
@@ -134,7 +134,7 @@
if (bResult && fileCount > 0)
{
- AfxMessageBox(IDS_DIFF_SUCCEEDED, MB_ICONINFORMATION|MB_DONT_DISPLAY_AGAIN,
+ LangMessageBox(IDS_DIFF_SUCCEEDED, MB_ICONINFORMATION|MB_DONT_DISPLAY_AGAIN,
IDS_DIFF_SUCCEEDED);
m_sPatchFile = m_dlgPatch.m_fileResult;
Modified: trunk/Src/ProjectFilePathsDlg.cpp
===================================================================
--- trunk/Src/ProjectFilePathsDlg.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/ProjectFilePathsDlg.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -34,6 +34,9 @@
{
//{{AFX_DATA_INIT(ProjectFilePathsDlg)
//}}AFX_DATA_INIT
+ m_strCaption = theApp.LoadDialogCaption(m_lpszTemplateName).c_str();
+ m_psp.pszTitle = m_strCaption;
+ m_psp.dwFlags |= PSP_USETITLE;
}
void ProjectFilePathsDlg::DoDataExchange(CDataExchange* pDX)
@@ -64,6 +67,7 @@
*/
BOOL ProjectFilePathsDlg::OnInitDialog()
{
+ theApp.TranslateDialog(m_hWnd);
CDialog::OnInitDialog();
return FALSE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
@@ -94,9 +98,8 @@
*/
void ProjectFilePathsDlg::OnBnClickedProjFilterSelect()
{
- CString filterPrefix;
+ String filterPrefix = theApp.LoadString(IDS_FILTER_PREFIX);
CString curFilter;
- VERIFY(filterPrefix.LoadString(IDS_FILTER_PREFIX));
const BOOL bUseMask = theApp.m_globalFileFilter.IsUsingMask();
GetDlgItemText(IDC_PROJ_FILTER_EDIT, curFilter);
@@ -116,7 +119,7 @@
}
else
{
- filterNameOrMask.Insert(0, filterPrefix);
+ filterNameOrMask.Insert(0, filterPrefix.c_str());
SetDlgItemText(IDC_PROJ_FILTER_EDIT, filterNameOrMask);
}
}
@@ -149,7 +152,7 @@
m_bIncludeSubfolders = project.GetSubfolders();
UpdateData(FALSE);
- AfxMessageBox(IDS_PROJFILE_LOAD_SUCCESS, MB_ICONINFORMATION);
+ LangMessageBox(IDS_PROJFILE_LOAD_SUCCESS, MB_ICONINFORMATION);
}
}
@@ -202,7 +205,7 @@
}
else
{
- AfxMessageBox(IDS_PROJFILE_SAVE_SUCCESS, MB_ICONINFORMATION);
+ LangMessageBox(IDS_PROJFILE_SAVE_SUCCESS, MB_ICONINFORMATION);
}
}
@@ -256,10 +259,8 @@
SplitFilename(strProjectFileName, NULL, NULL, &extension);
if (extension.empty())
{
- CString projectFileExt;
- projectFileExt.LoadString(IDS_PROJECTFILES_EXT);
strProjectFileName += _T(".");
- strProjectFileName += projectFileExt;
+ strProjectFileName += theApp.LoadString(IDS_PROJECTFILES_EXT).c_str();
}
// get the path part from the filename
Modified: trunk/Src/PropGeneral.cpp
===================================================================
--- trunk/Src/PropGeneral.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/PropGeneral.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -144,5 +144,5 @@
void CPropGeneral::OnResetAllMessageBoxes()
{
CMessageBoxDialog::ResetMessageBoxes();
- AfxMessageBox(IDS_MESSAGE_BOX_ARE_RESET, MB_ICONINFORMATION);
+ LangMessageBox(IDS_MESSAGE_BOX_ARE_RESET, MB_ICONINFORMATION);
}
Modified: trunk/Src/SourceControl.cpp
===================================================================
--- trunk/Src/SourceControl.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/SourceControl.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -112,13 +112,13 @@
CloseHandle(hVss);
if (code != 0)
{
- AfxMessageBox(IDS_VSSERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_VSSERROR, MB_ICONSTOP);
return FALSE;
}
}
else
{
- AfxMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
return FALSE;
}
}
@@ -282,7 +282,7 @@
if (strLocalSpec.CompareNoCase(strSavePath))
{
// BSP - if the directories are different, let the user confirm the CheckOut
- int iRes = AfxMessageBox(IDS_VSSFOLDER_AND_FILE_NOMATCH,
+ int iRes = LangMessageBox(IDS_VSSFOLDER_AND_FILE_NOMATCH,
MB_YESNO | MB_YES_TO_ALL | MB_ICONWARNING);
if (iRes == IDNO)
@@ -358,13 +358,13 @@
if (code != 0)
{
- AfxMessageBox(IDS_VSSERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_VSSERROR, MB_ICONSTOP);
return FALSE;
}
}
else
{
- AfxMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
+ LangMessageBox(IDS_VSS_RUN_ERROR, MB_ICONSTOP);
return FALSE;
}
}
Modified: trunk/Src/VssPrompt.cpp
===================================================================
--- trunk/Src/VssPrompt.cpp 2007-10-16 16:48:12 UTC (rev 4635)
+++ trunk/Src/VssPrompt.cpp 2007-10-16 16:56:52 UTC (rev 4636)
@@ -133,7 +133,7 @@
UpdateData(TRUE);
if (m_strProject.IsEmpty())
{
- AfxMessageBox(IDS_NOPROJECT,MB_ICONSTOP);
+ LangMessageBox(IDS_NOPROJECT,MB_ICONSTOP);
m_ctlProject.SetFocus();
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|