[DEVMGR] Fix wonky action menu

Patch by Pi_User5.

CORE-10364
This commit is contained in:
Eric Kohl 2019-08-03 14:53:00 +02:00
parent 23faa89d09
commit d1a2983c00
26 changed files with 131 additions and 25 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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