mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ mui: ... some more strings to be MUI aware ...
This commit is contained in:
parent
d5b078bd46
commit
eb37a787ff
Binary file not shown.
@ -3,6 +3,28 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// common language (MUI) defines
|
||||
//
|
||||
#define IDR_MUI_MAINMENU 10001
|
||||
#define IDR_MUI_POPUPMENU 10002
|
||||
|
||||
#define IDS_MUI_APPTITLE 10005
|
||||
#define IDS_MUI_APPTITLE_ELEVATED 10006
|
||||
#define IDS_MUI_APPTITLE_PASTEBOARD 10007
|
||||
#define IDS_MUI_UNTITLED 10008
|
||||
#define IDS_MUI_TITLEEXCERPT 10009
|
||||
#define IDS_MUI_READONLY 10010
|
||||
#define IDS_MUI_LOADFILE 10011
|
||||
#define IDS_MUI_SAVEFILE 10012
|
||||
#define IDS_MUI_PRINTFILE 10013
|
||||
#define IDS_MUI_SAVINGSETTINGS 10014
|
||||
#define IDS_MUI_LINKDESCRIPTION 10015
|
||||
#define IDS_MUI_FILTER_ALL 10016
|
||||
#define IDS_MUI_FILTER_EXE 10017
|
||||
#define IDS_MUI_FILTER_INI 10018
|
||||
#define IDS_MUI_OPENWITH 10019
|
||||
#define IDS_MUI_FAVORITES 10020
|
||||
|
||||
|
||||
|
||||
#define CMD_ESCAPE 20000
|
||||
#define CMD_SHIFTESC 20001
|
||||
#define CMD_SHIFTCTRLENTER 20002
|
||||
@ -53,20 +75,6 @@
|
||||
#define CMD_BACKTAB 20047
|
||||
#define CMD_VK_INSERT 20048
|
||||
|
||||
|
||||
#define IDR_MUI_MAINMENU 30001
|
||||
#define IDR_MUI_POPUPMENU 30002
|
||||
|
||||
|
||||
#define IDS_MUI_APPTITLE 30011
|
||||
#define IDS_MUI_APPTITLE_ELEVATED 30012
|
||||
#define IDS_MUI_APPTITLE_PASTEBOARD 30013
|
||||
#define IDS_MUI_UNTITLED 30014
|
||||
#define IDS_MUI_TITLEEXCERPT 30015
|
||||
|
||||
|
||||
|
||||
|
||||
#define IDM_FILE_NEW 40000
|
||||
#define IDM_FILE_OPEN 40001
|
||||
#define IDM_FILE_REVERT 40002
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -311,13 +311,13 @@ int CALLBACK BFFCallBack(HWND hwnd,UINT umsg,LPARAM lParam,LPARAM lpData)
|
||||
//
|
||||
// GetDirectory()
|
||||
//
|
||||
bool GetDirectory(HWND hwndParent,int iTitle,LPWSTR pszFolder,LPCWSTR pszBase,bool bNewDialogStyle)
|
||||
bool GetDirectory(HWND hwndParent,int uiTitle,LPWSTR pszFolder,LPCWSTR pszBase,bool bNewDialogStyle)
|
||||
{
|
||||
BROWSEINFO bi;
|
||||
WCHAR szTitle[MIDSZ_BUFFER] = { L'\0' };;
|
||||
WCHAR szBase[MAX_PATH] = { L'\0' };
|
||||
|
||||
GetString(iTitle,szTitle,COUNTOF(szTitle));
|
||||
GetLngString(uiTitle,szTitle,COUNTOF(szTitle));
|
||||
|
||||
if (!pszBase || !*pszBase)
|
||||
GetCurrentDirectory(MAX_PATH, szBase);
|
||||
@ -660,7 +660,7 @@ INT_PTR CALLBACK RunDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam)
|
||||
ExpandEnvironmentStringsEx(szArgs,COUNTOF(szArgs));
|
||||
ExtractFirstArgument(szArgs,szFile,szArg2,MAX_PATH);
|
||||
|
||||
GetString(IDS_FILTER_EXE,szFilter,COUNTOF(szFilter));
|
||||
GetLngString(IDS_MUI_FILTER_EXE,szFilter,COUNTOF(szFilter));
|
||||
PrepareFilterStr(szFilter);
|
||||
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
@ -896,7 +896,7 @@ INT_PTR CALLBACK OpenWithDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam
|
||||
|
||||
case IDC_GETOPENWITHDIR:
|
||||
{
|
||||
if (GetDirectory(hwnd,IDS_OPENWITH,g_tchOpenWithDir,g_tchOpenWithDir,true))
|
||||
if (GetDirectory(hwnd,IDS_MUI_OPENWITH,g_tchOpenWithDir,g_tchOpenWithDir,true))
|
||||
{
|
||||
DirList_Fill(GetDlgItem(hwnd,IDC_OPENWITHDIR),g_tchOpenWithDir,DL_ALLOBJECTS,NULL,false,g_flagNoFadeHidden,DS_NAME,false);
|
||||
DirList_StartIconThread(GetDlgItem(hwnd,IDC_OPENWITHDIR));
|
||||
@ -1093,7 +1093,7 @@ INT_PTR CALLBACK FavoritesDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lPara
|
||||
|
||||
case IDC_GETFAVORITESDIR:
|
||||
{
|
||||
if (GetDirectory(hwnd,IDS_FAVORITES,g_tchFavoritesDir,g_tchFavoritesDir,true))
|
||||
if (GetDirectory(hwnd,IDS_MUI_FAVORITES,g_tchFavoritesDir,g_tchFavoritesDir,true))
|
||||
{
|
||||
DirList_Fill(GetDlgItem(hwnd,IDC_FAVORITESDIR),g_tchFavoritesDir,DL_ALLOBJECTS,NULL,false,g_flagNoFadeHidden,DS_NAME,false);
|
||||
DirList_StartIconThread(GetDlgItem(hwnd,IDC_FAVORITESDIR));
|
||||
|
||||
@ -661,7 +661,7 @@ bool SetWindowTitle(HWND hwnd,UINT uIDAppName,bool bIsElevated,UINT uIDUntitled,
|
||||
StringCchCat(szTitle,COUNTOF(szTitle),szUntitled);
|
||||
}
|
||||
|
||||
if (bReadOnly && GetString(uIDReadOnly,szReadOnly,COUNTOF(szReadOnly)))
|
||||
if (bReadOnly && GetLngString(uIDReadOnly,szReadOnly,COUNTOF(szReadOnly)))
|
||||
{
|
||||
StringCchCat(szTitle,COUNTOF(szTitle),L" ");
|
||||
StringCchCat(szTitle,COUNTOF(szTitle),szReadOnly);
|
||||
@ -1504,7 +1504,7 @@ bool PathCreateDeskLnk(LPCWSTR pszDocument)
|
||||
//SHGetSpecialFolderPath(NULL,tchLinkDir,CSIDL_DESKTOPDIRECTORY,true);
|
||||
GetKnownFolderPath(&FOLDERID_Desktop, tchLinkDir, COUNTOF(tchLinkDir));
|
||||
|
||||
GetString(IDS_LINKDESCRIPTION,tchDescription,COUNTOF(tchDescription));
|
||||
GetLngString(IDS_MUI_LINKDESCRIPTION,tchDescription,COUNTOF(tchDescription));
|
||||
|
||||
// Try to construct a valid filename...
|
||||
if (!SHGetNewLinkInfo(pszDocument,tchLinkDir,tchLnkFileName,&fMustCopy,SHGNLI_PREFIXNAME))
|
||||
|
||||
@ -5016,10 +5016,7 @@ LRESULT MsgCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
if (!bCreateFailure) {
|
||||
|
||||
if (WritePrivateProfileString(L"Settings",L"WriteTest",L"ok",g_wchIniFile)) {
|
||||
|
||||
BeginWaitCursor(L"Saving settings..."); // IDS_SAVINGSETTINGS
|
||||
SaveSettings(true);
|
||||
EndWaitCursor();
|
||||
MsgBox(MBINFO,IDS_SAVEDSETTINGS);
|
||||
}
|
||||
else {
|
||||
@ -6784,11 +6781,9 @@ void SaveSettings(bool bSaveSettingsNow) {
|
||||
|
||||
WCHAR wchTmp[MAX_PATH] = { L'\0' };
|
||||
|
||||
if (StringCchLenW(g_wchIniFile,COUNTOF(g_wchIniFile)) == 0)
|
||||
return;
|
||||
if (StringCchLenW(g_wchIniFile, COUNTOF(g_wchIniFile)) == 0) { return; }
|
||||
|
||||
if (!g_bEnableSaveSettings)
|
||||
return;
|
||||
if (!g_bEnableSaveSettings) { return; }
|
||||
|
||||
CreateIniFile();
|
||||
|
||||
@ -6797,6 +6792,10 @@ void SaveSettings(bool bSaveSettingsNow) {
|
||||
return;
|
||||
}
|
||||
|
||||
WCHAR tchMsg[80];
|
||||
GetLngString(IDS_MUI_SAVINGSETTINGS, tchMsg, COUNTOF(tchMsg));
|
||||
BeginWaitCursor(tchMsg);
|
||||
|
||||
pIniSection = LocalAlloc(LPTR, sizeof(WCHAR) * INISECTIONBUFCNT * HUGE_BUFFER);
|
||||
//int cchIniSection = (int)LocalSize(pIniSection) / sizeof(WCHAR);
|
||||
|
||||
@ -6939,7 +6938,7 @@ void SaveSettings(bool bSaveSettingsNow) {
|
||||
IniSetInt(L"Window",tchZoom, g_WinInfo.zoom);
|
||||
}
|
||||
|
||||
|
||||
EndWaitCursor();
|
||||
}
|
||||
|
||||
|
||||
@ -7699,7 +7698,7 @@ static void __fastcall _UpdateToolbarDelayed()
|
||||
{
|
||||
SetWindowTitle(g_hwndMain, uidsAppTitle, flagIsElevated, IDS_MUI_UNTITLED, g_wchCurFile,
|
||||
iPathNameFormat, IsDocumentModified || Encoding_HasChanged(CPI_GET),
|
||||
IDS_READONLY, g_bFileReadOnly, szTitleExcerpt);
|
||||
IDS_MUI_READONLY, g_bFileReadOnly, szTitleExcerpt);
|
||||
|
||||
if (!bShowToolbar) { return; }
|
||||
|
||||
@ -8540,7 +8539,7 @@ bool FileIO(bool fLoad,LPCWSTR pszFileName,bool bSkipUnicodeDetect,bool bSkipANS
|
||||
bool fSuccess;
|
||||
DWORD dwFileAttributes;
|
||||
|
||||
FormatString(tch,COUNTOF(tch),(fLoad) ? IDS_LOADFILE : IDS_SAVEFILE, PathFindFileName(pszFileName));
|
||||
FormatLngString(tch,COUNTOF(tch),(fLoad) ? IDS_MUI_LOADFILE : IDS_MUI_SAVEFILE, PathFindFileName(pszFileName));
|
||||
|
||||
BeginWaitCursor(tch);
|
||||
|
||||
|
||||
@ -1478,8 +1478,6 @@ END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table MUI
|
||||
@ -1492,12 +1490,21 @@ BEGIN
|
||||
IDS_MUI_APPTITLE_PASTEBOARD "Notepad3(US) : Paste Board"
|
||||
IDS_MUI_UNTITLED "Untitled"
|
||||
IDS_MUI_TITLEEXCERPT """%s"""
|
||||
IDS_MUI_READONLY "(Read Only)"
|
||||
IDS_MUI_LOADFILE "Loading ""%s""..."
|
||||
IDS_MUI_SAVEFILE "Saving ""%s""..."
|
||||
IDS_MUI_PRINTFILE "Printing page %i..."
|
||||
IDS_MUI_SAVINGSETTINGS "Saving settings..."
|
||||
IDS_MUI_LINKDESCRIPTION "Edit with Notepad3"
|
||||
IDS_MUI_FILTER_ALL "All files (*.*)|*.*|"
|
||||
IDS_MUI_FILTER_EXE "Executable files (*.exe;*.com;*.bat;*.cmd;*.lnk;*.pif)|*.exe;*.com;*.bat;*.cmd;*.lnk;*.pif|All files (*.*)|*.*|"
|
||||
IDS_MUI_FILTER_INI "Configuration files (*.ini)|*.ini|All files (*.*)|*.*|"
|
||||
IDS_MUI_OPENWITH "Select the directory with links to your favorite applications."
|
||||
IDS_MUI_FAVORITES "Select the directory with links to your favorite files."
|
||||
|
||||
END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
@ -1505,38 +1512,25 @@ END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_WARN_PREF_LNG_NOT_AVAIL "Sorry, your prefered language is not available."
|
||||
IDS_WARN_PREF_LNG_NOT_AVAIL "Sorry, your prefered language is not available."
|
||||
IDS_STATUS_DOCLINE "%s%s / %s"
|
||||
IDS_STATUS_DOCCOLUMN "%s%s"
|
||||
IDS_STATUS_DOCCOLUMN2 "%s%s / %s"
|
||||
IDS_STATUS_SELECTION "%s%s"
|
||||
IDS_STATUS_SELCTLINES "%s%s"
|
||||
IDS_STATUS_SELCTBYTES "%s%s"
|
||||
IDS_STATUS_OCCURRENCE "%s%s"
|
||||
IDS_STATUS_DOCSIZE "%s%s [UTF-8]"
|
||||
IDS_FR_STATUS_FMT " Ln %s / %s Col %s Sel %s Occ %s Repl %s ( %s ) "
|
||||
|
||||
END
|
||||
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_READONLY "(Read Only)"
|
||||
IDS_STATUS_DOCLINE "%s%s / %s"
|
||||
IDS_STATUS_DOCCOLUMN "%s%s"
|
||||
IDS_STATUS_DOCCOLUMN2 "%s%s / %s"
|
||||
IDS_STATUS_SELECTION "%s%s"
|
||||
IDS_STATUS_SELCTLINES "%s%s"
|
||||
IDS_STATUS_SELCTBYTES "%s%s"
|
||||
IDS_STATUS_OCCURRENCE "%s%s"
|
||||
IDS_STATUS_DOCSIZE "%s%s [UTF-8]"
|
||||
IDS_LOADFILE "Loading ""%s""..."
|
||||
IDS_SAVEFILE "Saving ""%s""..."
|
||||
IDS_PRINTFILE "Printing page %i..."
|
||||
IDS_SAVINGSETTINGS "Saving settings..."
|
||||
IDS_LINKDESCRIPTION "Edit with Notepad3"
|
||||
IDS_FILTER_ALL "All files (*.*)|*.*|"
|
||||
IDS_FILTER_EXE "Executable files (*.exe;*.com;*.bat;*.cmd;*.lnk;*.pif)|*.exe;*.com;*.bat;*.cmd;*.lnk;*.pif|All files (*.*)|*.*|"
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_FILTER_INI "Configuration files (*.ini)|*.ini|All files (*.*)|*.*|"
|
||||
IDS_OPENWITH "Select the directory with links to your favorite applications."
|
||||
IDS_FAVORITES "Select the directory with links to your favorite files."
|
||||
IDS_BACKSLASHHELP "Backslash Transformations\n\n\\a\tAlert (BEL, Ascii 7)\n\\b\tBackspace (BS, Ascii 8)\n\\f\tFormfeed (FF, Ascii 12)\n\\n\tNewline (LF, Ascii 10)\n\\r\tCarriage return (CR, Ascii 13)\n\\t\tHorizontal Tab (HT, Ascii 9)\n\\v\tVertical Tab (VT, Ascii 11)\n\\0oo\tOctal Value\n\\u####\tHexadecimal Value\n\\xhh\tHexadecimal Value\n\\\\\tBackslash"
|
||||
IDS_REGEXPHELP "RegExp Matching Syntax (Multi Lines)\n\n.\tMatches any character\n^\tEmpty string immediately after Newline\n$\tEmpty string immediately before End of Line\n\\<\tStart of a word\n\\>\tEnd of a word\n\\b\tWord boundary\n[...]\tA set of chars ([abc]) or a range ([a-z])\n[^...]\tChars NOT in the set or range\n\\d\tAny decimal digit\n\\D\tAny non-digit char\n\\s\tAny whitespace char\n\\S\tNot a whitespace char\n\\w\tAny ""word"" char\n\\W\tAny ""non-word"" char\n\\x\tEscape character with otherwise special meaning\n\\xHH\tChar with hex code HH\n?\tMatches preceding 0 or 1 times\n*\tMatches preceding 0 or more times\n+\tMatches preceding 1 or more times\n*? or +?\tNon greedy matching of quantifiers ""?"" and ""+""\n(\tStart of a region\n)\tEnd of a region\n\\n\tRefers to a region when replacing (n is 1-9)\n"
|
||||
IDS_WILDCARDHELP "Wildcard Search\n\n*\tMatches zero or more characters.\n?\tMatches exactly one character. "
|
||||
IDS_FR_STATUS_FMT " Ln %s / %s Col %s Sel %s Occ %s Repl %s ( %s ) "
|
||||
END
|
||||
|
||||
STRINGTABLE
|
||||
|
||||
@ -69,7 +69,7 @@ void StatusUpdatePrintPage(int iPageNum)
|
||||
{
|
||||
WCHAR tch[32] = { L'\0' };
|
||||
|
||||
FormatString(tch,COUNTOF(tch),IDS_PRINTFILE,iPageNum);
|
||||
FormatLngString(tch,COUNTOF(tch),IDS_MUI_PRINTFILE,iPageNum);
|
||||
|
||||
StatusSetText(g_hwndStatus,255,tch);
|
||||
StatusSetSimple(g_hwndStatus,true);
|
||||
|
||||
@ -44,6 +44,7 @@
|
||||
#include "styles.h"
|
||||
|
||||
extern HINSTANCE g_hInstance;
|
||||
extern HMODULE g_hLngResContainer;
|
||||
|
||||
extern HWND g_hwndMain;
|
||||
extern HWND g_hwndDlgCustomizeSchemes;
|
||||
@ -3261,7 +3262,7 @@ bool Style_Import(HWND hwnd)
|
||||
OPENFILENAME ofn;
|
||||
|
||||
ZeroMemory(&ofn,sizeof(OPENFILENAME));
|
||||
GetString(IDS_FILTER_INI,szFilter,COUNTOF(szFilter));
|
||||
GetLngString(IDS_MUI_FILTER_INI,szFilter,COUNTOF(szFilter));
|
||||
PrepareFilterStr(szFilter);
|
||||
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
@ -3311,7 +3312,7 @@ bool Style_Export(HWND hwnd)
|
||||
DWORD dwError = ERROR_SUCCESS;
|
||||
|
||||
ZeroMemory(&ofn,sizeof(OPENFILENAME));
|
||||
GetString(IDS_FILTER_INI,szFilter,COUNTOF(szFilter));
|
||||
GetLngString(IDS_MUI_FILTER_INI,szFilter,COUNTOF(szFilter));
|
||||
PrepareFilterStr(szFilter);
|
||||
|
||||
ofn.lStructSize = sizeof(OPENFILENAME);
|
||||
@ -4604,7 +4605,7 @@ extern WCHAR g_tchFileDlgFilters[XXXL_BUFFER];
|
||||
bool Style_GetOpenDlgFilterStr(LPWSTR lpszFilter,int cchFilter)
|
||||
{
|
||||
if (StringCchLenW(g_tchFileDlgFilters, COUNTOF(g_tchFileDlgFilters)) == 0) {
|
||||
GetString(IDS_FILTER_ALL, lpszFilter, cchFilter);
|
||||
GetLngString(IDS_MUI_FILTER_ALL, lpszFilter, cchFilter);
|
||||
}
|
||||
else {
|
||||
StringCchCopyN(lpszFilter,cchFilter,g_tchFileDlgFilters,cchFilter - 2);
|
||||
|
||||
@ -177,31 +177,22 @@
|
||||
#define IDC_RIZONEBMP 555
|
||||
#define ___SCI_CMD__SCEN_CHANGE___ 768
|
||||
|
||||
#define IDS_STATUS_DOCLINE 5001
|
||||
#define IDS_STATUS_DOCCOLUMN 5002
|
||||
#define IDS_STATUS_DOCCOLUMN2 5003
|
||||
#define IDS_STATUS_SELECTION 5004
|
||||
#define IDS_STATUS_SELCTLINES 5015
|
||||
#define IDS_STATUS_SELCTBYTES 5016
|
||||
#define IDS_STATUS_OCCURRENCE 5017
|
||||
#define IDS_STATUS_DOCSIZE 5018
|
||||
|
||||
|
||||
#define IDS_READONLY 10005
|
||||
#define IDS_STATUS_DOCLINE 10006
|
||||
#define IDS_STATUS_DOCCOLUMN 10007
|
||||
#define IDS_STATUS_DOCCOLUMN2 10008
|
||||
#define IDS_STATUS_SELECTION 10009
|
||||
#define IDS_STATUS_SELCTLINES 10010
|
||||
#define IDS_STATUS_SELCTBYTES 10011
|
||||
#define IDS_STATUS_OCCURRENCE 10012
|
||||
#define IDS_STATUS_DOCSIZE 10013
|
||||
#define IDS_LOADFILE 10014
|
||||
#define IDS_SAVEFILE 10015
|
||||
#define IDS_PRINTFILE 10016
|
||||
#define IDS_SAVINGSETTINGS 10017
|
||||
#define IDS_LINKDESCRIPTION 10018
|
||||
#define IDS_FILTER_ALL 10019
|
||||
#define IDS_FILTER_EXE 10020
|
||||
#define IDS_FILTER_INI 10021
|
||||
#define IDS_OPENWITH 10022
|
||||
#define IDS_FAVORITES 10023
|
||||
#define IDS_BACKSLASHHELP 10024
|
||||
#define IDS_REGEXPHELP 10025
|
||||
#define IDS_WILDCARDHELP 10026
|
||||
#define IDS_FR_STATUS_FMT 10027
|
||||
|
||||
|
||||
#define IDT_FILE_NEW 40700
|
||||
#define IDT_FILE_OPEN 40701
|
||||
#define IDT_FILE_BROWSE 40702
|
||||
@ -283,7 +274,6 @@
|
||||
#define IDS_CMDLINEHELP 60000
|
||||
#define IDC_STATIC -1
|
||||
|
||||
|
||||
#include "../language/common_res.h"
|
||||
|
||||
// Next default values for new objects
|
||||
|
||||
Loading…
Reference in New Issue
Block a user