https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9a24e9799ea3060a4118d…
commit 9a24e9799ea3060a4118d5eadb37b0c3f60826da
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Fri Apr 26 23:12:36 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Fri Apr 26 23:12:36 2019 +0200
[POWERCFG] Show the name of the power scheme in the delete confirmation message box
---
dll/cpl/powercfg/lang/bg-BG.rc | 2 +-
dll/cpl/powercfg/lang/cs-CZ.rc | 2 +-
dll/cpl/powercfg/lang/de-DE.rc | 2 +-
dll/cpl/powercfg/lang/el-GR.rc | 2 +-
dll/cpl/powercfg/lang/en-US.rc | 2 +-
dll/cpl/powercfg/lang/es-ES.rc | 2 +-
dll/cpl/powercfg/lang/fr-FR.rc | 2 +-
dll/cpl/powercfg/lang/he-IL.rc | 2 +-
dll/cpl/powercfg/lang/id-ID.rc | 2 +-
dll/cpl/powercfg/lang/it-IT.rc | 2 +-
dll/cpl/powercfg/lang/ja-JP.rc | 2 +-
dll/cpl/powercfg/lang/nl-NL.rc | 2 +-
dll/cpl/powercfg/lang/no-NO.rc | 2 +-
dll/cpl/powercfg/lang/pl-PL.rc | 2 +-
dll/cpl/powercfg/lang/ro-RO.rc | 2 +-
dll/cpl/powercfg/lang/ru-RU.rc | 2 +-
dll/cpl/powercfg/lang/sk-SK.rc | 2 +-
dll/cpl/powercfg/lang/sq-AL.rc | 2 +-
dll/cpl/powercfg/lang/th-TH.rc | 2 +-
dll/cpl/powercfg/lang/tr-TR.rc | 2 +-
dll/cpl/powercfg/lang/uk-UA.rc | 2 +-
dll/cpl/powercfg/lang/zh-CN.rc | 2 +-
dll/cpl/powercfg/lang/zh-TW.rc | 6 +++---
dll/cpl/powercfg/powercfg.h | 1 +
dll/cpl/powercfg/powershemes.c | 10 ++++++----
25 files changed, 32 insertions(+), 29 deletions(-)
diff --git a/dll/cpl/powercfg/lang/bg-BG.rc b/dll/cpl/powercfg/lang/bg-BG.rc
index ae60c96ae0..08e2a23a79 100644
--- a/dll/cpl/powercfg/lang/bg-BG.rc
+++ b/dll/cpl/powercfg/lang/bg-BG.rc
@@ -136,6 +136,6 @@ BEGIN
IDS_TIMEOUT14 "След 4 часа"
IDS_TIMEOUT15 "След 5 часа"
IDS_TIMEOUT16 "Никога"
- IDS_DEL_SCHEME "Are you sure you want to delete the power scheme?"
+ IDS_DEL_SCHEME "Are you sure you want to delete the power scheme:
""%s""?"
IDS_DEL_SCHEME_TITLE "Delete Scheme"
END
diff --git a/dll/cpl/powercfg/lang/cs-CZ.rc b/dll/cpl/powercfg/lang/cs-CZ.rc
index b82dd59e7c..693691dd85 100644
--- a/dll/cpl/powercfg/lang/cs-CZ.rc
+++ b/dll/cpl/powercfg/lang/cs-CZ.rc
@@ -136,6 +136,6 @@ BEGIN
IDS_TIMEOUT14 "Po 4 hodinách"
IDS_TIMEOUT15 "Po 5 hodinách"
IDS_TIMEOUT16 "Nikdy"
- IDS_DEL_SCHEME "Opravdu si přejete smazat toto schéma napájení?"
+ IDS_DEL_SCHEME "Opravdu si přejete smazat toto schéma napájení:
""%s""?"
IDS_DEL_SCHEME_TITLE "Smazat schéma"
END
diff --git a/dll/cpl/powercfg/lang/de-DE.rc b/dll/cpl/powercfg/lang/de-DE.rc
index 048e176f30..e39538f5ce 100644
--- a/dll/cpl/powercfg/lang/de-DE.rc
+++ b/dll/cpl/powercfg/lang/de-DE.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "Nach 4 Stunden"
IDS_TIMEOUT15 "Nach 5 Stunden"
IDS_TIMEOUT16 "Nie"
- IDS_DEL_SCHEME "Sind Sie sich sicher, dass Sie das Energieschema löschen
wollen?"
+ IDS_DEL_SCHEME "Soll folgendes Energieschema gelöscht werden:
""%s""?"
IDS_DEL_SCHEME_TITLE "Schema löschen"
END
diff --git a/dll/cpl/powercfg/lang/el-GR.rc b/dll/cpl/powercfg/lang/el-GR.rc
index c82db41027..5db1535555 100644
--- a/dll/cpl/powercfg/lang/el-GR.rc
+++ b/dll/cpl/powercfg/lang/el-GR.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "σε 4 ώρες"
IDS_TIMEOUT15 "σε 5 ώρες"
IDS_TIMEOUT16 "Ποτέ"
- IDS_DEL_SCHEME "Είστε σίγουροι ότι θέλετε να διαγράψετε αυτόν τον συνδιασμό
τροφοδοσίας;"
+ IDS_DEL_SCHEME "Είστε σίγουροι ότι θέλετε να διαγράψετε αυτόν τον συνδιασμό
τροφοδοσίας: ""%s"""
IDS_DEL_SCHEME_TITLE "Διαγραφή συνδιασμού"
END
diff --git a/dll/cpl/powercfg/lang/en-US.rc b/dll/cpl/powercfg/lang/en-US.rc
index 98787b8e04..3de63ad589 100644
--- a/dll/cpl/powercfg/lang/en-US.rc
+++ b/dll/cpl/powercfg/lang/en-US.rc
@@ -136,6 +136,6 @@ BEGIN
IDS_TIMEOUT14 "After 4 hours"
IDS_TIMEOUT15 "After 5 hours"
IDS_TIMEOUT16 "Never"
- IDS_DEL_SCHEME "Are you sure you want to delete the power scheme?"
+ IDS_DEL_SCHEME "Are you sure you want to delete the power scheme:
""%s""?"
IDS_DEL_SCHEME_TITLE "Delete Scheme"
END
diff --git a/dll/cpl/powercfg/lang/es-ES.rc b/dll/cpl/powercfg/lang/es-ES.rc
index 235cbb87b1..1ce2f75af3 100644
--- a/dll/cpl/powercfg/lang/es-ES.rc
+++ b/dll/cpl/powercfg/lang/es-ES.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "Tras 4 horas"
IDS_TIMEOUT15 "Tras 5 horas"
IDS_TIMEOUT16 "Nunca"
- IDS_DEL_SCHEME "¿Está seguro de que desea eliminar la combinación de
energía?"
+ IDS_DEL_SCHEME "¿Está seguro de que desea eliminar la combinación de energía:
""%s""?"
IDS_DEL_SCHEME_TITLE "Eliminar combinación"
END
diff --git a/dll/cpl/powercfg/lang/fr-FR.rc b/dll/cpl/powercfg/lang/fr-FR.rc
index cd4cee33ff..cd2b5be88f 100644
--- a/dll/cpl/powercfg/lang/fr-FR.rc
+++ b/dll/cpl/powercfg/lang/fr-FR.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "Après 4 heures"
IDS_TIMEOUT15 "Après 5 heures"
IDS_TIMEOUT16 "Jamais"
- IDS_DEL_SCHEME "Êtes-vous sûr de vouloir supprimer le profil d'alimentation
?"
+ IDS_DEL_SCHEME "Êtes-vous sûr de vouloir supprimer le profil d'alimentation:
""%s"" ?"
IDS_DEL_SCHEME_TITLE "Supprimer le profil"
END
diff --git a/dll/cpl/powercfg/lang/he-IL.rc b/dll/cpl/powercfg/lang/he-IL.rc
index bc19075558..6fbce224fb 100644
--- a/dll/cpl/powercfg/lang/he-IL.rc
+++ b/dll/cpl/powercfg/lang/he-IL.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "אחרי 4 שעות"
IDS_TIMEOUT15 "אחרי 5 דקות"
IDS_TIMEOUT16 "אף פעם"
- IDS_DEL_SCHEME "Are you sure you want to delete the power scheme?"
+ IDS_DEL_SCHEME "Are you sure you want to delete the power scheme:
""%s""?"
IDS_DEL_SCHEME_TITLE "מחק ערכה"
END
diff --git a/dll/cpl/powercfg/lang/id-ID.rc b/dll/cpl/powercfg/lang/id-ID.rc
index 9d3a6008e4..f5f1718d1a 100644
--- a/dll/cpl/powercfg/lang/id-ID.rc
+++ b/dll/cpl/powercfg/lang/id-ID.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "Setelah 4 jam"
IDS_TIMEOUT15 "Setelah 5 jam"
IDS_TIMEOUT16 "Tidak pernah"
- IDS_DEL_SCHEME "Are you sure you want to delete the power scheme?"
+ IDS_DEL_SCHEME "Are you sure you want to delete the power scheme:
""%s""?"
IDS_DEL_SCHEME_TITLE "Delete Scheme"
END
diff --git a/dll/cpl/powercfg/lang/it-IT.rc b/dll/cpl/powercfg/lang/it-IT.rc
index c83c60afb7..be2159ea7f 100644
--- a/dll/cpl/powercfg/lang/it-IT.rc
+++ b/dll/cpl/powercfg/lang/it-IT.rc
@@ -136,6 +136,6 @@ BEGIN
IDS_TIMEOUT14 "Dopo 4 ore"
IDS_TIMEOUT15 "Dopo 5 ore"
IDS_TIMEOUT16 "Mai"
- IDS_DEL_SCHEME "Siete sicuro di voler cancellare lo schema?"
+ IDS_DEL_SCHEME "Siete sicuro di voler cancellare lo schema:
""%s""?"
IDS_DEL_SCHEME_TITLE "Cancellazione schema"
END
diff --git a/dll/cpl/powercfg/lang/ja-JP.rc b/dll/cpl/powercfg/lang/ja-JP.rc
index f866df9a20..51fd7a89ac 100644
--- a/dll/cpl/powercfg/lang/ja-JP.rc
+++ b/dll/cpl/powercfg/lang/ja-JP.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "4 時間後"
IDS_TIMEOUT15 "5 時間後"
IDS_TIMEOUT16 "なし"
- IDS_DEL_SCHEME "この電源設定を削除しますか?"
+ IDS_DEL_SCHEME "この電源設定を削除しますか: ""%s""?"
IDS_DEL_SCHEME_TITLE "電源設定の削除"
END
diff --git a/dll/cpl/powercfg/lang/nl-NL.rc b/dll/cpl/powercfg/lang/nl-NL.rc
index 474b01ca92..7795ae4ac6 100644
--- a/dll/cpl/powercfg/lang/nl-NL.rc
+++ b/dll/cpl/powercfg/lang/nl-NL.rc
@@ -136,6 +136,6 @@ BEGIN
IDS_TIMEOUT14 "Na 4 uur"
IDS_TIMEOUT15 "Na 5 uur"
IDS_TIMEOUT16 "Nooit"
- IDS_DEL_SCHEME "Are you sure you want to delete the power scheme?"
+ IDS_DEL_SCHEME "Are you sure you want to delete the power scheme:
""%s""?"
IDS_DEL_SCHEME_TITLE "Delete Scheme"
END
diff --git a/dll/cpl/powercfg/lang/no-NO.rc b/dll/cpl/powercfg/lang/no-NO.rc
index f1bcc58a49..e2b03d65b4 100644
--- a/dll/cpl/powercfg/lang/no-NO.rc
+++ b/dll/cpl/powercfg/lang/no-NO.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "Etter 4 timer"
IDS_TIMEOUT15 "Etter 5 timer"
IDS_TIMEOUT16 "Aldri"
- IDS_DEL_SCHEME "Er du sikker på at du vil slette strømplanen?"
+ IDS_DEL_SCHEME "Er du sikker på at du vil slette strømplanen:
""%s""?"
IDS_DEL_SCHEME_TITLE "Slett planen"
END
diff --git a/dll/cpl/powercfg/lang/pl-PL.rc b/dll/cpl/powercfg/lang/pl-PL.rc
index 7d62650f5b..99f7fa8be3 100644
--- a/dll/cpl/powercfg/lang/pl-PL.rc
+++ b/dll/cpl/powercfg/lang/pl-PL.rc
@@ -144,6 +144,6 @@ BEGIN
IDS_TIMEOUT14 "Po 4 godzinach"
IDS_TIMEOUT15 "Po 5 godzinach"
IDS_TIMEOUT16 "Nigdy"
- IDS_DEL_SCHEME "Czy na pewno chcesz skasować schemat oszczędzania
energii?"
+ IDS_DEL_SCHEME "Czy na pewno chcesz skasować schemat oszczędzania energii:
""%s""?"
IDS_DEL_SCHEME_TITLE "Skasuj schemat"
END
diff --git a/dll/cpl/powercfg/lang/ro-RO.rc b/dll/cpl/powercfg/lang/ro-RO.rc
index 96ddcc1b80..91d767fe02 100644
--- a/dll/cpl/powercfg/lang/ro-RO.rc
+++ b/dll/cpl/powercfg/lang/ro-RO.rc
@@ -141,6 +141,6 @@ BEGIN
IDS_TIMEOUT14 "după 4 ore"
IDS_TIMEOUT15 "după 5 ore"
IDS_TIMEOUT16 "dezactivată"
- IDS_DEL_SCHEME "Sigur doriți eliminarea aceastui regim de consum
energetic?"
+ IDS_DEL_SCHEME "Sigur doriți eliminarea aceastui regim de consum energetic:
""%s""?"
IDS_DEL_SCHEME_TITLE "Eliminarea regumului de consum"
END
diff --git a/dll/cpl/powercfg/lang/ru-RU.rc b/dll/cpl/powercfg/lang/ru-RU.rc
index 135dbab350..2f33e3156b 100644
--- a/dll/cpl/powercfg/lang/ru-RU.rc
+++ b/dll/cpl/powercfg/lang/ru-RU.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "через 4 часа"
IDS_TIMEOUT15 "через 5 часов"
IDS_TIMEOUT16 "никогда"
- IDS_DEL_SCHEME "Вы уверены, что хотите удалить схему питания?"
+ IDS_DEL_SCHEME "Вы уверены, что хотите удалить схему питания:
""%s""?"
IDS_DEL_SCHEME_TITLE "Удалить Схему"
END
diff --git a/dll/cpl/powercfg/lang/sk-SK.rc b/dll/cpl/powercfg/lang/sk-SK.rc
index 181f8c6115..1fad264770 100644
--- a/dll/cpl/powercfg/lang/sk-SK.rc
+++ b/dll/cpl/powercfg/lang/sk-SK.rc
@@ -144,6 +144,6 @@ BEGIN
IDS_TIMEOUT14 "Po 4 hodinách"
IDS_TIMEOUT15 "Po 5 hodinách"
IDS_TIMEOUT16 "Nikdy"
- IDS_DEL_SCHEME "Ste si istý, že chcete vymazať schému napájania?"
+ IDS_DEL_SCHEME "Ste si istý, že chcete vymazať schému napájania:
""%s""?"
IDS_DEL_SCHEME_TITLE "Vymazať schému"
END
diff --git a/dll/cpl/powercfg/lang/sq-AL.rc b/dll/cpl/powercfg/lang/sq-AL.rc
index 1c789f0e77..19cd847868 100644
--- a/dll/cpl/powercfg/lang/sq-AL.rc
+++ b/dll/cpl/powercfg/lang/sq-AL.rc
@@ -141,6 +141,6 @@ BEGIN
IDS_TIMEOUT14 "Pas 4 hours"
IDS_TIMEOUT15 "Pas 5 hours"
IDS_TIMEOUT16 "Kurrë"
- IDS_DEL_SCHEME "Jeni te sigurte qe doni te fshini skemën energjise?"
+ IDS_DEL_SCHEME "Jeni te sigurte qe doni te fshini skemën energjise:
""%s""?"
IDS_DEL_SCHEME_TITLE "Fshij Skemen"
END
diff --git a/dll/cpl/powercfg/lang/th-TH.rc b/dll/cpl/powercfg/lang/th-TH.rc
index f86dc26a45..7bed2d3467 100644
--- a/dll/cpl/powercfg/lang/th-TH.rc
+++ b/dll/cpl/powercfg/lang/th-TH.rc
@@ -136,6 +136,6 @@ BEGIN
IDS_TIMEOUT14 "หลังจาก 4 ชั่วโมง"
IDS_TIMEOUT15 "หลังจาก 5 ชั่วโมง"
IDS_TIMEOUT16 "ไม่ตั้งค่า"
- IDS_DEL_SCHEME "Are you sure you want to delete the power scheme?"
+ IDS_DEL_SCHEME "Are you sure you want to delete the power scheme:
""%s""?"
IDS_DEL_SCHEME_TITLE "Delete Scheme"
END
diff --git a/dll/cpl/powercfg/lang/tr-TR.rc b/dll/cpl/powercfg/lang/tr-TR.rc
index a83ffb64f9..bd6c81844f 100644
--- a/dll/cpl/powercfg/lang/tr-TR.rc
+++ b/dll/cpl/powercfg/lang/tr-TR.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "4 Saat Sonra"
IDS_TIMEOUT15 "5 Saat Sonra"
IDS_TIMEOUT16 "Hiçbir Zaman"
- IDS_DEL_SCHEME "Güç düzenini silmek istediğinizden emin misiniz?"
+ IDS_DEL_SCHEME "Güç düzenini silmek istediğinizden emin misiniz:
""%s""?"
IDS_DEL_SCHEME_TITLE "Düzeni Sil"
END
diff --git a/dll/cpl/powercfg/lang/uk-UA.rc b/dll/cpl/powercfg/lang/uk-UA.rc
index ce9465ec4f..488c42f468 100644
--- a/dll/cpl/powercfg/lang/uk-UA.rc
+++ b/dll/cpl/powercfg/lang/uk-UA.rc
@@ -144,6 +144,6 @@ BEGIN
IDS_TIMEOUT14 "через 4 години"
IDS_TIMEOUT15 "через 5 годин"
IDS_TIMEOUT16 "ніколи"
- IDS_DEL_SCHEME "Ви дійсно бажаєте видалити схему керування
електроживленням?"
+ IDS_DEL_SCHEME "Ви дійсно бажаєте видалити схему керування електроживленням:
""%s""?"
IDS_DEL_SCHEME_TITLE "Видалення схеми"
END
diff --git a/dll/cpl/powercfg/lang/zh-CN.rc b/dll/cpl/powercfg/lang/zh-CN.rc
index f185feb1af..43155283b9 100644
--- a/dll/cpl/powercfg/lang/zh-CN.rc
+++ b/dll/cpl/powercfg/lang/zh-CN.rc
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "4 小时之后"
IDS_TIMEOUT15 "5 小时之后"
IDS_TIMEOUT16 "从不"
- IDS_DEL_SCHEME "您确定要删除电源使用方案吗?"
+ IDS_DEL_SCHEME "您确定要删除电源使用方案吗: ""%s""?"
IDS_DEL_SCHEME_TITLE "删除方案"
END
diff --git a/dll/cpl/powercfg/lang/zh-TW.rc b/dll/cpl/powercfg/lang/zh-TW.rc
index d09d1bba83..cf8c9e2e2c 100644
--- a/dll/cpl/powercfg/lang/zh-TW.rc
+++ b/dll/cpl/powercfg/lang/zh-TW.rc
@@ -110,8 +110,8 @@ BEGIN
IDS_PERCENT "%i%%"
IDS_SOUND "聲音"
IDS_TEXT "文本"
- IDS_CONFIG1 "爲 %i 設置電源使用方案"
- IDS_CONFIG2 "%i 的高級設置"
+ IDS_CONFIG1 "爲 %s 設置電源使用方案"
+ IDS_CONFIG2 "%s 的高級設置"
IDS_NOACTION "無操作"
IDS_PowerActionNone1 "無動作"
IDS_PowerActionUnknown "未知"
@@ -138,6 +138,6 @@ BEGIN
IDS_TIMEOUT14 "4 小時之後"
IDS_TIMEOUT15 "5 小時之後"
IDS_TIMEOUT16 "從不"
- IDS_DEL_SCHEME "您確定要刪除電源使用方案嗎?"
+ IDS_DEL_SCHEME "您確定要刪除電源使用方案嗎: ""%s""?"
IDS_DEL_SCHEME_TITLE "刪除方案"
END
diff --git a/dll/cpl/powercfg/powercfg.h b/dll/cpl/powercfg/powercfg.h
index 29011c67af..0e7317030c 100644
--- a/dll/cpl/powercfg/powercfg.h
+++ b/dll/cpl/powercfg/powercfg.h
@@ -17,6 +17,7 @@
#include <shlwapi.h>
#include <powrprof.h>
#include <ndk/rtlfuncs.h>
+#include <strsafe.h>
#include "resource.h"
diff --git a/dll/cpl/powercfg/powershemes.c b/dll/cpl/powercfg/powershemes.c
index fa5fbd73ac..4fff28a279 100644
--- a/dll/cpl/powercfg/powershemes.c
+++ b/dll/cpl/powercfg/powershemes.c
@@ -560,9 +560,10 @@ Pos_SaveData(HWND hwndDlg)
static BOOL
DelScheme(HWND hwnd)
{
+ WCHAR szTitleBuffer[256];
+ WCHAR szRawBuffer[256], szCookedBuffer[512];
INT iCurSel;
HWND hList;
- TCHAR szBuf[1024], szBufT[1024];
PPOWER_SCHEME pScheme;
hList = GetDlgItem(hwnd, IDC_ENERGYLIST);
@@ -577,10 +578,11 @@ DelScheme(HWND hwnd)
if (pScheme == (PPOWER_SCHEME)CB_ERR)
return FALSE;
- LoadString(hApplet, IDS_DEL_SCHEME_TITLE, szBufT, sizeof(szBufT) / sizeof(TCHAR));
- LoadString(hApplet, IDS_DEL_SCHEME, szBuf, sizeof(szBuf) / sizeof(TCHAR));
+ LoadStringW(hApplet, IDS_DEL_SCHEME_TITLE, szTitleBuffer, ARRAYSIZE(szTitleBuffer));
+ LoadStringW(hApplet, IDS_DEL_SCHEME, szRawBuffer, ARRAYSIZE(szRawBuffer));
+ StringCchPrintfW(szCookedBuffer, ARRAYSIZE(szCookedBuffer), szRawBuffer,
pScheme->pszName);
- if (MessageBox(hwnd, szBuf, szBufT, MB_YESNO | MB_ICONQUESTION) == IDYES)
+ if (MessageBoxW(hwnd, szCookedBuffer, szTitleBuffer, MB_YESNO | MB_ICONQUESTION |
MB_DEFBUTTON2) == IDYES)
{
UINT Current;