From 2214d10ce233e946f224bd6aecaac9e40a2a662d Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 14 Jun 2025 13:55:11 +0200 Subject: [PATCH] Add set read-only attribute on file feature So user can toggle (set/remove) R/O attribute of a file. Note: only 42033 (Clear Read-Only Flag) but not 42028 (Set Read-Only) entries are removed from the localization files. Because 42028 (Set Read-Only) command is only reworded, its functionnality remains the same. Whereas 42033 (Clear Read-Only Flag) command has changed its behaviour, hence the deletion. Though 42028's translation of "Set Read-Only" can be remained, the translators are suggested to reword your translation with "Read-Only in Notepad++" in order to avoid the confusion of users. Fix #326, fix #4594, fix #6216, fix #7841, fix #12520, fix #15571, fix #16603, close #16686 --- .../installer/nativeLang/abkhazian.xml | 1 - .../installer/nativeLang/afrikaans.xml | 1 - PowerEditor/installer/nativeLang/albanian.xml | 1 - PowerEditor/installer/nativeLang/arabic.xml | 1 - .../installer/nativeLang/aragonese.xml | 1 - .../installer/nativeLang/azerbaijani.xml | 1 - PowerEditor/installer/nativeLang/basque.xml | 1 - .../installer/nativeLang/belarusian.xml | 1 - PowerEditor/installer/nativeLang/bengali.xml | 1 - PowerEditor/installer/nativeLang/bosnian.xml | 1 - .../nativeLang/brazilian_portuguese.xml | 2 -- PowerEditor/installer/nativeLang/breton.xml | 1 - .../installer/nativeLang/bulgarian.xml | 2 -- PowerEditor/installer/nativeLang/catalan.xml | 1 - .../nativeLang/chineseSimplified.xml | 2 -- PowerEditor/installer/nativeLang/corsican.xml | 2 -- PowerEditor/installer/nativeLang/croatian.xml | 2 -- PowerEditor/installer/nativeLang/czech.xml | 2 -- PowerEditor/installer/nativeLang/danish.xml | 2 -- PowerEditor/installer/nativeLang/dutch.xml | 2 -- PowerEditor/installer/nativeLang/english.xml | 8 +++--- .../nativeLang/english_customizable.xml | 8 +++--- .../installer/nativeLang/esperanto.xml | 1 - PowerEditor/installer/nativeLang/estonian.xml | 1 - .../installer/nativeLang/extremaduran.xml | 1 - PowerEditor/installer/nativeLang/farsi.xml | 1 - PowerEditor/installer/nativeLang/finnish.xml | 1 - PowerEditor/installer/nativeLang/french.xml | 8 +++--- PowerEditor/installer/nativeLang/friulian.xml | 1 - PowerEditor/installer/nativeLang/galician.xml | 2 -- PowerEditor/installer/nativeLang/georgian.xml | 1 - PowerEditor/installer/nativeLang/german.xml | 2 -- PowerEditor/installer/nativeLang/greek.xml | 1 - PowerEditor/installer/nativeLang/gujarati.xml | 1 - PowerEditor/installer/nativeLang/hebrew.xml | 1 - PowerEditor/installer/nativeLang/hindi.xml | 1 - .../nativeLang/hongKongCantonese.xml | 2 -- .../installer/nativeLang/hungarian.xml | 2 -- .../installer/nativeLang/indonesian.xml | 2 -- PowerEditor/installer/nativeLang/irish.xml | 1 - PowerEditor/installer/nativeLang/italian.xml | 2 -- PowerEditor/installer/nativeLang/japanese.xml | 2 -- PowerEditor/installer/nativeLang/kabyle.xml | 1 - PowerEditor/installer/nativeLang/kannada.xml | 1 - PowerEditor/installer/nativeLang/kazakh.xml | 1 - PowerEditor/installer/nativeLang/korean.xml | 2 -- PowerEditor/installer/nativeLang/kurdish.xml | 1 - PowerEditor/installer/nativeLang/kyrgyz.xml | 1 - PowerEditor/installer/nativeLang/latvian.xml | 1 - PowerEditor/installer/nativeLang/ligurian.xml | 1 - .../installer/nativeLang/lithuanian.xml | 1 - .../installer/nativeLang/luxembourgish.xml | 1 - .../installer/nativeLang/macedonian.xml | 1 - PowerEditor/installer/nativeLang/malay.xml | 1 - PowerEditor/installer/nativeLang/marathi.xml | 1 - .../installer/nativeLang/mongolian.xml | 1 - PowerEditor/installer/nativeLang/nepali.xml | 1 - .../installer/nativeLang/norwegian.xml | 2 -- PowerEditor/installer/nativeLang/nynorsk.xml | 1 - PowerEditor/installer/nativeLang/occitan.xml | 1 - PowerEditor/installer/nativeLang/piglatin.xml | 1 - PowerEditor/installer/nativeLang/polish.xml | 2 -- .../installer/nativeLang/portuguese.xml | 2 -- PowerEditor/installer/nativeLang/punjabi.xml | 1 - PowerEditor/installer/nativeLang/romanian.xml | 2 -- PowerEditor/installer/nativeLang/russian.xml | 2 -- .../installer/nativeLang/sardinian.xml | 1 - PowerEditor/installer/nativeLang/serbian.xml | 2 -- .../installer/nativeLang/serbianCyrillic.xml | 2 -- PowerEditor/installer/nativeLang/sinhala.xml | 1 - PowerEditor/installer/nativeLang/slovak.xml | 2 -- .../installer/nativeLang/slovenian.xml | 2 -- PowerEditor/installer/nativeLang/spanish.xml | 2 -- .../installer/nativeLang/spanish_ar.xml | 1 - PowerEditor/installer/nativeLang/swedish.xml | 2 -- PowerEditor/installer/nativeLang/tagalog.xml | 1 - .../nativeLang/taiwaneseMandarin.xml | 4 +-- .../installer/nativeLang/tajikCyrillic.xml | 1 - PowerEditor/installer/nativeLang/tamil.xml | 1 - PowerEditor/installer/nativeLang/tatar.xml | 1 - PowerEditor/installer/nativeLang/telugu.xml | 1 - PowerEditor/installer/nativeLang/thai.xml | 1 - PowerEditor/installer/nativeLang/turkish.xml | 2 -- .../installer/nativeLang/ukrainian.xml | 2 -- PowerEditor/installer/nativeLang/uyghur.xml | 1 - PowerEditor/installer/nativeLang/uzbek.xml | 1 - .../installer/nativeLang/uzbekCyrillic.xml | 1 - PowerEditor/installer/nativeLang/venetian.xml | 2 -- .../installer/nativeLang/vietnamese.xml | 2 -- PowerEditor/installer/nativeLang/welsh.xml | 1 - PowerEditor/installer/nativeLang/zulu.xml | 1 - PowerEditor/src/MISC/Common/Common.cpp | 17 +++++++++++++ PowerEditor/src/MISC/Common/Common.h | 1 + PowerEditor/src/Notepad_plus.cpp | 19 +++++++++++---- PowerEditor/src/Notepad_plus.rc | 7 ++++-- PowerEditor/src/NppCommands.cpp | 12 ++++----- PowerEditor/src/NppNotification.cpp | 23 ++++++++++++------ PowerEditor/src/Parameters.cpp | 4 +-- .../src/ScintillaComponent/DocTabView.cpp | 12 ++++++--- .../src/ScintillaComponent/DocTabView.h | 3 ++- .../src/icons/dark/tabbar/readonly_sys.ico | Bin 0 -> 10718 bytes .../icons/standard/tabbar/readonly_sys.ico | Bin 0 -> 1150 bytes .../standard/tabbar/readonly_sys_alt.ico | Bin 0 -> 1150 bytes PowerEditor/src/menuCmdID.h | 4 +-- PowerEditor/src/resource.h | 4 ++- 105 files changed, 89 insertions(+), 163 deletions(-) create mode 100644 PowerEditor/src/icons/dark/tabbar/readonly_sys.ico create mode 100644 PowerEditor/src/icons/standard/tabbar/readonly_sys.ico create mode 100644 PowerEditor/src/icons/standard/tabbar/readonly_sys_alt.ico diff --git a/PowerEditor/installer/nativeLang/abkhazian.xml b/PowerEditor/installer/nativeLang/abkhazian.xml index a2ac8c094..af478be12 100644 --- a/PowerEditor/installer/nativeLang/abkhazian.xml +++ b/PowerEditor/installer/nativeLang/abkhazian.xml @@ -206,7 +206,6 @@ Updated to v8.2.1: - diff --git a/PowerEditor/installer/nativeLang/afrikaans.xml b/PowerEditor/installer/nativeLang/afrikaans.xml index dc310f32f..2f33beeea 100644 --- a/PowerEditor/installer/nativeLang/afrikaans.xml +++ b/PowerEditor/installer/nativeLang/afrikaans.xml @@ -86,7 +86,6 @@ - diff --git a/PowerEditor/installer/nativeLang/albanian.xml b/PowerEditor/installer/nativeLang/albanian.xml index cea22b5a0..b42117ed5 100644 --- a/PowerEditor/installer/nativeLang/albanian.xml +++ b/PowerEditor/installer/nativeLang/albanian.xml @@ -136,7 +136,6 @@ - diff --git a/PowerEditor/installer/nativeLang/arabic.xml b/PowerEditor/installer/nativeLang/arabic.xml index 677c566e6..b477ee81d 100644 --- a/PowerEditor/installer/nativeLang/arabic.xml +++ b/PowerEditor/installer/nativeLang/arabic.xml @@ -177,7 +177,6 @@ - diff --git a/PowerEditor/installer/nativeLang/aragonese.xml b/PowerEditor/installer/nativeLang/aragonese.xml index d9f9086bf..74592f8b1 100644 --- a/PowerEditor/installer/nativeLang/aragonese.xml +++ b/PowerEditor/installer/nativeLang/aragonese.xml @@ -134,7 +134,6 @@ By Chesús D. Trigo [xuxinho7@gmail.com] & softaragones [softaragones@soft - diff --git a/PowerEditor/installer/nativeLang/azerbaijani.xml b/PowerEditor/installer/nativeLang/azerbaijani.xml index 6c7670e83..e1f6b5142 100644 --- a/PowerEditor/installer/nativeLang/azerbaijani.xml +++ b/PowerEditor/installer/nativeLang/azerbaijani.xml @@ -111,7 +111,6 @@ - diff --git a/PowerEditor/installer/nativeLang/basque.xml b/PowerEditor/installer/nativeLang/basque.xml index 458027d98..3e169dc14 100644 --- a/PowerEditor/installer/nativeLang/basque.xml +++ b/PowerEditor/installer/nativeLang/basque.xml @@ -182,7 +182,6 @@ The comments are here for explanation, it's not necessary to translate them. - diff --git a/PowerEditor/installer/nativeLang/belarusian.xml b/PowerEditor/installer/nativeLang/belarusian.xml index 5e2c07692..c3b7cb5ed 100644 --- a/PowerEditor/installer/nativeLang/belarusian.xml +++ b/PowerEditor/installer/nativeLang/belarusian.xml @@ -182,7 +182,6 @@ The comments are here for explanation, it's not necessary to translate them. - diff --git a/PowerEditor/installer/nativeLang/bengali.xml b/PowerEditor/installer/nativeLang/bengali.xml index 877334c70..f84aba8b7 100644 --- a/PowerEditor/installer/nativeLang/bengali.xml +++ b/PowerEditor/installer/nativeLang/bengali.xml @@ -135,7 +135,6 @@ - diff --git a/PowerEditor/installer/nativeLang/bosnian.xml b/PowerEditor/installer/nativeLang/bosnian.xml index dfd00de08..1466b7f8a 100644 --- a/PowerEditor/installer/nativeLang/bosnian.xml +++ b/PowerEditor/installer/nativeLang/bosnian.xml @@ -110,7 +110,6 @@ - diff --git a/PowerEditor/installer/nativeLang/brazilian_portuguese.xml b/PowerEditor/installer/nativeLang/brazilian_portuguese.xml index eefb355be..8347be4ce 100644 --- a/PowerEditor/installer/nativeLang/brazilian_portuguese.xml +++ b/PowerEditor/installer/nativeLang/brazilian_portuguese.xml @@ -203,7 +203,6 @@ Translation note: - @@ -439,7 +438,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/breton.xml b/PowerEditor/installer/nativeLang/breton.xml index d920af180..2c68a2233 100644 --- a/PowerEditor/installer/nativeLang/breton.xml +++ b/PowerEditor/installer/nativeLang/breton.xml @@ -163,7 +163,6 @@ - diff --git a/PowerEditor/installer/nativeLang/bulgarian.xml b/PowerEditor/installer/nativeLang/bulgarian.xml index 22ce01b8f..034d5d340 100644 --- a/PowerEditor/installer/nativeLang/bulgarian.xml +++ b/PowerEditor/installer/nativeLang/bulgarian.xml @@ -244,7 +244,6 @@ - @@ -512,7 +511,6 @@ - diff --git a/PowerEditor/installer/nativeLang/catalan.xml b/PowerEditor/installer/nativeLang/catalan.xml index ab427f447..cd597a825 100644 --- a/PowerEditor/installer/nativeLang/catalan.xml +++ b/PowerEditor/installer/nativeLang/catalan.xml @@ -175,7 +175,6 @@ By Hiro5 - diff --git a/PowerEditor/installer/nativeLang/chineseSimplified.xml b/PowerEditor/installer/nativeLang/chineseSimplified.xml index b57285625..fe94c5bf3 100644 --- a/PowerEditor/installer/nativeLang/chineseSimplified.xml +++ b/PowerEditor/installer/nativeLang/chineseSimplified.xml @@ -201,7 +201,6 @@ Translation note: - @@ -441,7 +440,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/corsican.xml b/PowerEditor/installer/nativeLang/corsican.xml index dd96b71f2..2623a129c 100644 --- a/PowerEditor/installer/nativeLang/corsican.xml +++ b/PowerEditor/installer/nativeLang/corsican.xml @@ -231,7 +231,6 @@ Additionnal information about Corsican localization: - @@ -467,7 +466,6 @@ Additionnal information about Corsican localization: - diff --git a/PowerEditor/installer/nativeLang/croatian.xml b/PowerEditor/installer/nativeLang/croatian.xml index 5f0dd29ae..3233b3cbb 100644 --- a/PowerEditor/installer/nativeLang/croatian.xml +++ b/PowerEditor/installer/nativeLang/croatian.xml @@ -201,7 +201,6 @@ - @@ -445,7 +444,6 @@ - diff --git a/PowerEditor/installer/nativeLang/czech.xml b/PowerEditor/installer/nativeLang/czech.xml index a67c85642..51ea47bc8 100644 --- a/PowerEditor/installer/nativeLang/czech.xml +++ b/PowerEditor/installer/nativeLang/czech.xml @@ -145,7 +145,6 @@ - @@ -449,7 +448,6 @@ - diff --git a/PowerEditor/installer/nativeLang/danish.xml b/PowerEditor/installer/nativeLang/danish.xml index 37fa2bead..9beba82bf 100644 --- a/PowerEditor/installer/nativeLang/danish.xml +++ b/PowerEditor/installer/nativeLang/danish.xml @@ -183,7 +183,6 @@ The comments are here for explanation, it's not necessary to translate them. - @@ -404,7 +403,6 @@ The comments are here for explanation, it's not necessary to translate them. - diff --git a/PowerEditor/installer/nativeLang/dutch.xml b/PowerEditor/installer/nativeLang/dutch.xml index a82ecde24..284de2657 100644 --- a/PowerEditor/installer/nativeLang/dutch.xml +++ b/PowerEditor/installer/nativeLang/dutch.xml @@ -207,7 +207,6 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR). - @@ -440,7 +439,6 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR). - diff --git a/PowerEditor/installer/nativeLang/english.xml b/PowerEditor/installer/nativeLang/english.xml index 205096b2d..d865f2f45 100644 --- a/PowerEditor/installer/nativeLang/english.xml +++ b/PowerEditor/installer/nativeLang/english.xml @@ -196,14 +196,14 @@ Translation note: - + - + @@ -438,8 +438,8 @@ Translation note: - - + + diff --git a/PowerEditor/installer/nativeLang/english_customizable.xml b/PowerEditor/installer/nativeLang/english_customizable.xml index 1d9bff9df..abb4aedeb 100644 --- a/PowerEditor/installer/nativeLang/english_customizable.xml +++ b/PowerEditor/installer/nativeLang/english_customizable.xml @@ -196,14 +196,14 @@ Translation note: - + - + @@ -438,8 +438,8 @@ Translation note: - - + + diff --git a/PowerEditor/installer/nativeLang/esperanto.xml b/PowerEditor/installer/nativeLang/esperanto.xml index bfacf8dcb..89b27c308 100644 --- a/PowerEditor/installer/nativeLang/esperanto.xml +++ b/PowerEditor/installer/nativeLang/esperanto.xml @@ -146,7 +146,6 @@ - diff --git a/PowerEditor/installer/nativeLang/estonian.xml b/PowerEditor/installer/nativeLang/estonian.xml index 1ba4518e6..6b5d230d9 100644 --- a/PowerEditor/installer/nativeLang/estonian.xml +++ b/PowerEditor/installer/nativeLang/estonian.xml @@ -163,7 +163,6 @@ https://github.com/AndresTraks/ - diff --git a/PowerEditor/installer/nativeLang/extremaduran.xml b/PowerEditor/installer/nativeLang/extremaduran.xml index 34a62ed44..655016781 100644 --- a/PowerEditor/installer/nativeLang/extremaduran.xml +++ b/PowerEditor/installer/nativeLang/extremaduran.xml @@ -71,7 +71,6 @@ - diff --git a/PowerEditor/installer/nativeLang/farsi.xml b/PowerEditor/installer/nativeLang/farsi.xml index 8282f60e3..69e6a214c 100644 --- a/PowerEditor/installer/nativeLang/farsi.xml +++ b/PowerEditor/installer/nativeLang/farsi.xml @@ -163,7 +163,6 @@ - diff --git a/PowerEditor/installer/nativeLang/finnish.xml b/PowerEditor/installer/nativeLang/finnish.xml index aa7b3d331..0775f02ad 100644 --- a/PowerEditor/installer/nativeLang/finnish.xml +++ b/PowerEditor/installer/nativeLang/finnish.xml @@ -143,7 +143,6 @@ Updated to v8.6 fixed version - diff --git a/PowerEditor/installer/nativeLang/french.xml b/PowerEditor/installer/nativeLang/french.xml index 6efd283a5..24a3d8ed4 100644 --- a/PowerEditor/installer/nativeLang/french.xml +++ b/PowerEditor/installer/nativeLang/french.xml @@ -194,14 +194,14 @@ Translation note: - + - + @@ -436,8 +436,8 @@ Translation note: - - + + diff --git a/PowerEditor/installer/nativeLang/friulian.xml b/PowerEditor/installer/nativeLang/friulian.xml index 8ec154154..dd5f24f05 100644 --- a/PowerEditor/installer/nativeLang/friulian.xml +++ b/PowerEditor/installer/nativeLang/friulian.xml @@ -114,7 +114,6 @@ - diff --git a/PowerEditor/installer/nativeLang/galician.xml b/PowerEditor/installer/nativeLang/galician.xml index 5dc2d6b39..bd959f7a7 100644 --- a/PowerEditor/installer/nativeLang/galician.xml +++ b/PowerEditor/installer/nativeLang/galician.xml @@ -203,7 +203,6 @@ Translation note: - @@ -439,7 +438,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/georgian.xml b/PowerEditor/installer/nativeLang/georgian.xml index db5f8ee10..e1a04e74e 100644 --- a/PowerEditor/installer/nativeLang/georgian.xml +++ b/PowerEditor/installer/nativeLang/georgian.xml @@ -121,7 +121,6 @@ - diff --git a/PowerEditor/installer/nativeLang/german.xml b/PowerEditor/installer/nativeLang/german.xml index a61379c23..28bce7c69 100644 --- a/PowerEditor/installer/nativeLang/german.xml +++ b/PowerEditor/installer/nativeLang/german.xml @@ -212,7 +212,6 @@ Translation note: - @@ -448,7 +447,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/greek.xml b/PowerEditor/installer/nativeLang/greek.xml index ee24ddf22..bbf34f6ba 100644 --- a/PowerEditor/installer/nativeLang/greek.xml +++ b/PowerEditor/installer/nativeLang/greek.xml @@ -134,7 +134,6 @@ - diff --git a/PowerEditor/installer/nativeLang/gujarati.xml b/PowerEditor/installer/nativeLang/gujarati.xml index 49ff4b479..8cdd1a44f 100644 --- a/PowerEditor/installer/nativeLang/gujarati.xml +++ b/PowerEditor/installer/nativeLang/gujarati.xml @@ -135,7 +135,6 @@ - diff --git a/PowerEditor/installer/nativeLang/hebrew.xml b/PowerEditor/installer/nativeLang/hebrew.xml index ddaf46651..219b5de00 100644 --- a/PowerEditor/installer/nativeLang/hebrew.xml +++ b/PowerEditor/installer/nativeLang/hebrew.xml @@ -97,7 +97,6 @@ - diff --git a/PowerEditor/installer/nativeLang/hindi.xml b/PowerEditor/installer/nativeLang/hindi.xml index 8b14e6df9..2474e959f 100644 --- a/PowerEditor/installer/nativeLang/hindi.xml +++ b/PowerEditor/installer/nativeLang/hindi.xml @@ -170,7 +170,6 @@ - diff --git a/PowerEditor/installer/nativeLang/hongKongCantonese.xml b/PowerEditor/installer/nativeLang/hongKongCantonese.xml index d304ecf32..e48f5d6db 100644 --- a/PowerEditor/installer/nativeLang/hongKongCantonese.xml +++ b/PowerEditor/installer/nativeLang/hongKongCantonese.xml @@ -207,7 +207,6 @@ - @@ -504,7 +503,6 @@ - diff --git a/PowerEditor/installer/nativeLang/hungarian.xml b/PowerEditor/installer/nativeLang/hungarian.xml index 1ac16f325..ef96ac6aa 100644 --- a/PowerEditor/installer/nativeLang/hungarian.xml +++ b/PowerEditor/installer/nativeLang/hungarian.xml @@ -203,7 +203,6 @@ - @@ -439,7 +438,6 @@ - diff --git a/PowerEditor/installer/nativeLang/indonesian.xml b/PowerEditor/installer/nativeLang/indonesian.xml index 2975247ed..e97593d07 100644 --- a/PowerEditor/installer/nativeLang/indonesian.xml +++ b/PowerEditor/installer/nativeLang/indonesian.xml @@ -185,7 +185,6 @@ Last modified by Sahid A.Z. on 3/3/2023 - @@ -408,7 +407,6 @@ Last modified by Sahid A.Z. on 3/3/2023 - diff --git a/PowerEditor/installer/nativeLang/irish.xml b/PowerEditor/installer/nativeLang/irish.xml index c6b92d817..d65d14d86 100644 --- a/PowerEditor/installer/nativeLang/irish.xml +++ b/PowerEditor/installer/nativeLang/irish.xml @@ -164,7 +164,6 @@ - diff --git a/PowerEditor/installer/nativeLang/italian.xml b/PowerEditor/installer/nativeLang/italian.xml index 45801e403..4a95e6113 100644 --- a/PowerEditor/installer/nativeLang/italian.xml +++ b/PowerEditor/installer/nativeLang/italian.xml @@ -206,7 +206,6 @@ Translation note: - @@ -442,7 +441,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/japanese.xml b/PowerEditor/installer/nativeLang/japanese.xml index fa9c17127..a4356a52a 100644 --- a/PowerEditor/installer/nativeLang/japanese.xml +++ b/PowerEditor/installer/nativeLang/japanese.xml @@ -203,7 +203,6 @@ Translation note: - @@ -443,7 +442,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/kabyle.xml b/PowerEditor/installer/nativeLang/kabyle.xml index 64a8f4094..920b042b1 100644 --- a/PowerEditor/installer/nativeLang/kabyle.xml +++ b/PowerEditor/installer/nativeLang/kabyle.xml @@ -121,7 +121,6 @@ - diff --git a/PowerEditor/installer/nativeLang/kannada.xml b/PowerEditor/installer/nativeLang/kannada.xml index 471db63a8..f0ac556a3 100644 --- a/PowerEditor/installer/nativeLang/kannada.xml +++ b/PowerEditor/installer/nativeLang/kannada.xml @@ -135,7 +135,6 @@ - diff --git a/PowerEditor/installer/nativeLang/kazakh.xml b/PowerEditor/installer/nativeLang/kazakh.xml index a4d1a3bba..944f0dc42 100644 --- a/PowerEditor/installer/nativeLang/kazakh.xml +++ b/PowerEditor/installer/nativeLang/kazakh.xml @@ -86,7 +86,6 @@ - diff --git a/PowerEditor/installer/nativeLang/korean.xml b/PowerEditor/installer/nativeLang/korean.xml index 34d97dc74..98a7f2286 100644 --- a/PowerEditor/installer/nativeLang/korean.xml +++ b/PowerEditor/installer/nativeLang/korean.xml @@ -203,7 +203,6 @@ Translation note: - @@ -437,7 +436,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/kurdish.xml b/PowerEditor/installer/nativeLang/kurdish.xml index 5765cab00..aadcf1b9e 100644 --- a/PowerEditor/installer/nativeLang/kurdish.xml +++ b/PowerEditor/installer/nativeLang/kurdish.xml @@ -165,7 +165,6 @@ - diff --git a/PowerEditor/installer/nativeLang/kyrgyz.xml b/PowerEditor/installer/nativeLang/kyrgyz.xml index f84c5e65f..ad73961c9 100644 --- a/PowerEditor/installer/nativeLang/kyrgyz.xml +++ b/PowerEditor/installer/nativeLang/kyrgyz.xml @@ -111,7 +111,6 @@ - diff --git a/PowerEditor/installer/nativeLang/latvian.xml b/PowerEditor/installer/nativeLang/latvian.xml index 88e639e65..8fff80d57 100644 --- a/PowerEditor/installer/nativeLang/latvian.xml +++ b/PowerEditor/installer/nativeLang/latvian.xml @@ -137,7 +137,6 @@ - diff --git a/PowerEditor/installer/nativeLang/ligurian.xml b/PowerEditor/installer/nativeLang/ligurian.xml index 7b93f7351..9a3fa9b04 100644 --- a/PowerEditor/installer/nativeLang/ligurian.xml +++ b/PowerEditor/installer/nativeLang/ligurian.xml @@ -111,7 +111,6 @@ - diff --git a/PowerEditor/installer/nativeLang/lithuanian.xml b/PowerEditor/installer/nativeLang/lithuanian.xml index ec191f8d6..1a341f1a5 100644 --- a/PowerEditor/installer/nativeLang/lithuanian.xml +++ b/PowerEditor/installer/nativeLang/lithuanian.xml @@ -164,7 +164,6 @@ - diff --git a/PowerEditor/installer/nativeLang/luxembourgish.xml b/PowerEditor/installer/nativeLang/luxembourgish.xml index dfbd58201..4329133f2 100644 --- a/PowerEditor/installer/nativeLang/luxembourgish.xml +++ b/PowerEditor/installer/nativeLang/luxembourgish.xml @@ -75,7 +75,6 @@ - diff --git a/PowerEditor/installer/nativeLang/macedonian.xml b/PowerEditor/installer/nativeLang/macedonian.xml index 6c04c79d8..943361e7d 100644 --- a/PowerEditor/installer/nativeLang/macedonian.xml +++ b/PowerEditor/installer/nativeLang/macedonian.xml @@ -91,7 +91,6 @@ - diff --git a/PowerEditor/installer/nativeLang/malay.xml b/PowerEditor/installer/nativeLang/malay.xml index 9521ec09b..d7eb2e84f 100644 --- a/PowerEditor/installer/nativeLang/malay.xml +++ b/PowerEditor/installer/nativeLang/malay.xml @@ -80,7 +80,6 @@ Desc: Malay translation for Notepad++ - diff --git a/PowerEditor/installer/nativeLang/marathi.xml b/PowerEditor/installer/nativeLang/marathi.xml index 0ad75edfe..7d2b19ead 100644 --- a/PowerEditor/installer/nativeLang/marathi.xml +++ b/PowerEditor/installer/nativeLang/marathi.xml @@ -124,7 +124,6 @@ - diff --git a/PowerEditor/installer/nativeLang/mongolian.xml b/PowerEditor/installer/nativeLang/mongolian.xml index a69a55ca9..33517229b 100644 --- a/PowerEditor/installer/nativeLang/mongolian.xml +++ b/PowerEditor/installer/nativeLang/mongolian.xml @@ -135,7 +135,6 @@ - diff --git a/PowerEditor/installer/nativeLang/nepali.xml b/PowerEditor/installer/nativeLang/nepali.xml index 53d8fada9..c39a972d4 100644 --- a/PowerEditor/installer/nativeLang/nepali.xml +++ b/PowerEditor/installer/nativeLang/nepali.xml @@ -163,7 +163,6 @@ - diff --git a/PowerEditor/installer/nativeLang/norwegian.xml b/PowerEditor/installer/nativeLang/norwegian.xml index 4d63fa9ec..2ec8efda4 100644 --- a/PowerEditor/installer/nativeLang/norwegian.xml +++ b/PowerEditor/installer/nativeLang/norwegian.xml @@ -203,7 +203,6 @@ Translation note: - @@ -439,7 +438,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/nynorsk.xml b/PowerEditor/installer/nativeLang/nynorsk.xml index 5c911e1a9..4f5ca4210 100644 --- a/PowerEditor/installer/nativeLang/nynorsk.xml +++ b/PowerEditor/installer/nativeLang/nynorsk.xml @@ -125,7 +125,6 @@ - diff --git a/PowerEditor/installer/nativeLang/occitan.xml b/PowerEditor/installer/nativeLang/occitan.xml index 08d2a1961..bb080af28 100644 --- a/PowerEditor/installer/nativeLang/occitan.xml +++ b/PowerEditor/installer/nativeLang/occitan.xml @@ -125,7 +125,6 @@ - diff --git a/PowerEditor/installer/nativeLang/piglatin.xml b/PowerEditor/installer/nativeLang/piglatin.xml index 16a146eb9..938291a55 100644 --- a/PowerEditor/installer/nativeLang/piglatin.xml +++ b/PowerEditor/installer/nativeLang/piglatin.xml @@ -159,7 +159,6 @@ - diff --git a/PowerEditor/installer/nativeLang/polish.xml b/PowerEditor/installer/nativeLang/polish.xml index 50f28c120..876fd9a5b 100644 --- a/PowerEditor/installer/nativeLang/polish.xml +++ b/PowerEditor/installer/nativeLang/polish.xml @@ -213,7 +213,6 @@ Translation note: - @@ -449,7 +448,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/portuguese.xml b/PowerEditor/installer/nativeLang/portuguese.xml index b0743d828..21dea76ec 100644 --- a/PowerEditor/installer/nativeLang/portuguese.xml +++ b/PowerEditor/installer/nativeLang/portuguese.xml @@ -203,7 +203,6 @@ Translation note: - @@ -439,7 +438,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/punjabi.xml b/PowerEditor/installer/nativeLang/punjabi.xml index af7e2d59e..eef399385 100644 --- a/PowerEditor/installer/nativeLang/punjabi.xml +++ b/PowerEditor/installer/nativeLang/punjabi.xml @@ -145,7 +145,6 @@ - diff --git a/PowerEditor/installer/nativeLang/romanian.xml b/PowerEditor/installer/nativeLang/romanian.xml index 156f4dfce..bf2fae413 100644 --- a/PowerEditor/installer/nativeLang/romanian.xml +++ b/PowerEditor/installer/nativeLang/romanian.xml @@ -204,7 +204,6 @@ - @@ -441,7 +440,6 @@ - diff --git a/PowerEditor/installer/nativeLang/russian.xml b/PowerEditor/installer/nativeLang/russian.xml index c5e5edab6..87a29ed4b 100644 --- a/PowerEditor/installer/nativeLang/russian.xml +++ b/PowerEditor/installer/nativeLang/russian.xml @@ -232,7 +232,6 @@ Updated to : - @@ -487,7 +486,6 @@ Updated to : - diff --git a/PowerEditor/installer/nativeLang/sardinian.xml b/PowerEditor/installer/nativeLang/sardinian.xml index 06ba9de7e..0d031c5ba 100644 --- a/PowerEditor/installer/nativeLang/sardinian.xml +++ b/PowerEditor/installer/nativeLang/sardinian.xml @@ -132,7 +132,6 @@ - diff --git a/PowerEditor/installer/nativeLang/serbian.xml b/PowerEditor/installer/nativeLang/serbian.xml index d09523c9e..dc3339299 100644 --- a/PowerEditor/installer/nativeLang/serbian.xml +++ b/PowerEditor/installer/nativeLang/serbian.xml @@ -201,7 +201,6 @@ - @@ -437,7 +436,6 @@ - diff --git a/PowerEditor/installer/nativeLang/serbianCyrillic.xml b/PowerEditor/installer/nativeLang/serbianCyrillic.xml index 547239679..7f77f8489 100644 --- a/PowerEditor/installer/nativeLang/serbianCyrillic.xml +++ b/PowerEditor/installer/nativeLang/serbianCyrillic.xml @@ -202,7 +202,6 @@ - @@ -438,7 +437,6 @@ - diff --git a/PowerEditor/installer/nativeLang/sinhala.xml b/PowerEditor/installer/nativeLang/sinhala.xml index f02e246e3..b6c9e9a90 100644 --- a/PowerEditor/installer/nativeLang/sinhala.xml +++ b/PowerEditor/installer/nativeLang/sinhala.xml @@ -128,7 +128,6 @@ - diff --git a/PowerEditor/installer/nativeLang/slovak.xml b/PowerEditor/installer/nativeLang/slovak.xml index 89e811f82..8339948c7 100644 --- a/PowerEditor/installer/nativeLang/slovak.xml +++ b/PowerEditor/installer/nativeLang/slovak.xml @@ -201,7 +201,6 @@ - @@ -437,7 +436,6 @@ - diff --git a/PowerEditor/installer/nativeLang/slovenian.xml b/PowerEditor/installer/nativeLang/slovenian.xml index 715bc1100..e4e2a5a7b 100644 --- a/PowerEditor/installer/nativeLang/slovenian.xml +++ b/PowerEditor/installer/nativeLang/slovenian.xml @@ -200,7 +200,6 @@ - @@ -433,7 +432,6 @@ - diff --git a/PowerEditor/installer/nativeLang/spanish.xml b/PowerEditor/installer/nativeLang/spanish.xml index e9eff4b63..e7836431a 100644 --- a/PowerEditor/installer/nativeLang/spanish.xml +++ b/PowerEditor/installer/nativeLang/spanish.xml @@ -203,7 +203,6 @@ Translation note: - @@ -439,7 +438,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/spanish_ar.xml b/PowerEditor/installer/nativeLang/spanish_ar.xml index 0657981ba..c9b500169 100644 --- a/PowerEditor/installer/nativeLang/spanish_ar.xml +++ b/PowerEditor/installer/nativeLang/spanish_ar.xml @@ -132,7 +132,6 @@ - diff --git a/PowerEditor/installer/nativeLang/swedish.xml b/PowerEditor/installer/nativeLang/swedish.xml index 642f9e9ce..47b3ba5f8 100644 --- a/PowerEditor/installer/nativeLang/swedish.xml +++ b/PowerEditor/installer/nativeLang/swedish.xml @@ -203,7 +203,6 @@ Translation note: - @@ -439,7 +438,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/tagalog.xml b/PowerEditor/installer/nativeLang/tagalog.xml index cb7c6c610..c5354c0b5 100644 --- a/PowerEditor/installer/nativeLang/tagalog.xml +++ b/PowerEditor/installer/nativeLang/tagalog.xml @@ -86,7 +86,6 @@ - diff --git a/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml b/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml index 4860b85b5..039e06a0a 100644 --- a/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml +++ b/PowerEditor/installer/nativeLang/taiwaneseMandarin.xml @@ -177,12 +177,12 @@ - + - + diff --git a/PowerEditor/installer/nativeLang/tajikCyrillic.xml b/PowerEditor/installer/nativeLang/tajikCyrillic.xml index b3870f173..645aea679 100644 --- a/PowerEditor/installer/nativeLang/tajikCyrillic.xml +++ b/PowerEditor/installer/nativeLang/tajikCyrillic.xml @@ -135,7 +135,6 @@ - diff --git a/PowerEditor/installer/nativeLang/tamil.xml b/PowerEditor/installer/nativeLang/tamil.xml index 4518e8069..0027da087 100644 --- a/PowerEditor/installer/nativeLang/tamil.xml +++ b/PowerEditor/installer/nativeLang/tamil.xml @@ -176,7 +176,6 @@ - diff --git a/PowerEditor/installer/nativeLang/tatar.xml b/PowerEditor/installer/nativeLang/tatar.xml index 910be2e8e..93a473b70 100644 --- a/PowerEditor/installer/nativeLang/tatar.xml +++ b/PowerEditor/installer/nativeLang/tatar.xml @@ -122,7 +122,6 @@ - diff --git a/PowerEditor/installer/nativeLang/telugu.xml b/PowerEditor/installer/nativeLang/telugu.xml index 154556adf..3eb8a4c30 100644 --- a/PowerEditor/installer/nativeLang/telugu.xml +++ b/PowerEditor/installer/nativeLang/telugu.xml @@ -118,7 +118,6 @@ - diff --git a/PowerEditor/installer/nativeLang/thai.xml b/PowerEditor/installer/nativeLang/thai.xml index d79b65380..313669fef 100644 --- a/PowerEditor/installer/nativeLang/thai.xml +++ b/PowerEditor/installer/nativeLang/thai.xml @@ -114,7 +114,6 @@ - diff --git a/PowerEditor/installer/nativeLang/turkish.xml b/PowerEditor/installer/nativeLang/turkish.xml index 0ea11171a..d5d07f1d6 100644 --- a/PowerEditor/installer/nativeLang/turkish.xml +++ b/PowerEditor/installer/nativeLang/turkish.xml @@ -201,7 +201,6 @@ - @@ -437,7 +436,6 @@ - diff --git a/PowerEditor/installer/nativeLang/ukrainian.xml b/PowerEditor/installer/nativeLang/ukrainian.xml index fd97cae6b..629f4aa5b 100644 --- a/PowerEditor/installer/nativeLang/ukrainian.xml +++ b/PowerEditor/installer/nativeLang/ukrainian.xml @@ -200,7 +200,6 @@ Translation note: - @@ -434,7 +433,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/uyghur.xml b/PowerEditor/installer/nativeLang/uyghur.xml index 225c1e8cb..a52013d4f 100644 --- a/PowerEditor/installer/nativeLang/uyghur.xml +++ b/PowerEditor/installer/nativeLang/uyghur.xml @@ -127,7 +127,6 @@ - diff --git a/PowerEditor/installer/nativeLang/uzbek.xml b/PowerEditor/installer/nativeLang/uzbek.xml index db78c65b9..629cea43b 100644 --- a/PowerEditor/installer/nativeLang/uzbek.xml +++ b/PowerEditor/installer/nativeLang/uzbek.xml @@ -144,7 +144,6 @@ Updater: Shamsiddinov Zafar - diff --git a/PowerEditor/installer/nativeLang/uzbekCyrillic.xml b/PowerEditor/installer/nativeLang/uzbekCyrillic.xml index 6e626c2ed..af7a186df 100644 --- a/PowerEditor/installer/nativeLang/uzbekCyrillic.xml +++ b/PowerEditor/installer/nativeLang/uzbekCyrillic.xml @@ -90,7 +90,6 @@ - diff --git a/PowerEditor/installer/nativeLang/venetian.xml b/PowerEditor/installer/nativeLang/venetian.xml index ac6e08797..bed0a51c3 100644 --- a/PowerEditor/installer/nativeLang/venetian.xml +++ b/PowerEditor/installer/nativeLang/venetian.xml @@ -206,7 +206,6 @@ Translation note: - @@ -440,7 +439,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/vietnamese.xml b/PowerEditor/installer/nativeLang/vietnamese.xml index 8bd5e7db3..bc285ffe4 100644 --- a/PowerEditor/installer/nativeLang/vietnamese.xml +++ b/PowerEditor/installer/nativeLang/vietnamese.xml @@ -201,7 +201,6 @@ Translation note: - @@ -437,7 +436,6 @@ Translation note: - diff --git a/PowerEditor/installer/nativeLang/welsh.xml b/PowerEditor/installer/nativeLang/welsh.xml index 9e64c8bf9..e899d1ac5 100644 --- a/PowerEditor/installer/nativeLang/welsh.xml +++ b/PowerEditor/installer/nativeLang/welsh.xml @@ -140,7 +140,6 @@ gan/by Aled Powell - diff --git a/PowerEditor/installer/nativeLang/zulu.xml b/PowerEditor/installer/nativeLang/zulu.xml index cd165e46a..5800a875b 100644 --- a/PowerEditor/installer/nativeLang/zulu.xml +++ b/PowerEditor/installer/nativeLang/zulu.xml @@ -167,7 +167,6 @@ - diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index 2c13ab9f8..e74537982 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/PowerEditor/src/MISC/Common/Common.cpp @@ -1517,6 +1517,23 @@ bool removeReadOnlyFlagFromFileAttributes(const wchar_t* fileFullPath) return (::SetFileAttributes(fileFullPath, dwFileAttribs) != FALSE); } +// return true when set to read-only, false otherwise +bool toggleReadOnlyFlagFromFileAttributes(const wchar_t* fileFullPath) +{ + DWORD dwFileAttribs = ::GetFileAttributes(fileFullPath); + + if (dwFileAttribs == INVALID_FILE_ATTRIBUTES || (dwFileAttribs & FILE_ATTRIBUTE_DIRECTORY)) + return false; + if (dwFileAttribs & FILE_ATTRIBUTE_READONLY) + dwFileAttribs &= ~FILE_ATTRIBUTE_READONLY; + else + dwFileAttribs |= FILE_ATTRIBUTE_READONLY; + + ::SetFileAttributes(fileFullPath, dwFileAttribs); + + return (dwFileAttribs & FILE_ATTRIBUTE_READONLY) != 0; +} + // "For file I/O, the "\\?\" prefix to a path string tells the Windows APIs to disable all string parsing // and to send the string that follows it straight to the file system..." // Ref: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#win32-file-namespaces diff --git a/PowerEditor/src/MISC/Common/Common.h b/PowerEditor/src/MISC/Common/Common.h index e3aa45f51..7159eb732 100644 --- a/PowerEditor/src/MISC/Common/Common.h +++ b/PowerEditor/src/MISC/Common/Common.h @@ -220,6 +220,7 @@ std::wstring getDateTimeStrFrom(const std::wstring& dateTimeFormat, const SYSTEM HFONT createFont(const wchar_t* fontName, int fontSize, bool isBold, HWND hDestParent); bool removeReadOnlyFlagFromFileAttributes(const wchar_t* fileFullPath); +bool toggleReadOnlyFlagFromFileAttributes(const wchar_t* fileFullPath); bool isWin32NamespacePrefixedFileName(const std::wstring& fileName); bool isWin32NamespacePrefixedFileName(const wchar_t* szFileName); diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index d1439dbb0..9bc88f880 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2587,13 +2587,13 @@ void Notepad_plus::checkDocState() enableCommand(IDM_VIEW_LOAD_IN_NEW_INSTANCE, !(isCurrentDirty || isCurrentUntitled), MENU); bool isSysReadOnly = curBuf->getFileReadOnly(); - enableCommand(IDM_EDIT_CLEARREADONLY, isSysReadOnly, MENU); bool doEnable = !(curBuf->isMonitoringOn() || isSysReadOnly); - enableCommand(IDM_EDIT_SETREADONLY, doEnable, MENU); + enableCommand(IDM_EDIT_TOGGLEREADONLY, doEnable, MENU); bool isUserReadOnly = curBuf->getUserReadOnly(); - ::CheckMenuItem(_mainMenuHandle, IDM_EDIT_SETREADONLY, MF_BYCOMMAND | (isUserReadOnly ? MF_CHECKED : MF_UNCHECKED)); + ::CheckMenuItem(_mainMenuHandle, IDM_EDIT_TOGGLEREADONLY, MF_BYCOMMAND | (isUserReadOnly ? MF_CHECKED : MF_UNCHECKED)); + enableCommand(IDM_FILE_DELETE, isFileExisting, MENU); enableCommand(IDM_FILE_OPEN_CMD, isFileExisting, MENU); @@ -2621,8 +2621,17 @@ void Notepad_plus::checkDocState() enableCommand(IDM_FILE_SAVEAS, !curBuf->isInaccessible(), MENU); enableCommand(IDM_FILE_RENAME, !curBuf->isInaccessible(), MENU); - if (curBuf->isInaccessible()) - enableCommand(IDM_EDIT_CLEARREADONLY, false, MENU); + if (curBuf->isInaccessible() || isCurrentUntitled) + { + ::CheckMenuItem(_mainMenuHandle, IDM_EDIT_TOGGLESYSTEMREADONLY, MF_BYCOMMAND | MF_UNCHECKED); + enableCommand(IDM_EDIT_TOGGLESYSTEMREADONLY, false, MENU); + } + else + { + enableCommand(IDM_EDIT_TOGGLESYSTEMREADONLY, true, MENU); + ::CheckMenuItem(_mainMenuHandle, IDM_EDIT_TOGGLESYSTEMREADONLY, MF_BYCOMMAND | (isSysReadOnly ? MF_CHECKED : MF_UNCHECKED)); + } + enableCommand(IDM_VIEW_GOTO_ANOTHER_VIEW, !curBuf->isInaccessible(), MENU); enableCommand(IDM_VIEW_CLONE_TO_ANOTHER_VIEW, !curBuf->isInaccessible(), MENU); enableCommand(IDM_VIEW_GOTO_NEW_INSTANCE, !curBuf->isInaccessible() && !curBuf->isDirty() && !curBuf->isUntitled(), MENU); diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index 37752342e..852030ff3 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -284,6 +284,9 @@ IDI_UNSAVED_ALT_ICON ICON "icons/standard/tabbar/unsaved_alt.ico IDI_READONLY_ICON ICON "icons/standard/tabbar/readonly.ico" IDI_READONLY_DM_ICON ICON "icons/dark/tabbar/readonly.ico" IDI_READONLY_ALT_ICON ICON "icons/standard/tabbar/readonly_alt.ico" +IDI_READONLYSYS_ICON ICON "icons/standard/tabbar/readonly_sys.ico" +IDI_READONLYSYS_DM_ICON ICON "icons/dark/tabbar/readonly_sys.ico" +IDI_READONLYSYS_ALT_ICON ICON "icons/standard/tabbar/readonly_sys_alt.ico" IDI_MONITORING_ICON ICON "icons/standard/tabbar/monitoring.ico" IDI_MONITORING_DM_ICON ICON "icons/dark/tabbar/monitoring.ico" @@ -628,8 +631,8 @@ BEGIN MENUITEM "Character &Panel", IDM_EDIT_CHAR_PANEL MENUITEM "Clipboard &History", IDM_EDIT_CLIPBOARDHISTORY_PANEL MENUITEM SEPARATOR - MENUITEM "&Set Read-Only", IDM_EDIT_SETREADONLY - MENUITEM "Clear Read-Only Flag", IDM_EDIT_CLEARREADONLY + MENUITEM "Read-Only in Notepad++", IDM_EDIT_TOGGLEREADONLY + MENUITEM "Read-Only Attribute in Windows", IDM_EDIT_TOGGLESYSTEMREADONLY END POPUP "&Search" diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index ac947ddc1..2dc5dfec0 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2098,18 +2098,18 @@ void Notepad_plus::command(int id) wsTabConvert(space2TabAll); break; - case IDM_EDIT_SETREADONLY: + case IDM_EDIT_TOGGLEREADONLY: { Buffer * buf = _pEditView->getCurrentBuffer(); buf->setUserReadOnly(!buf->getUserReadOnly()); } break; - case IDM_EDIT_CLEARREADONLY: + case IDM_EDIT_TOGGLESYSTEMREADONLY: { Buffer * buf = _pEditView->getCurrentBuffer(); - removeReadOnlyFlagFromFileAttributes(buf->getFullPathName()); - buf->setFileReadOnly(false); + bool isSysReadOnly = toggleReadOnlyFlagFromFileAttributes(buf->getFullPathName()); + buf->setFileReadOnly(isSysReadOnly); } break; @@ -4161,11 +4161,11 @@ void Notepad_plus::command(int id) case IDM_EDIT_TAB2SW: case IDM_EDIT_SW2TAB_ALL: case IDM_EDIT_SW2TAB_LEADING: - case IDM_EDIT_SETREADONLY : + case IDM_EDIT_TOGGLEREADONLY : case IDM_EDIT_FULLPATHTOCLIP : case IDM_EDIT_FILENAMETOCLIP : case IDM_EDIT_CURRENTDIRTOCLIP : - case IDM_EDIT_CLEARREADONLY : + case IDM_EDIT_TOGGLESYSTEMREADONLY : case IDM_EDIT_RTL : case IDM_EDIT_LTR : case IDM_EDIT_BEGINENDSELECT: diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index cca0efb97..32d511904 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -1048,8 +1048,8 @@ BOOL Notepad_plus::notify(SCNotification *notification) itemUnitArray.push_back(MenuItemUnit(IDM_FILE_RELOAD, L"Reload")); itemUnitArray.push_back(MenuItemUnit(IDM_FILE_PRINT, L"Print")); itemUnitArray.push_back(MenuItemUnit(0, NULL)); - itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_SETREADONLY, L"Read-Only")); - itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_CLEARREADONLY, L"Clear Read-Only Flag")); + itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_TOGGLEREADONLY, L"Read-Only in Notepad++")); + itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_TOGGLESYSTEMREADONLY, L"Read-Only Attribute in Windows")); itemUnitArray.push_back(MenuItemUnit(0, NULL)); itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_FULLPATHTOCLIP, L"Copy Full File Path", L"Copy to Clipboard")); itemUnitArray.push_back(MenuItemUnit(IDM_EDIT_FILENAMETOCLIP, L"Copy Filename", L"Copy to Clipboard")); @@ -1087,14 +1087,22 @@ BOOL Notepad_plus::notify(SCNotification *notification) Buffer* buf = _pEditView->getCurrentBuffer(); bool isUserReadOnly = buf->getUserReadOnly(); - _tabPopupMenu.checkItem(IDM_EDIT_SETREADONLY, isUserReadOnly); + _tabPopupMenu.checkItem(IDM_EDIT_TOGGLEREADONLY, isUserReadOnly); bool isSysReadOnly = buf->getFileReadOnly(); bool isInaccessible = buf->isInaccessible(); - _tabPopupMenu.enableItem(IDM_EDIT_SETREADONLY, !isSysReadOnly && !buf->isMonitoringOn()); - _tabPopupMenu.enableItem(IDM_EDIT_CLEARREADONLY, isSysReadOnly); - if (isInaccessible) - _tabPopupMenu.enableItem(IDM_EDIT_CLEARREADONLY, false); + bool isUntitled = buf->isUntitled(); + _tabPopupMenu.enableItem(IDM_EDIT_TOGGLEREADONLY, !isSysReadOnly && !buf->isMonitoringOn()); + if (isInaccessible || isUntitled) + { + _tabPopupMenu.checkItem(IDM_EDIT_TOGGLESYSTEMREADONLY, false); + _tabPopupMenu.enableItem(IDM_EDIT_TOGGLESYSTEMREADONLY, false); + } + else + { + _tabPopupMenu.enableItem(IDM_EDIT_TOGGLESYSTEMREADONLY, true); + _tabPopupMenu.checkItem(IDM_EDIT_TOGGLESYSTEMREADONLY, isSysReadOnly); + } bool isFileExisting = doesFileExist(buf->getFullPathName()); _tabPopupMenu.enableItem(IDM_FILE_DELETE, isFileExisting); @@ -1106,7 +1114,6 @@ BOOL Notepad_plus::notify(SCNotification *notification) _tabPopupMenu.enableItem(IDM_FILE_OPEN_DEFAULT_VIEWER, isAssoCommandExisting(buf->getFullPathName())); bool isDirty = buf->isDirty(); - bool isUntitled = buf->isUntitled(); _tabPopupMenu.enableItem(IDM_VIEW_GOTO_ANOTHER_VIEW, !isInaccessible); _tabPopupMenu.enableItem(IDM_VIEW_CLONE_TO_ANOTHER_VIEW, !isInaccessible); _tabPopupMenu.enableItem(IDM_VIEW_GOTO_NEW_INSTANCE, !isInaccessible && !isDirty && !isUntitled); diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 5fb91e544..ccc31ea64 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -189,8 +189,8 @@ static const WinMenuKeyDefinition winKeyDefs[] = { VK_C, IDM_EDIT_COLUMNMODE, false, true, false, nullptr }, { VK_NULL, IDM_EDIT_CHAR_PANEL, false, false, false, L"Toggle Character Panel" }, { VK_NULL, IDM_EDIT_CLIPBOARDHISTORY_PANEL, false, false, false, L"Toggle Clipboard History" }, - { VK_NULL, IDM_EDIT_SETREADONLY, false, false, false, nullptr }, - { VK_NULL, IDM_EDIT_CLEARREADONLY, false, false, false, nullptr }, + { VK_NULL, IDM_EDIT_TOGGLEREADONLY, false, false, false, nullptr }, + { VK_NULL, IDM_EDIT_TOGGLESYSTEMREADONLY, false, false, false, nullptr }, { VK_F, IDM_SEARCH_FIND, true, false, false, nullptr }, { VK_F, IDM_SEARCH_FINDINFILES, true, false, true, nullptr }, { VK_F3, IDM_SEARCH_FINDNEXT, false, false, false, nullptr }, diff --git a/PowerEditor/src/ScintillaComponent/DocTabView.cpp b/PowerEditor/src/ScintillaComponent/DocTabView.cpp index 5f5a759b1..9ba18ef8b 100644 --- a/PowerEditor/src/ScintillaComponent/DocTabView.cpp +++ b/PowerEditor/src/ScintillaComponent/DocTabView.cpp @@ -23,9 +23,9 @@ #define _WIN32_IE 0x0600 #endif //_WIN32_IE -int docTabIconIDs[] = { IDI_SAVED_ICON, IDI_UNSAVED_ICON, IDI_READONLY_ICON, IDI_MONITORING_ICON }; -int docTabIconIDs_darkMode[] = { IDI_SAVED_DM_ICON, IDI_UNSAVED_DM_ICON, IDI_READONLY_DM_ICON, IDI_MONITORING_DM_ICON }; -int docTabIconIDs_alt[] = { IDI_SAVED_ALT_ICON, IDI_UNSAVED_ALT_ICON, IDI_READONLY_ALT_ICON, IDI_MONITORING_ICON }; +int docTabIconIDs[] = { IDI_SAVED_ICON, IDI_UNSAVED_ICON, IDI_READONLY_ICON, IDI_READONLYSYS_ICON, IDI_MONITORING_ICON }; +int docTabIconIDs_darkMode[] = { IDI_SAVED_DM_ICON, IDI_UNSAVED_DM_ICON, IDI_READONLY_DM_ICON, IDI_READONLYSYS_DM_ICON, IDI_MONITORING_DM_ICON }; +int docTabIconIDs_alt[] = { IDI_SAVED_ALT_ICON, IDI_UNSAVED_ALT_ICON, IDI_READONLY_ALT_ICON, IDI_READONLYSYS_ALT_ICON, IDI_MONITORING_ICON }; @@ -183,7 +183,11 @@ void DocTabView::bufferUpdated(Buffer * buffer, int mask) { tie.iImage = MONITORING_IMG_INDEX; } - else if (buffer->isReadOnly()) + else if (buffer->getFileReadOnly()) + { + tie.iImage = REDONLYSYS_IMG_INDEX; + } + else if (buffer->getUserReadOnly()) { tie.iImage = REDONLY_IMG_INDEX; } diff --git a/PowerEditor/src/ScintillaComponent/DocTabView.h b/PowerEditor/src/ScintillaComponent/DocTabView.h index 9a46d8bb5..8ff500642 100644 --- a/PowerEditor/src/ScintillaComponent/DocTabView.h +++ b/PowerEditor/src/ScintillaComponent/DocTabView.h @@ -22,7 +22,8 @@ const int SAVED_IMG_INDEX = 0; const int UNSAVED_IMG_INDEX = 1; const int REDONLY_IMG_INDEX = 2; -const int MONITORING_IMG_INDEX = 3; +const int REDONLYSYS_IMG_INDEX = 3; +const int MONITORING_IMG_INDEX = 4; class DocTabView : public TabBarPlus diff --git a/PowerEditor/src/icons/dark/tabbar/readonly_sys.ico b/PowerEditor/src/icons/dark/tabbar/readonly_sys.ico new file mode 100644 index 0000000000000000000000000000000000000000..a5d95abbc4799f36fbf2588a1f02d30ef95ef640 GIT binary patch literal 10718 zcmeI2U2GIp6vzLxKr0x!OE3^gWFdx_SW@-{ec+=$Dwyp0;0O3%U?AlnV>?4=Wfz##|8qk?pgAbVPnKPM;* z3W}rTZ-w}F@>|L8B7cDV3GxHvC&=F>{|EUyP?Q@ei4*wW!2!;2fOBiex0ByMzLWeLk|;5#3)*_m?=ljDW<(H9P zli~Hs0h_vkZN0#I<-bKktBk zCNV^QjQk||-^kx4e>cQ;tY!CKWA}Hk`+L~^BkcZ3c7FhnOG(I38Zw%NT+c&(FF>3k z8eo8)QB*-d_b5^^{VIi7|5kcXTr&}I>GqZIJXr&yv4Dp64u#kiS7bxPRKw zfvvQ#n-&hz!UgsMZv>TaR06(zmEJC@^6vfNq#T+ zL*&0s3VPClGg-m;ykM{(7%2*Fl>)w%ypF(g>C^@9^= z$@*5yANRWH7`kKISiR!9&A_~S*}U7Cr>N;gMT6_jjI}G!r@rF#?e_c`=VhQpsNco7 zDx7O1r1hFP7qo8sO!LM4p1#Q&acx|X>iJFHz@M%v|I2>AWYv99J2r1~yn1!sQugFs z^D6WHX0PtFdAW|P+KbLLPE9d&GBt`*H7?Z{Rby3+Lp5&I*mPoI!i`(g?=Vi}8aMwr z zSZ>N-Rlj)H3-3_WVub4lbM?lRv8 zR&i^S3mrc#WFAf}{cVmWBWo$M&SdnNs|~d!gLlMD7bZnC4Gf6r5~kcDqDvV6&~*xT zh}}K)M(Y&aL)SHmu1|FTT-PTwb4ec4DG znpQCB-=|EzU44%6b)EZuxY2V=-vOIhSRDW{M6b)#}+0Zo*hr0SH3hLj6wwV! z%Bn&EiUO)2zhe9J%ymK$>Z-QKbMMWZd7K%?Fcx?(E*gA4HC{b7j3`iRI)%iOYBM28gnbs3%(k*gWR}Q(z#NW_j&yugSD4=1 z5Fe4E9PN6Z_9Yz79x9nkf=Oyjeq>%N)hd=b_tV>3$PWbiIr0hjrh{;XfPg+^~@|cUX!ODrmSClWC`<= zOAHgf@(<_kC|{%)Uz}^6<%9nEWrU6X23qgmv6iOpr>ZHfYwWE}sjC`fEz($S;=}4H T{{9*4Eg8mt$O18s_LlwtKBg(% literal 0 HcmV?d00001 diff --git a/PowerEditor/src/icons/standard/tabbar/readonly_sys_alt.ico b/PowerEditor/src/icons/standard/tabbar/readonly_sys_alt.ico new file mode 100644 index 0000000000000000000000000000000000000000..b75d84728983715f8282303ff19b17197a36e63e GIT binary patch literal 1150 zcma))eN0)4{(ZoMCjR_hPlO;=5V>B2yHAXYhC^J!)B`zV357`Er zQ8%z_b-h44gi>!~;8MCE3y#uJZK06y(Txvb@=-cuT3E}v57z?i&(o0>(`e#7dG349 z^WNt??|IKrsWQaK%2J8(E8+{cMDLiY~J0Q!g6|hRE1IL~_CH@^3g6mvIDEaW2L2+>GIk zz{oOO5a_)Q_CSob-=nl%j?n6lu(80K(yNt8x`Hdb?<`M0u?z%nPpTw2MAG^!d7fUZ;=V8!`4z zMR}_;$R6hs#`##vKT$(&OMq=Z%<*z}n6rOIc|@E~vj6XO&C+*cl|o;XiYqay#Qsms zLvtujV=#ts4hqMjyghV{SI>v(46N|@iFN%4E0D-{bak+^nG2pG2$GlGicCn_^F||Kww5+cdeSeZ1H>PDx1# zMMXt?SayP^#eGZGpNK|dox8WUn`)^FlgV`VKXZxi1b4W+9Hm*I_&~8cJujQ3O+MF0|V_a5|kB494m2Bq`fyG;aJzK$0}s zn##)g#wLaO`g%%BOAFKWilSu7vOMYWcAbtIPxLht;T27&qBt{?|0Uy*46FM8!0ooG6ZrYAHOy|Zs;}K=RsRjOU|v1| literal 0 HcmV?d00001 diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 2d634f6b4..cea3a7c7e 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -110,12 +110,12 @@ #define IDM_MACRO_SAVECURRENTMACRO (IDM_EDIT + 25) #define IDM_EDIT_RTL (IDM_EDIT + 26) #define IDM_EDIT_LTR (IDM_EDIT + 27) - #define IDM_EDIT_SETREADONLY (IDM_EDIT + 28) + #define IDM_EDIT_TOGGLEREADONLY (IDM_EDIT + 28) #define IDM_EDIT_FULLPATHTOCLIP (IDM_EDIT + 29) #define IDM_EDIT_FILENAMETOCLIP (IDM_EDIT + 30) #define IDM_EDIT_CURRENTDIRTOCLIP (IDM_EDIT + 31) #define IDM_MACRO_RUNMULTIMACRODLG (IDM_EDIT + 32) - #define IDM_EDIT_CLEARREADONLY (IDM_EDIT + 33) + #define IDM_EDIT_TOGGLESYSTEMREADONLY (IDM_EDIT + 33) #define IDM_EDIT_COLUMNMODE (IDM_EDIT + 34) #define IDM_EDIT_BLOCK_COMMENT_SET (IDM_EDIT + 35) #define IDM_EDIT_BLOCK_UNCOMMENT (IDM_EDIT + 36) diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index e12adc4f4..3132b2953 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -267,7 +267,9 @@ #define IDI_UNSAVED_DM_ICON 510 #define IDI_MONITORING_DM_ICON 511 #define IDI_READONLY_DM_ICON 512 - +#define IDI_READONLYSYS_ICON 513 +#define IDI_READONLYSYS_DM_ICON 514 +#define IDI_READONLYSYS_ALT_ICON 515 #define IDI_PROJECT_WORKSPACE 601 #define IDI_PROJECT_WORKSPACEDIRTY 602