Skip to content

Commit

Permalink
Add menus for code compress and pretty, PR #772.
Browse files Browse the repository at this point in the history
  • Loading branch information
Whtfck authored and zufuliu committed May 1, 2024
1 parent 7f66b9c commit eed7eec
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions locale/de/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "Action &on Selection"
BEGIN
MENUITEM "Code &Compress", IDM_EDIT_CODE_COMPRESS
MENUITEM "Code &Pretty", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "&Open File, Folder, Link, etc.", CMD_OPEN_PATH_OR_LINK
MENUITEM "Open Containing &Folder", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 3 additions & 0 deletions locale/fr-FR/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "Action &sur sélection"
BEGIN
MENUITEM "Code &Compress", IDM_EDIT_CODE_COMPRESS
MENUITEM "Code &Pretty", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "&Ouvrir un fichier, dossier, lien, etc.", CMD_OPEN_PATH_OR_LINK
MENUITEM "Ouvrir le répertoire contenant", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 3 additions & 0 deletions locale/it/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "A&zioni sulla Selezione"
BEGIN
MENUITEM "Code &Compress", IDM_EDIT_CODE_COMPRESS
MENUITEM "Code &Pretty", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "&Apri File, Cartella, Link, ecc...", CMD_OPEN_PATH_OR_LINK
MENUITEM "Apri &cartella contenente", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 3 additions & 0 deletions locale/ja/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "選択範囲を実行(&O)"
BEGIN
MENUITEM "Code &Compress", IDM_EDIT_CODE_COMPRESS
MENUITEM "Code &Pretty", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "ファイル" CMD_OPEN_PATH_OR_LINK
MENUITEM "このフォルダを開く(&F)", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 3 additions & 0 deletions locale/ko/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "선택시 동작(&O)"
BEGIN
MENUITEM "Code &Compress", IDM_EDIT_CODE_COMPRESS
MENUITEM "Code &Pretty", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "파일, 폴더, 링크, 기타 열기(&O)", CMD_OPEN_PATH_OR_LINK
MENUITEM "폴더 내용 열기(&F)", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 3 additions & 0 deletions locale/pt-BR/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "Action &on Selection"
BEGIN
MENUITEM "Code &Compress", IDM_EDIT_CODE_COMPRESS
MENUITEM "Code &Pretty", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "&Open File, Folder, Link, etc.", CMD_OPEN_PATH_OR_LINK
MENUITEM "Open Containing &Folder", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 3 additions & 0 deletions locale/zh-Hans/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "选区操作(&O)"
BEGIN
MENUITEM "代码压缩(&C)", IDM_EDIT_CODE_COMPRESS
MENUITEM "代码美化(&p)", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "打开文件、文件夹、快捷方式等(&O)", CMD_OPEN_PATH_OR_LINK
MENUITEM "打开所在文件夹(&F)", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 3 additions & 0 deletions locale/zh-Hant/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "選區操作(&O)"
BEGIN
MENUITEM "代码压缩(&C)", IDM_EDIT_CODE_COMPRESS
MENUITEM "代码美化(&p)", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "開啟檔案、資料夾、連結等(&O)", CMD_OPEN_PATH_OR_LINK
MENUITEM "開啟資料夾(&F)", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ DocumentStyledText GetDocumentStyledText(uint8_t (&styleMap)[STYLE_MAX + 1], Sci
for (size_t offset = 0; offset < textLength; offset++) {
const uint8_t style = styledText[offset];
styleUsed[style >> 5] |= (1U << (style & 31));
maxStyle = std::max<unsigned int>(style, maxStyle);
maxStyle = max_u(style, maxStyle);
}

++maxStyle;
Expand Down
3 changes: 3 additions & 0 deletions src/Notepad2.rc
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,9 @@ BEGIN
MENUITEM SEPARATOR
POPUP "Action &on Selection"
BEGIN
MENUITEM "Code &Compress", IDM_EDIT_CODE_COMPRESS
MENUITEM "Code &Pretty", IDM_EDIT_CODE_PRETTY
MENUITEM SEPARATOR
MENUITEM "&Open File, Folder, Link, etc.", CMD_OPEN_PATH_OR_LINK
MENUITEM "Open Containing &Folder", CMD_OPEN_CONTAINING_FOLDER
MENUITEM SEPARATOR
Expand Down
3 changes: 2 additions & 1 deletion src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,8 @@
#define IDM_EDIT_SELTODOCEND 40389
#define IDM_EDIT_SELTODOCSTART 40390
#define IDM_EDIT_SHOW_HEX 40391

#define IDM_EDIT_CODE_COMPRESS 40392
#define IDM_EDIT_CODE_PRETTY 40393
#define IDM_EDIT_CUT_BINARY 40394
#define IDM_EDIT_COPY_BINARY 40395
#define IDM_EDIT_PASTE_BINARY 40396
Expand Down

0 comments on commit eed7eec

Please sign in to comment.