https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d1a2983c00cb5d75e2100…
commit d1a2983c00cb5d75e21001788f27dfe1fc4c3aa9
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Aug 3 14:53:00 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Aug 3 14:54:18 2019 +0200
[DEVMGR] Fix wonky action menu
Patch by Pi_User5.
CORE-10364
---
dll/win32/devmgr/devmgmt/MainWindow.cpp | 6 ++++++
dll/win32/devmgr/lang/bg-BG.rc | 6 +++++-
dll/win32/devmgr/lang/cs-CZ.rc | 6 +++++-
dll/win32/devmgr/lang/de-DE.rc | 6 +++++-
dll/win32/devmgr/lang/el-GR.rc | 6 +++++-
dll/win32/devmgr/lang/en-US.rc | 6 +++++-
dll/win32/devmgr/lang/es-ES.rc | 6 +++++-
dll/win32/devmgr/lang/et-EE.rc | 6 +++++-
dll/win32/devmgr/lang/fr-FR.rc | 6 +++++-
dll/win32/devmgr/lang/he-IL.rc | 6 +++++-
dll/win32/devmgr/lang/hu-HU.rc | 6 +++++-
dll/win32/devmgr/lang/id-ID.rc | 6 +++++-
dll/win32/devmgr/lang/it-IT.rc | 6 +++++-
dll/win32/devmgr/lang/ja-JP.rc | 6 +++++-
dll/win32/devmgr/lang/no-NO.rc | 6 +++++-
dll/win32/devmgr/lang/pl-PL.rc | 6 +++++-
dll/win32/devmgr/lang/pt-BR.rc | 6 +++++-
dll/win32/devmgr/lang/pt-PT.rc | 6 +++++-
dll/win32/devmgr/lang/ro-RO.rc | 6 +++++-
dll/win32/devmgr/lang/ru-RU.rc | 6 +++++-
dll/win32/devmgr/lang/sk-SK.rc | 6 +++++-
dll/win32/devmgr/lang/sq-AL.rc | 6 +++++-
dll/win32/devmgr/lang/tr-TR.rc | 6 +++++-
dll/win32/devmgr/lang/uk-UA.rc | 6 +++++-
dll/win32/devmgr/lang/zh-CN.rc | 6 +++++-
dll/win32/devmgr/lang/zh-TW.rc | 6 +++++-
26 files changed, 131 insertions(+), 25 deletions(-)
diff --git a/dll/win32/devmgr/devmgmt/MainWindow.cpp
b/dll/win32/devmgr/devmgmt/MainWindow.cpp
index b69778b6411..5b3c6eb669a 100644
--- a/dll/win32/devmgr/devmgmt/MainWindow.cpp
+++ b/dll/win32/devmgr/devmgmt/MainWindow.cpp
@@ -505,6 +505,12 @@ CDeviceManager::OnNotify(_In_ LPARAM lParam)
{
case TVN_SELCHANGED:
{
+ HMENU hMenu = GetSubMenu(m_hMenu, 1);
+ for (INT i = GetMenuItemCount(hMenu) - 1; i >= 0; i--)
+ {
+ DeleteMenu(hMenu, i, MF_BYPOSITION);
+ }
+ m_DeviceView->CreateActionMenu(hMenu, true);
UpdateToolbar();
break;
}
diff --git a/dll/win32/devmgr/lang/bg-BG.rc b/dll/win32/devmgr/lang/bg-BG.rc
index 7cfd3b10065..6b66f97d559 100644
--- a/dll/win32/devmgr/lang/bg-BG.rc
+++ b/dll/win32/devmgr/lang/bg-BG.rc
@@ -253,7 +253,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/cs-CZ.rc b/dll/win32/devmgr/lang/cs-CZ.rc
index cef5ec783ac..97fdb17e8b5 100644
--- a/dll/win32/devmgr/lang/cs-CZ.rc
+++ b/dll/win32/devmgr/lang/cs-CZ.rc
@@ -257,7 +257,11 @@ BEGIN
BEGIN
MENUITEM "U&končit", IDC_EXIT
END
- MENUITEM "Akce", IDC_ACTIONMENU
+ POPUP "Akce"
+ BEGIN
+ MENUITEM "Vyhledat změny hardwaru", IDC_SCAN_HARDWARE
+ MENUITEM "Přidat hardware", IDC_ADD_HARDWARE
+ END
POPUP "Zobrazit"
BEGIN
MENUITEM "Zařízení podle typu", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/de-DE.rc b/dll/win32/devmgr/lang/de-DE.rc
index 926fe545c6e..97790767f31 100644
--- a/dll/win32/devmgr/lang/de-DE.rc
+++ b/dll/win32/devmgr/lang/de-DE.rc
@@ -254,7 +254,11 @@ BEGIN
BEGIN
MENUITEM "&Beenden", IDC_EXIT
END
- MENUITEM "Ak&tion", IDC_ACTIONMENU
+ POPUP "Ak&tion"
+ BEGIN
+ MENUITEM "Nach geänderter Hardware suchen", IDC_SCAN_HARDWARE
+ MENUITEM "Hardware hinzufügen", IDC_ADD_HARDWARE
+ END
POPUP "&Ansicht"
BEGIN
MENUITEM "Geräte nach &Typ", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/el-GR.rc b/dll/win32/devmgr/lang/el-GR.rc
index 8cd7a35283c..9b33fdf7e1d 100644
--- a/dll/win32/devmgr/lang/el-GR.rc
+++ b/dll/win32/devmgr/lang/el-GR.rc
@@ -254,7 +254,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/en-US.rc b/dll/win32/devmgr/lang/en-US.rc
index 4acc22822d5..cbc49c1028f 100644
--- a/dll/win32/devmgr/lang/en-US.rc
+++ b/dll/win32/devmgr/lang/en-US.rc
@@ -251,7 +251,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "&Action", IDC_ACTIONMENU
+ POPUP "&Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "&View"
BEGIN
MENUITEM "D&evices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/es-ES.rc b/dll/win32/devmgr/lang/es-ES.rc
index ead90e98c8f..578401b75db 100644
--- a/dll/win32/devmgr/lang/es-ES.rc
+++ b/dll/win32/devmgr/lang/es-ES.rc
@@ -261,7 +261,11 @@ BEGIN
BEGIN
MENUITEM "&Salir", IDC_EXIT
END
- MENUITEM "Acción", IDC_ACTIONMENU
+ POPUP "Acción"
+ BEGIN
+ MENUITEM "Buscar cambios de hardware", IDC_SCAN_HARDWARE
+ MENUITEM "Añadir dispositivos", IDC_ADD_HARDWARE
+ END
POPUP "Ver"
BEGIN
MENUITEM "Dispositivos por tipo", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/et-EE.rc b/dll/win32/devmgr/lang/et-EE.rc
index 6584991152e..081b8d11da5 100644
--- a/dll/win32/devmgr/lang/et-EE.rc
+++ b/dll/win32/devmgr/lang/et-EE.rc
@@ -258,7 +258,11 @@ BEGIN
BEGIN
MENUITEM "&Välju", IDC_EXIT
END
- MENUITEM "&Toiming", IDC_ACTIONMENU
+ POPUP "&Toiming"
+ BEGIN
+ MENUITEM "Otsi riistvaramuudatusi", IDC_SCAN_HARDWARE
+ MENUITEM "Lisa riistvara", IDC_ADD_HARDWARE
+ END
POPUP "&Vaade"
BEGIN
MENUITEM "Seadmed &tüübi järgi", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/fr-FR.rc b/dll/win32/devmgr/lang/fr-FR.rc
index 226d1290c79..b4c8658e7d5 100644
--- a/dll/win32/devmgr/lang/fr-FR.rc
+++ b/dll/win32/devmgr/lang/fr-FR.rc
@@ -253,7 +253,11 @@ BEGIN
BEGIN
MENUITEM "&Quitter", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Vérifier les changements de matériel", IDC_SCAN_HARDWARE
+ MENUITEM "Ajouter un matériel", IDC_ADD_HARDWARE
+ END
POPUP "Vue"
BEGIN
MENUITEM "Périphériques par type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/he-IL.rc b/dll/win32/devmgr/lang/he-IL.rc
index e7a805fff5c..9a8ce7a7560 100644
--- a/dll/win32/devmgr/lang/he-IL.rc
+++ b/dll/win32/devmgr/lang/he-IL.rc
@@ -254,7 +254,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/hu-HU.rc b/dll/win32/devmgr/lang/hu-HU.rc
index 74416ea02de..7bb8acf0a6e 100644
--- a/dll/win32/devmgr/lang/hu-HU.rc
+++ b/dll/win32/devmgr/lang/hu-HU.rc
@@ -253,7 +253,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/id-ID.rc b/dll/win32/devmgr/lang/id-ID.rc
index 3af500e05c0..5492df9a755 100644
--- a/dll/win32/devmgr/lang/id-ID.rc
+++ b/dll/win32/devmgr/lang/id-ID.rc
@@ -254,7 +254,11 @@ BEGIN
BEGIN
MENUITEM "K&eluar", IDC_EXIT
END
- MENUITEM "Ak&si", IDC_ACTIONMENU
+ POPUP "Ak&si"
+ BEGIN
+ MENUITEM "Pindai perubahan perangkat keras", IDC_SCAN_HARDWARE
+ MENUITEM "Tambah perangkat keras", IDC_ADD_HARDWARE
+ END
POPUP "Ta&mpilan"
BEGIN
MENUITEM "Jenis perangkat", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/it-IT.rc b/dll/win32/devmgr/lang/it-IT.rc
index e722a0a910a..3c920c200f5 100644
--- a/dll/win32/devmgr/lang/it-IT.rc
+++ b/dll/win32/devmgr/lang/it-IT.rc
@@ -255,7 +255,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/ja-JP.rc b/dll/win32/devmgr/lang/ja-JP.rc
index ee286dcda27..f066fa93fb0 100644
--- a/dll/win32/devmgr/lang/ja-JP.rc
+++ b/dll/win32/devmgr/lang/ja-JP.rc
@@ -251,7 +251,11 @@ BEGIN
BEGIN
MENUITEM "終了(&X)", IDC_EXIT
END
- MENUITEM "アクション(&A)", IDC_ACTIONMENU
+ POPUP "アクション(&A)"
+ BEGIN
+ MENUITEM "ハードウェアの変更をスキャン", IDC_SCAN_HARDWARE
+ MENUITEM "ハードウェアを追加", IDC_ADD_HARDWARE
+ END
POPUP "表示(&V)"
BEGIN
MENUITEM "種類別デバイス(&E)", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/no-NO.rc b/dll/win32/devmgr/lang/no-NO.rc
index 244fccbe4f3..6025a692817 100644
--- a/dll/win32/devmgr/lang/no-NO.rc
+++ b/dll/win32/devmgr/lang/no-NO.rc
@@ -255,7 +255,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/pl-PL.rc b/dll/win32/devmgr/lang/pl-PL.rc
index 1338ba0a4a0..3715b6e9b90 100644
--- a/dll/win32/devmgr/lang/pl-PL.rc
+++ b/dll/win32/devmgr/lang/pl-PL.rc
@@ -263,7 +263,11 @@ BEGIN
BEGIN
MENUITEM "Z&akończ", IDC_EXIT
END
- MENUITEM "Akcja", IDC_ACTIONMENU
+ POPUP "Akcja"
+ BEGIN
+ MENUITEM "Skanuj w poszukiwaniu zmian sprzętu", IDC_SCAN_HARDWARE
+ MENUITEM "Dodaj urządzenie", IDC_ADD_HARDWARE
+ END
POPUP "Widok"
BEGIN
MENUITEM "Urządzenia według typów", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/pt-BR.rc b/dll/win32/devmgr/lang/pt-BR.rc
index 3b869db3cb4..7b2b100eae0 100644
--- a/dll/win32/devmgr/lang/pt-BR.rc
+++ b/dll/win32/devmgr/lang/pt-BR.rc
@@ -255,7 +255,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/pt-PT.rc b/dll/win32/devmgr/lang/pt-PT.rc
index f7e5b4ef59f..70930cbc69f 100644
--- a/dll/win32/devmgr/lang/pt-PT.rc
+++ b/dll/win32/devmgr/lang/pt-PT.rc
@@ -255,7 +255,11 @@ BEGIN
BEGIN
MENUITEM "&Sair", IDC_EXIT
END
- MENUITEM "Acção", IDC_ACTIONMENU
+ POPUP "Acção"
+ BEGIN
+ MENUITEM "Verificar alterações de hardware", IDC_SCAN_HARDWARE
+ MENUITEM "Adicionar hardware", IDC_ADD_HARDWARE
+ END
POPUP "Vista"
BEGIN
MENUITEM "Dispositivos por tipo", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/ro-RO.rc b/dll/win32/devmgr/lang/ro-RO.rc
index 6c2ab0b9caf..2f2bcc171e3 100644
--- a/dll/win32/devmgr/lang/ro-RO.rc
+++ b/dll/win32/devmgr/lang/ro-RO.rc
@@ -258,7 +258,11 @@ BEGIN
BEGIN
MENUITEM "I&eșire", IDC_EXIT
END
- MENUITEM "A&cțiune", IDC_ACTIONMENU
+ POPUP "A&cțiune"
+ BEGIN
+ MENUITEM "Scanează configurația fizică", IDC_SCAN_HARDWARE
+ MENUITEM "Adăugare dispozitiv…", IDC_ADD_HARDWARE
+ END
POPUP "&Afișare"
BEGIN
MENUITEM "Dispozitive după tip", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/ru-RU.rc b/dll/win32/devmgr/lang/ru-RU.rc
index 7996cf44b9b..472e38315f4 100644
--- a/dll/win32/devmgr/lang/ru-RU.rc
+++ b/dll/win32/devmgr/lang/ru-RU.rc
@@ -254,7 +254,11 @@ BEGIN
BEGIN
MENUITEM "В&ыход", IDC_EXIT
END
- MENUITEM "&Действие", IDC_ACTIONMENU
+ POPUP "&Действие"
+ BEGIN
+ MENUITEM "О&бновить конфигурацию оборудования", IDC_SCAN_HARDWARE
+ MENUITEM "&Добавить устройство", IDC_ADD_HARDWARE
+ END
POPUP "&Вид"
BEGIN
MENUITEM "&Устройства по типу", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/sk-SK.rc b/dll/win32/devmgr/lang/sk-SK.rc
index 3cb51f24d3d..864c5afd114 100644
--- a/dll/win32/devmgr/lang/sk-SK.rc
+++ b/dll/win32/devmgr/lang/sk-SK.rc
@@ -257,7 +257,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/sq-AL.rc b/dll/win32/devmgr/lang/sq-AL.rc
index a97e335b7be..d375bd16227 100644
--- a/dll/win32/devmgr/lang/sq-AL.rc
+++ b/dll/win32/devmgr/lang/sq-AL.rc
@@ -256,7 +256,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/tr-TR.rc b/dll/win32/devmgr/lang/tr-TR.rc
index 26faf2e8d11..ffc84e9d968 100644
--- a/dll/win32/devmgr/lang/tr-TR.rc
+++ b/dll/win32/devmgr/lang/tr-TR.rc
@@ -254,7 +254,11 @@ BEGIN
BEGIN
MENUITEM "&Çıkış", IDC_EXIT
END
- MENUITEM "&Eylem", IDC_ACTIONMENU
+ POPUP "&Eylem"
+ BEGIN
+ MENUITEM "Donanım Değişiklikleri İçin Tara", IDC_SCAN_HARDWARE
+ MENUITEM "Donanım Ekle", IDC_ADD_HARDWARE
+ END
POPUP "&Görünüm"
BEGIN
MENUITEM "&Türe Göre Aygıtlar", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/uk-UA.rc b/dll/win32/devmgr/lang/uk-UA.rc
index 300d3ad860c..95eb8cb47d7 100644
--- a/dll/win32/devmgr/lang/uk-UA.rc
+++ b/dll/win32/devmgr/lang/uk-UA.rc
@@ -260,7 +260,11 @@ BEGIN
BEGIN
MENUITEM "E&xit", IDC_EXIT
END
- MENUITEM "Action", IDC_ACTIONMENU
+ POPUP "Action"
+ BEGIN
+ MENUITEM "Scan for hardware changes", IDC_SCAN_HARDWARE
+ MENUITEM "Add hardware", IDC_ADD_HARDWARE
+ END
POPUP "View"
BEGIN
MENUITEM "Devices by type", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/zh-CN.rc b/dll/win32/devmgr/lang/zh-CN.rc
index 565ba63fe78..63d48cd2362 100644
--- a/dll/win32/devmgr/lang/zh-CN.rc
+++ b/dll/win32/devmgr/lang/zh-CN.rc
@@ -253,7 +253,11 @@ BEGIN
BEGIN
MENUITEM "关闭(&X)", IDC_EXIT
END
- MENUITEM "操作", IDC_ACTIONMENU
+ POPUP "行动"
+ BEGIN
+ MENUITEM "扫描检测硬件改动", IDC_SCAN_HARDWARE
+ MENUITEM "添加硬件", IDC_ADD_HARDWARE
+ END
POPUP "视图"
BEGIN
MENUITEM "按类型设备", IDC_DEVBYTYPE
diff --git a/dll/win32/devmgr/lang/zh-TW.rc b/dll/win32/devmgr/lang/zh-TW.rc
index f131af426f1..08d7e64867a 100644
--- a/dll/win32/devmgr/lang/zh-TW.rc
+++ b/dll/win32/devmgr/lang/zh-TW.rc
@@ -253,7 +253,11 @@ BEGIN
BEGIN
MENUITEM "關閉(&X)", IDC_EXIT
END
- MENUITEM "行動", IDC_ACTIONMENU
+ POPUP "行動"
+ BEGIN
+ MENUITEM "掃描檢測硬體改動", IDC_SCAN_HARDWARE
+ MENUITEM "添加硬體", IDC_ADD_HARDWARE
+ END
POPUP "檢視"
BEGIN
MENUITEM "按類型裝置", IDC_DEVBYTYPE