// WinMerge Project Files\r
STRINGTABLE\r
BEGIN\r
- IDS_UNK_ERROR_READING_PROJECT "Unknown error attempting to open project file"\r
- IDS_UNK_ERROR_SAVING_PROJECT "Unknown error attempting to save project file"\r
+ IDS_UNK_ERROR_READING_PROJECT \r
+ "Unknown error attempting to open project file"\r
+ IDS_UNK_ERROR_SAVING_PROJECT \r
+ "Unknown error attempting to save project file"\r
IDS_PROJFILEDLG_CAPTION "Project File"\r
IDS_PROJFILE_LOAD_SUCCESS "Project file successfully loaded."\r
IDS_PROJFILE_SAVE_SUCCESS "Project file successfully saved."\r
END\r
\r
// LINEFILTER STRINGS\r
-STRINGTABLE \r
+STRINGTABLE\r
BEGIN\r
IDS_FILTERLINE_REGEXP "Regular expression"\r
END\r
\r
// GENERAL FILTER STRINGS\r
-STRINGTABLE \r
+STRINGTABLE\r
BEGIN\r
IDS_FILTERCHANGED "Filters were updated. Do you want to refresh all open folder compares?\n\nIf you do not want to refresh all compares now you can select No and refresh compares later."\r
END\r
IDS_EMPTY_MIDDLE_FILE "Untitled middle"\r
IDS_EMPTY_RIGHT_FILE "Untitled right"\r
IDS_CONFLICT_THEIRS_FILE "Theirs File"\r
- IDS_CONFLICT_MINE_FILE "Mine File"\r
+ IDS_CONFLICT_MINE_FILE "Mine File"\r
END\r
\r
// STATUS BAR : OTHER PANES (MOSTLY FOR EDITOR)\r
STRINGTABLE\r
BEGIN\r
- IDS_LINE_STATUS_INFO_EOL "Ln: %s Col: %d/%d Ch: %d/%d EOL: %s Cp: %d(%s)"\r
+ IDS_LINE_STATUS_INFO_EOL \r
+ "Ln: %s Col: %d/%d Ch: %d/%d EOL: %s"\r
IDS_EMPTY_LINE_STATUS_INFO "Line: %s"\r
- IDS_LINE_STATUS_INFO "Ln: %s Col: %d/%d Ch: %d/%d Cp: %d(%s)"\r
+ IDS_LINE_STATUS_INFO "Ln: %s Col: %d/%d Ch: %d/%d"\r
IDS_MERGEMODE_MERGING "Merge"\r
IDS_DIFF_NUMBER_STATUS_FMT "Difference %1 of %2"\r
IDS_NO_DIFF_SEL_FMT "%1 Differences Found"\r
IDS_OPEN_MIDDLEINVALID "Middle path is invalid!"\r
IDS_OPEN_RIGHTINVALID "Right path is invalid!"\r
IDS_OPEN_BOTHINVALID "Both paths are invalid!"\r
- IDS_OPEN_LEFTMIDDLEINVALID "Left and middle path is invalid!"\r
- IDS_OPEN_LEFTRIGHTINVALID "Left and right path is invalid!"\r
+ IDS_OPEN_LEFTMIDDLEINVALID "Left and middle path is invalid!"\r
+ IDS_OPEN_LEFTRIGHTINVALID "Left and right path is invalid!"\r
IDS_OPEN_MIDDLERIGHTINVALID "Middle and right path is invalid!"\r
IDS_OPEN_ALLINVALID "All paths are invalid!"\r
IDS_OPEN_UNPACKERDISABLED "Choose two files to enable unpacker selection."\r
BEGIN\r
IDS_ERROR_FILE_NOT_FOUND "File not found: %1"\r
IDS_ERROR_FILE_NOT_UNPACKED "File not unpacked: %1"\r
- IDS_ERROR_FILEOPEN "Cannot open file\n%1\n\n%2"\r
+ IDS_ERROR_FILEOPEN "Cannot open file\n%1\n\n%2"\r
IDS_ERROR_CONF_RESOLVE "Failed to parse conflict file."\r
IDS_NOT_CONFLICT_FILE "The file\n%1\nis not a conflict file."\r
END\r
IDS_SAVE_FMT "Save changes to %1?"\r
IDS_SAVEREADONLY_FMT "%1 is marked read-only. Would you like to override the read-only file ? (No to save as new filename.)"\r
IDS_ERROR_BACKUP "Error backing up file"\r
- IDS_BACKUP_FAILED_PROMPT\r
+ IDS_BACKUP_FAILED_PROMPT \r
"Unable to backup original file:\n%1\n\nContinue anyway?"\r
IDS_FILESAVE_FAILED "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)?"\r
- IDS_FILEPACK_FAILED_LEFT "Plugin '%2' cannot pack your changes to the left file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?"\r
- IDS_FILEPACK_FAILED_RIGHT "Plugin '%2' cannot pack your changes to the right file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?"\r
+ IDS_FILEPACK_FAILED_LEFT \r
+ "Plugin '%2' cannot pack your changes to the left file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?"\r
+ IDS_FILEPACK_FAILED_RIGHT \r
+ "Plugin '%2' cannot pack your changes to the right file back into '%1'.\n\nThe original file will not be changed.\n\nDo you want to save the unpacked version to another file?"\r
IDS_FILECHANGED_ONDISK "Another application has updated file\n%1\nsince WinMerge loaded it.\n\nOverwrite changed file?"\r
IDS_SAVEREADONLY_MULTI "%1\nis marked read-only. Would you like to override the read-only item?"\r
IDS_FILECHANGED_RESCAN "Another application has updated file\n%1\nsince WinMerge scanned it last time.\n\nDo you want to reload the file?"\r
IDS_VSS_CHECKOUT_STATUS "Checkout files from VSS..."\r
IDS_VSSERROR "Versioning System returned an error while attempting to check out the file. Unable to continue..."\r
IDS_VSS_RUN_ERROR "Error executing versioning system command."\r
- IDS_VSSFOLDER_AND_FILE_NOMATCH "The VSS Working Folder and the location of the current file do not match. Continue?"\r
+ IDS_VSSFOLDER_AND_FILE_NOMATCH \r
+ "The VSS Working Folder and the location of the current file do not match. Continue?"\r
IDS_VSS_NODATABASES "No VSS database(s) found!"\r
IDS_VSS_ERRORFROM "Error from VSS:"\r
- IDS_VSS_CHECKINERROR "Versioning System returned an error while attempting to check in the file.\n Please, check config spec of used view.\n Undo checkout operation?"\r
- IDS_VSS_UNCOERROR "Versioning System returned an error while attempting to undo checkout the file.\n Please, check config spec of used view. "\r
+ IDS_VSS_CHECKINERROR "Versioning System returned an error while attempting to check in the file.\n Please, check config spec of used view.\n Undo checkout operation?"\r
+ IDS_VSS_UNCOERROR "Versioning System returned an error while attempting to undo checkout the file.\n Please, check config spec of used view. "\r
END\r
\r
// VSS system\r
// DIRECTORY DIFFING : FILE COPY/DELETE (WITHOUT/WITH NUMBER MARK)\r
STRINGTABLE\r
BEGIN\r
- IDS_COPY_RIGHT_TO_LEFT "Right to Left (%1)"\r
+ IDS_COPY_RIGHT_TO_LEFT "Right to Left (%1)"\r
IDS_COPY_RIGHT_TO_MIDDLE "Right to Middle (%1)"\r
- IDS_COPY_MIDDLE_TO_LEFT "Middle to Left (%1)"\r
+ IDS_COPY_MIDDLE_TO_LEFT "Middle to Left (%1)"\r
IDS_COPY_MIDDLE_TO_RIGHT "Middle to Right (%1)"\r
- IDS_COPY_LEFT_TO_RIGHT "Left to Right (%1)"\r
- IDS_COPY_LEFT_TO_MIDDLE "Left to Middle (%1)"\r
- IDS_COPY_RIGHT_TO_LEFT2 "Right to Left (%1 of %2)"\r
+ IDS_COPY_LEFT_TO_RIGHT "Left to Right (%1)"\r
+ IDS_COPY_LEFT_TO_MIDDLE "Left to Middle (%1)"\r
+ IDS_COPY_RIGHT_TO_LEFT2 "Right to Left (%1 of %2)"\r
IDS_COPY_RIGHT_TO_MIDDLE2 "Right to Middle (%1 of %2)"\r
IDS_COPY_MIDDLE_TO_LEFT2 "Middle to Left (%1 of %2)"\r
IDS_COPY_MIDDLE_TO_RIGHT2 "Middle to Right (%1 of %2)"\r
- IDS_COPY_LEFT_TO_RIGHT2 "Left to Right (%1 of %2)"\r
+ IDS_COPY_LEFT_TO_RIGHT2 "Left to Right (%1 of %2)"\r
IDS_COPY_LEFT_TO_MIDDLE2 "Left to Middle (%1 of %2)"\r
IDS_COPY_LEFT_TO "Left to... (%1)"\r
IDS_COPY_MIDDLE_TO "Middle to... (%1)"\r
IDS_CONFIRM_MULTIPLE_MOVE "Are you sure you want to move %d items:"\r
IDS_CONFIRM_COPY_CAPTION "Confirm Copy"\r
IDS_CONFIRM_MOVE_CAPTION "Confirm Move"\r
- IDS_CONFIRM_CLOSE_WINDOW "You are about to close the window that is comparing folders. Are you sure you want to close the window?"\r
+ IDS_CONFIRM_CLOSE_WINDOW \r
+ "You are about to close the window that is comparing folders. Are you sure you want to close the window?"\r
END\r
\r
// DIRECTORY DIFFING : OPEN FILE\r
STRINGTABLE\r
BEGIN\r
- IDS_ERROR_EXECUTE_FILE "Failed to execute external editor: %1"\r
+ IDS_ERROR_EXECUTE_FILE "Failed to execute external editor: %1"\r
END\r
\r
// DIRECTORY DIFFING : 7ZIP\r
IDS_REPORT_TABLIST "Tab-separated list"\r
IDS_REPORT_SIMPLEHTML "Simple HTML"\r
IDS_REPORT_SIMPLEXML "Simple XML"\r
- IDS_REPORT_FILEOVERWRITE\r
+ IDS_REPORT_FILEOVERWRITE \r
"The report file already exists. Do you want to overwrite existing file?"\r
IDS_REPORT_ERROR "Error creating the report:\n%1"\r
IDS_REPORT_SUCCESS "The report has been created successfully."\r
IDS_TEMP_FILEERROR "Temporary files could not be created. Check your temporary path settings."\r
IDS_SUGGEST_IGNOREEOL "These files use different carriage return types.\n\nDo you want to treat all carriage return types as equivalent for this comparison?\n\nNote: If you always want to treat all carriage return types as equivalent, set the option 'Ignore carriage return differences..' in the Compare tab of the options dialog (available under Edit/Options)."\r
IDS_INVALID_DIRECTORY "The selected folder is invalid."\r
- IDS_CANNOT_OPEN_BINARYFILE "Cannot open a binary file to editor."\r
+ IDS_CANNOT_OPEN_BINARYFILE "Cannot open a binary file to editor."\r
IDS_CREATE_PAIR_FOLDER "The folder exists only in other side and cannot be opened.\n\nDo you want to create a matching folder:\n%1\nto the other side and open these folders?"\r
END\r
\r
// Encoding issues\r
STRINGTABLE\r
BEGIN\r
- IDS_SUGGEST_IGNORECODEPAGE "Different codepages found in left (cp%d) and right (cp%d) files. \nDisplaying each file in its codepage will give a better display but merging/copying will be dangerous.\nWould you like to treat both files as being in the default windows codepage (recommended)?"\r
- IDS_LOSSY_TRANSCODING_BOTH "Information lost due to encoding errors: both files"\r
- IDS_LOSSY_TRANSCODING_FIRST "Information lost due to encoding errors: first file"\r
- IDS_LOSSY_TRANSCODING_SECOND "Information lost due to encoding errors: second file"\r
- IDS_LOSSY_TRANSCODING_THIRD "Information lost due to encoding errors: third file"\r
+ IDS_SUGGEST_IGNORECODEPAGE \r
+ "Different codepages found in left (cp%d) and right (cp%d) files. \nDisplaying each file in its codepage will give a better display but merging/copying will be dangerous.\nWould you like to treat both files as being in the default windows codepage (recommended)?"\r
+ IDS_LOSSY_TRANSCODING_BOTH \r
+ "Information lost due to encoding errors: both files"\r
+ IDS_LOSSY_TRANSCODING_FIRST \r
+ "Information lost due to encoding errors: first file"\r
+ IDS_LOSSY_TRANSCODING_SECOND \r
+ "Information lost due to encoding errors: second file"\r
+ IDS_LOSSY_TRANSCODING_THIRD \r
+ "Information lost due to encoding errors: third file"\r
END\r
\r
// EDITOR : SHOW LINE DIFF\r
IDS_FILEWRITE_ERROR "Could not write to file %1."\r
IDS_PATH_NOT_ABSOLUTE "The specified output path is not an absolute path: %1"\r
IDS_MUST_SPECIFY_OUTPUT "Specify an output file"\r
- IDS_CANNOT_CREATE_BINARYPATCH "Cannot create a patch file from binary files."\r
+ IDS_CANNOT_CREATE_BINARYPATCH \r
+ "Cannot create a patch file from binary files."\r
IDS_CANNOT_CREATE_DIRPATCH "Cannot create a patch file from directories."\r
IDS_SAVEFILES_FORPATCH "Please save all files first.\n\nCreating a patch requires that there are no unsaved changes in files."\r
IDS_FOLDER_NOTEXIST "Folder does not exist."\r
BEGIN\r
IDS_PRIVATEBUILD_FMT "Private Build: %1"\r
IDS_CHECKFORUPDATES_UPTODATE "Your software is up to date"\r
- IDS_CHECKFORUPDATES_NEWVERSION "A new version of WinMerge is available.\n%1 is now available (you have %2). Would you like to download it now?"\r
+ IDS_CHECKFORUPDATES_NEWVERSION \r
+ "A new version of WinMerge is available.\n%1 is now available (you have %2). Would you like to download it now?"\r
IDS_CHECKFORUPDATES_FAILED "Failed to download latest version information"\r
END\r
\r
// LOCATIONBAR CONTEXT MENU\r
STRINGTABLE\r
BEGIN\r
- IDS_LOCBAR_GOTOLINE_FMT "G&oto Line %1"\r
+ IDS_LOCBAR_GOTOLINE_FMT "G&oto Line %1"\r
END\r
\r
// AUTOCOMPLETE COMBOBOX OPTIONS\r
STRINGTABLE\r
BEGIN\r
- IDS_AUTOCOMPLETE_DISABLED "Disabled"\r
- IDS_AUTOCOMPLETE_FILE_SYS "From file system"\r
- IDS_AUTOCOMPLETE_MRU "From MRU list"\r
+ IDS_AUTOCOMPLETE_DISABLED "Disabled"\r
+ IDS_AUTOCOMPLETE_FILE_SYS "From file system"\r
+ IDS_AUTOCOMPLETE_MRU "From MRU list"\r
END\r
\r
// COLOR SCHEMES\r
STRINGTABLE\r
BEGIN\r
- IDS_COLORSCHEME_PLAIN "No Highlighting"\r
- IDS_COLORSCHEME_ASP "ASP"\r
- IDS_COLORSCHEME_BASIC "Basic"\r
- IDS_COLORSCHEME_BATCH "Batch"\r
- IDS_COLORSCHEME_C "C/C++"\r
- IDS_COLORSCHEME_CSHARP "C#"\r
- IDS_COLORSCHEME_CSS "CSS"\r
- IDS_COLORSCHEME_DCL "DCL"\r
- IDS_COLORSCHEME_FORTRAN "Fortran"\r
- IDS_COLORSCHEME_HTML "HTML"\r
- IDS_COLORSCHEME_INI "INI"\r
- IDS_COLORSCHEME_INNOSETUP "InnoSetup"\r
- IDS_COLORSCHEME_INSTALLSHIELD "InstallShield"\r
- IDS_COLORSCHEME_JAVA "Java"\r
- IDS_COLORSCHEME_LISP "AutoLISP"\r
- IDS_COLORSCHEME_NSIS "NSIS"\r
- IDS_COLORSCHEME_PASCAL "Pascal"\r
- IDS_COLORSCHEME_PERL "Perl"\r
- IDS_COLORSCHEME_PHP "PHP"\r
- IDS_COLORSCHEME_PO "Portable Object"\r
- IDS_COLORSCHEME_POWERSHELL "PowerShell"\r
- IDS_COLORSCHEME_PYTHON "Python"\r
- IDS_COLORSCHEME_REXX "REXX"\r
- IDS_COLORSCHEME_RSRC "Resources"\r
- IDS_COLORSCHEME_RUBY "Ruby"\r
- IDS_COLORSCHEME_SGML "SGML"\r
- IDS_COLORSCHEME_SH "Shell"\r
- IDS_COLORSCHEME_SIOD "SIOD"\r
- IDS_COLORSCHEME_SQL "SQL"\r
- IDS_COLORSCHEME_TCL "TCL"\r
- IDS_COLORSCHEME_TEX "TEX"\r
- IDS_COLORSCHEME_VERILOG "Verilog"\r
- IDS_COLORSCHEME_XML "XML"\r
-END\r
-\r
-STRINGTABLE \r
-BEGIN\r
- IDS_CLOSE_LEFT_TABS "Close &Left Tabs"\r
- IDS_CLOSE_RIGHT_TABS "Close R&ight Tabs"\r
- IDS_CLOSE_OTHER_TABS "Close &Other Tabs"\r
+ IDS_COLORSCHEME_PLAIN "No Highlighting"\r
+ IDS_COLORSCHEME_ASP "ASP"\r
+ IDS_COLORSCHEME_BASIC "Basic"\r
+ IDS_COLORSCHEME_BATCH "Batch"\r
+ IDS_COLORSCHEME_C "C/C++"\r
+ IDS_COLORSCHEME_CSHARP "C#"\r
+ IDS_COLORSCHEME_CSS "CSS"\r
+ IDS_COLORSCHEME_DCL "DCL"\r
+ IDS_COLORSCHEME_FORTRAN "Fortran"\r
+ IDS_COLORSCHEME_HTML "HTML"\r
+ IDS_COLORSCHEME_INI "INI"\r
+ IDS_COLORSCHEME_INNOSETUP "InnoSetup"\r
+ IDS_COLORSCHEME_INSTALLSHIELD "InstallShield"\r
+ IDS_COLORSCHEME_JAVA "Java"\r
+ IDS_COLORSCHEME_LISP "AutoLISP"\r
+ IDS_COLORSCHEME_NSIS "NSIS"\r
+ IDS_COLORSCHEME_PASCAL "Pascal"\r
+ IDS_COLORSCHEME_PERL "Perl"\r
+ IDS_COLORSCHEME_PHP "PHP"\r
+ IDS_COLORSCHEME_PO "Portable Object"\r
+ IDS_COLORSCHEME_POWERSHELL "PowerShell"\r
+ IDS_COLORSCHEME_PYTHON "Python"\r
+ IDS_COLORSCHEME_REXX "REXX"\r
+ IDS_COLORSCHEME_RSRC "Resources"\r
+ IDS_COLORSCHEME_RUBY "Ruby"\r
+ IDS_COLORSCHEME_SGML "SGML"\r
+ IDS_COLORSCHEME_SH "Shell"\r
+ IDS_COLORSCHEME_SIOD "SIOD"\r
+ IDS_COLORSCHEME_SQL "SQL"\r
+ IDS_COLORSCHEME_TCL "TCL"\r
+ IDS_COLORSCHEME_TEX "TEX"\r
+ IDS_COLORSCHEME_VERILOG "Verilog"\r
+ IDS_COLORSCHEME_XML "XML"\r
+END\r
+\r
+STRINGTABLE\r
+BEGIN\r
+ IDS_CLOSE_LEFT_TABS "Close &Left Tabs"\r
+ IDS_CLOSE_RIGHT_TABS "Close R&ight Tabs"\r
+ IDS_CLOSE_OTHER_TABS "Close &Other Tabs"\r
IDS_TABBAR_AUTO_MAXWIDTH "Enable &Auto Max Width"\r
END\r
\r
-STRINGTABLE \r
+STRINGTABLE\r
BEGIN\r
- IDS_IMAGE_MENU "&Image"\r
+ IDS_IMAGE_MENU "&Image"\r
END\r
\r
-STRINGTABLE \r
+STRINGTABLE\r
BEGIN\r
- IDS_FRHED_NOTINSTALLED "frhed(http://frhed.sourceforge.net/) not installed"\r
+ IDS_FRHED_NOTINSTALLED "frhed(http://frhed.sourceforge.net/) not installed"\r
END\r
\r
#endif // English (United States) resources\r
/** @brief RO status panel width */
static const UINT RO_PANEL_WIDTH = 40;
/** @brief Encoding status panel width */
-static const UINT ENCODING_PANEL_WIDTH = 80;
+static const UINT ENCODING_PANEL_WIDTH = 230;
/** @brief EOL type status panel width */
static const UINT EOL_PANEL_WIDTH = 60;
enum
{
PANE_PANE0_INFO = 0,
- PANE_PANE0_RO,
+ PANE_PANE0_ENCODING,
PANE_PANE0_EOL,
+ PANE_PANE0_RO,
PANE_PANE1_INFO,
- PANE_PANE1_RO,
+ PANE_PANE1_ENCODING,
PANE_PANE1_EOL,
+ PANE_PANE1_RO,
PANE_PANE2_INFO,
- PANE_PANE2_RO,
+ PANE_PANE2_ENCODING,
PANE_PANE2_EOL,
+ PANE_PANE2_RO,
};
+const int nColumnsPerPane = PANE_PANE1_INFO - PANE_PANE0_INFO;
+
/**
* @brief Bottom statusbar panels and indicators
*/
ID_SEPARATOR,
ID_SEPARATOR,
ID_SEPARATOR,
+ ID_SEPARATOR,
+ ID_SEPARATOR,
+ ID_SEPARATOR,
};
BEGIN_MESSAGE_MAP(CMergeStatusBar, CStatusBar)
for (int pane = 0; pane < sizeof(m_status) / sizeof(m_status[0]); pane++)
{
m_status[pane].m_pWndStatusBar = this;
- m_status[pane].m_base = PANE_PANE0_INFO + pane * 3;
+ m_status[pane].m_base = PANE_PANE0_INFO + pane * nColumnsPerPane;
}
+ std::fill_n(m_bDiff, sizeof(m_bDiff)/sizeof(m_bDiff[0]), false);
+ std::fill_n(m_dispFlags, sizeof(m_dispFlags)/sizeof(m_dispFlags[0]), 0);
+ Options::DiffColors::Load(GetOptionsMgr(), m_cachedColors);
}
/**
// Set text to read-only info panes
// Text is hidden if file is writable
String sText = _("RO");
- SetPaneText(PANE_PANE0_RO, sText.c_str(), TRUE);
- SetPaneText(PANE_PANE1_RO, sText.c_str(), TRUE);
- SetPaneText(PANE_PANE2_RO, sText.c_str(), TRUE);
+ for (auto&& p : { PANE_PANE0_RO, PANE_PANE1_RO, PANE_PANE2_RO })
+ SetPaneText(p, sText.c_str(), TRUE);
return TRUE;
};
+void CMergeStatusBar::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
+{
+ const int pbase = PANE_PANE0_INFO + (lpDrawItemStruct->itemID - PANE_PANE0_INFO) % nColumnsPerPane;
+ const int pcur = (lpDrawItemStruct->itemID - PANE_PANE0_INFO) / nColumnsPerPane;
+ std::vector<CString> ptext(m_nPanes);
+ for (int pane = 0; pane < m_nPanes; ++pane)
+ ptext[pane] = GetPaneText(pbase + pane * nColumnsPerPane);
+ const bool diff = !std::equal(ptext.begin() + 1, ptext.end(), ptext.begin());
+
+ if (!ptext[pcur].IsEmpty())
+ m_dispFlags[pbase] |= 1 << pcur;
+ const bool displayedAll = m_dispFlags[pbase] == (1 << m_nPanes) - 1;
+
+ if (displayedAll && m_bDiff[pbase] != diff)
+ {
+ m_bDiff[pbase] = diff;
+ for (int pane = 0; pane < m_nPanes; ++pane)
+ {
+ RECT rcColumn;
+ GetItemRect(pbase + pane * nColumnsPerPane, &rcColumn);
+ InvalidateRect(&rcColumn);
+ }
+ return;
+ }
+
+ CDC dc;
+ dc.Attach(lpDrawItemStruct->hDC);
+ if (displayedAll && diff)
+ {
+ dc.SetBkMode(OPAQUE);
+ dc.SetTextColor(m_cachedColors.clrWordDiffText);
+ dc.SetBkColor(m_cachedColors.clrWordDiff);
+ dc.ExtTextOut(
+ lpDrawItemStruct->rcItem.left, lpDrawItemStruct->rcItem.top,
+ ETO_OPAQUE, &lpDrawItemStruct->rcItem, _T(""), NULL );
+ }
+ else
+ {
+ dc.SetBkMode(TRANSPARENT);
+ dc.SetTextColor(GetSysColor(COLOR_BTNTEXT));
+ }
+ dc.DrawText(ptext[pcur], &lpDrawItemStruct->rcItem, DT_LEFT | DT_VCENTER | DT_SINGLELINE);
+ dc.Detach();
+}
+
void CMergeStatusBar::Resize(int widths[])
{
// Set bottom statusbar panel widths
int borderWidth = 4; // GetSystemMetrics(SM_CXEDGE);
for (int pane = 0; pane < m_nPanes; pane++)
{
- int paneWidth = widths[pane] - (RO_PANEL_WIDTH + EOL_PANEL_WIDTH +
+ int paneWidth = widths[pane] - (RO_PANEL_WIDTH + ENCODING_PANEL_WIDTH + EOL_PANEL_WIDTH +
(2 * borderWidth));
if (paneWidth < borderWidth)
paneWidth = borderWidth;
- SetPaneStyle(PANE_PANE0_INFO + pane * 3, SBPS_NORMAL);
- SetPaneInfo(PANE_PANE0_INFO + pane * 3, ID_STATUS_PANE0FILE_INFO + pane,
+ SetPaneInfo(PANE_PANE0_INFO + pane * nColumnsPerPane, ID_STATUS_PANE0FILE_INFO + pane,
SBPS_NORMAL, paneWidth);
- SetPaneStyle(PANE_PANE0_RO + pane * 3, SBPS_NORMAL);
- SetPaneInfo(PANE_PANE0_RO + pane * 3, ID_STATUS_PANE0FILE_RO + pane,
+ SetPaneInfo(PANE_PANE0_ENCODING + pane * nColumnsPerPane, ID_STATUS_PANE0FILE_ENCODING + pane,
+ SBT_OWNERDRAW, ENCODING_PANEL_WIDTH - borderWidth);
+ SetPaneInfo(PANE_PANE0_RO + pane * nColumnsPerPane, ID_STATUS_PANE0FILE_RO + pane,
SBPS_NORMAL, RO_PANEL_WIDTH - borderWidth);
- SetPaneStyle(PANE_PANE0_EOL + pane * 3, SBPS_NORMAL);
- SetPaneInfo(PANE_PANE0_EOL + pane * 3, ID_STATUS_PANE0FILE_EOL + pane,
- SBPS_NORMAL, EOL_PANEL_WIDTH - borderWidth);
+ SetPaneInfo(PANE_PANE0_EOL + pane * nColumnsPerPane, ID_STATUS_PANE0FILE_EOL + pane,
+ SBT_OWNERDRAW, EOL_PANEL_WIDTH - borderWidth);
}
}
*/
void CMergeStatusBar::UpdateResources()
{
- for (int pane = 0; pane < sizeof(m_status) / sizeof(m_status[0]); pane++)
+ for (int pane = 0; pane < m_nPanes; pane++)
m_status[pane].UpdateResources();
}
{
if (IsWindow(m_pWndStatusBar->m_hWnd))
{
- CString str;
+ CString strInfo, strEncoding;
if (m_nChars == -1)
{
- str.Format(_("Line: %s").c_str(),
+ strInfo.Format(_("Line: %s").c_str(),
m_sLine.c_str());
}
else if (m_sEolDisplay.empty())
{
- str.Format(_("Ln: %s Col: %d/%d Ch: %d/%d Cp: %d(%s)").c_str(),
+ strInfo.Format(_("Ln: %s Col: %d/%d Ch: %d/%d").c_str(),
m_sLine.c_str(), m_nColumn, m_nColumns, m_nChar, m_nChars, m_nCodepage, m_sCodepageName.c_str());
}
else
{
- str.Format(_("Ln: %s Col: %d/%d Ch: %d/%d EOL: %s Cp: %d(%s)").c_str(),
+ strInfo.Format(_("Ln: %s Col: %d/%d Ch: %d/%d EOL: %s").c_str(),
m_sLine.c_str(), m_nColumn, m_nColumns, m_nChar, m_nChars, m_sEolDisplay.c_str(), m_nCodepage, m_sCodepageName.c_str());
}
- m_pWndStatusBar->SetPaneText(m_base, str);
+ if (m_nCodepage > 0)
+ strEncoding.Format(_("%d(%s)").c_str(), m_nCodepage, m_sCodepageName.c_str());
+ m_pWndStatusBar->SetPaneText(m_base, strInfo);
+ m_pWndStatusBar->SetPaneText(m_base + 1, strEncoding);
}
}
const char *pszCodepageName = GetEncodingNameFromCodePage(nCodepage);
m_sCodepageName = pszCodepageName ? ucr::toTString(pszCodepageName) : _T("");
if (bHasBom)
- m_sCodepageName += _T(" with BOM");
+ m_sCodepageName += _T(" BOM");
}
m_nCodepage = nCodepage;
m_bHasBom = bHasBom;