https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b280615b85d25bc31a03a…
commit b280615b85d25bc31a03ab975fcafdf2da8075ba
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sat Apr 18 08:52:24 2020 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sat Apr 18 08:53:17 2020 +0200
[REGEDIT] Add a special popup menu for the tree view root item
CORE-16888
---
base/applications/regedit/childwnd.c | 70 ++++++++++++++++++---------------
base/applications/regedit/lang/bg-BG.rc | 8 ++++
base/applications/regedit/lang/cs-CZ.rc | 8 ++++
base/applications/regedit/lang/de-DE.rc | 8 ++++
base/applications/regedit/lang/el-GR.rc | 8 ++++
base/applications/regedit/lang/en-US.rc | 8 ++++
base/applications/regedit/lang/es-ES.rc | 8 ++++
base/applications/regedit/lang/fr-FR.rc | 8 ++++
base/applications/regedit/lang/he-IL.rc | 8 ++++
base/applications/regedit/lang/hu-HU.rc | 8 ++++
base/applications/regedit/lang/id-ID.rc | 8 ++++
base/applications/regedit/lang/it-IT.rc | 8 ++++
base/applications/regedit/lang/ja-JP.rc | 8 ++++
base/applications/regedit/lang/ko-KR.rc | 8 ++++
base/applications/regedit/lang/nl-NL.rc | 8 ++++
base/applications/regedit/lang/no-NO.rc | 8 ++++
base/applications/regedit/lang/pl-PL.rc | 8 ++++
base/applications/regedit/lang/pt-BR.rc | 8 ++++
base/applications/regedit/lang/pt-PT.rc | 8 ++++
base/applications/regedit/lang/ro-RO.rc | 8 ++++
base/applications/regedit/lang/ru-RU.rc | 8 ++++
base/applications/regedit/lang/sk-SK.rc | 8 ++++
base/applications/regedit/lang/sl-SI.rc | 8 ++++
base/applications/regedit/lang/sq-AL.rc | 8 ++++
base/applications/regedit/lang/sv-SE.rc | 8 ++++
base/applications/regedit/lang/th-TH.rc | 8 ++++
base/applications/regedit/lang/tr-TR.rc | 8 ++++
base/applications/regedit/lang/uk-UA.rc | 8 ++++
base/applications/regedit/lang/zh-CN.rc | 8 ++++
base/applications/regedit/lang/zh-TW.rc | 8 ++++
base/applications/regedit/main.h | 3 +-
31 files changed, 272 insertions(+), 33 deletions(-)
diff --git a/base/applications/regedit/childwnd.c b/base/applications/regedit/childwnd.c
index d02fb2da14d..f64a1861165 100644
--- a/base/applications/regedit/childwnd.c
+++ b/base/applications/regedit/childwnd.c
@@ -726,6 +726,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lPa
HKEY hRootKey;
int iLastPos;
WORD wID;
+ BOOL isRoot;
pt.x = (short) LOWORD(lParam);
pt.y = (short) HIWORD(lParam);
@@ -755,9 +756,11 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lPa
if (hti.flags & TVHT_ONITEM)
{
- hContextMenu = GetSubMenu(hPopupMenus, PM_TREECONTEXT);
TreeView_SelectItem(g_pChildWnd->hTreeWnd, hti.hItem);
+ isRoot = (TreeView_GetParent(g_pChildWnd->hTreeWnd, hti.hItem) ==
NULL);
+ hContextMenu = GetSubMenu(hPopupMenus, isRoot ? PM_ROOTITEM :
PM_TREECONTEXT);
+
memset(&item, 0, sizeof(item));
item.mask = TVIF_STATE | TVIF_CHILDREN;
item.hItem = hti.hItem;
@@ -773,45 +776,48 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM
wParam, LPARAM lPa
mii.dwTypeData = (LPWSTR) buffer;
SetMenuItemInfo(hContextMenu, 0, TRUE, &mii);
- /* Remove any existing suggestions */
- memset(&mii, 0, sizeof(mii));
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_ID;
- GetMenuItemInfo(hContextMenu, GetMenuItemCount(hContextMenu) - 1, TRUE,
&mii);
- if ((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <=
ID_TREE_SUGGESTION_MAX))
+ if (isRoot == FALSE)
{
- do
+ /* Remove any existing suggestions */
+ memset(&mii, 0, sizeof(mii));
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_ID;
+ GetMenuItemInfo(hContextMenu, GetMenuItemCount(hContextMenu) - 1,
TRUE, &mii);
+ if ((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID <=
ID_TREE_SUGGESTION_MAX))
{
- iLastPos = GetMenuItemCount(hContextMenu) - 1;
- GetMenuItemInfo(hContextMenu, iLastPos, TRUE, &mii);
- RemoveMenu(hContextMenu, iLastPos, MF_BYPOSITION);
+ do
+ {
+ iLastPos = GetMenuItemCount(hContextMenu) - 1;
+ GetMenuItemInfo(hContextMenu, iLastPos, TRUE, &mii);
+ RemoveMenu(hContextMenu, iLastPos, MF_BYPOSITION);
+ }
+ while((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID
<= ID_TREE_SUGGESTION_MAX));
}
- while((mii.wID >= ID_TREE_SUGGESTION_MIN) && (mii.wID
<= ID_TREE_SUGGESTION_MAX));
- }
- /* Come up with suggestions */
- keyPath = GetItemPath(g_pChildWnd->hTreeWnd, NULL, &hRootKey);
- SuggestKeys(hRootKey, keyPath, Suggestions, COUNT_OF(Suggestions));
- if (Suggestions[0])
- {
- AppendMenu(hContextMenu, MF_SEPARATOR, 0, NULL);
+ /* Come up with suggestions */
+ keyPath = GetItemPath(g_pChildWnd->hTreeWnd, NULL,
&hRootKey);
+ SuggestKeys(hRootKey, keyPath, Suggestions, COUNT_OF(Suggestions));
+ if (Suggestions[0])
+ {
+ AppendMenu(hContextMenu, MF_SEPARATOR, 0, NULL);
- LoadStringW(hInst, IDS_GOTO_SUGGESTED_KEY, resource,
COUNT_OF(resource));
+ LoadStringW(hInst, IDS_GOTO_SUGGESTED_KEY, resource,
COUNT_OF(resource));
- s = Suggestions;
- wID = ID_TREE_SUGGESTION_MIN;
- while(*s && (wID <= ID_TREE_SUGGESTION_MAX))
- {
- _snwprintf(buffer, COUNT_OF(buffer), resource, s);
+ s = Suggestions;
+ wID = ID_TREE_SUGGESTION_MIN;
+ while(*s && (wID <= ID_TREE_SUGGESTION_MAX))
+ {
+ _snwprintf(buffer, COUNT_OF(buffer), resource, s);
- memset(&mii, 0, sizeof(mii));
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_STRING | MIIM_ID;
- mii.wID = wID++;
- mii.dwTypeData = buffer;
- InsertMenuItem(hContextMenu, GetMenuItemCount(hContextMenu),
TRUE, &mii);
+ memset(&mii, 0, sizeof(mii));
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_STRING | MIIM_ID;
+ mii.wID = wID++;
+ mii.dwTypeData = buffer;
+ InsertMenuItem(hContextMenu, GetMenuItemCount(hContextMenu),
TRUE, &mii);
- s += wcslen(s) + 1;
+ s += wcslen(s) + 1;
+ }
}
}
TrackPopupMenu(hContextMenu, TPM_RIGHTBUTTON, pt.x, pt.y, 0,
g_pChildWnd->hWnd, NULL);
diff --git a/base/applications/regedit/lang/bg-BG.rc
b/base/applications/regedit/lang/bg-BG.rc
index 5b71ef6fcf9..e3852b60779 100644
--- a/base/applications/regedit/lang/bg-BG.rc
+++ b/base/applications/regedit/lang/bg-BG.rc
@@ -139,6 +139,14 @@ BEGIN
MENUITEM "&Запомняне стойността на ключа", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Разгръщане/Свиване", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Износ", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Изоставяне на рой...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "От&рязване", ID_HEXEDIT_CUT
MENUITEM "За&помняне", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/cs-CZ.rc
b/base/applications/regedit/lang/cs-CZ.rc
index fe450829e22..9a015459f81 100644
--- a/base/applications/regedit/lang/cs-CZ.rc
+++ b/base/applications/regedit/lang/cs-CZ.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "Z&kopírovat název klíče", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Rozbalit/Sbalit", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exportovat", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Uvolnit strom registru...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "Vyj&mout", ID_HEXEDIT_CUT
MENUITEM "&Kopírovat", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/de-DE.rc
b/base/applications/regedit/lang/de-DE.rc
index 16ad2cf1fe2..8606290700a 100644
--- a/base/applications/regedit/lang/de-DE.rc
+++ b/base/applications/regedit/lang/de-DE.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "S&chlüsselnamen kopieren", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Erweitern/Schließen", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exportieren", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Zweig entladen...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "&Ausschneiden", ID_HEXEDIT_CUT
MENUITEM "&Kopieren", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/el-GR.rc
b/base/applications/regedit/lang/el-GR.rc
index edd1bfdc2ad..18bcce6baa7 100644
--- a/base/applications/regedit/lang/el-GR.rc
+++ b/base/applications/regedit/lang/el-GR.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Αντιγραφή Ονόματος Κλειδιού", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Εξαγωγή", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Αφαίρεση Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/en-US.rc
b/base/applications/regedit/lang/en-US.rc
index 3d0d6d4b564..a372059f51a 100644
--- a/base/applications/regedit/lang/en-US.rc
+++ b/base/applications/regedit/lang/en-US.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Export", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "Cu&t", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/es-ES.rc
b/base/applications/regedit/lang/es-ES.rc
index e4de1db8c18..0584e8bf44c 100644
--- a/base/applications/regedit/lang/es-ES.rc
+++ b/base/applications/regedit/lang/es-ES.rc
@@ -137,6 +137,14 @@ BEGIN
MENUITEM "&Copiar nombre de clave", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expandir/Contraer", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exportar", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Descargar subárbol...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "&Cortar", ID_HEXEDIT_CUT
MENUITEM "Cop&iar", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/fr-FR.rc
b/base/applications/regedit/lang/fr-FR.rc
index 7d3d15bf401..326e8904549 100644
--- a/base/applications/regedit/lang/fr-FR.rc
+++ b/base/applications/regedit/lang/fr-FR.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copier le nom de la clé", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Dérouler/Réduire", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exporter", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Décharger la ruche...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ouper", ID_HEXEDIT_CUT
MENUITEM "&Copier", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/he-IL.rc
b/base/applications/regedit/lang/he-IL.rc
index e39ff8c3c67..28370594819 100644
--- a/base/applications/regedit/lang/he-IL.rc
+++ b/base/applications/regedit/lang/he-IL.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "העתק שם מפתח", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "הרחב/קפל", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "יצא", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "ביטול טעינת כוורת (Hive)...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "גזור", ID_HEXEDIT_CUT
MENUITEM "העתק", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/hu-HU.rc
b/base/applications/regedit/lang/hu-HU.rc
index ba2cfd181cd..d4dea8b263d 100644
--- a/base/applications/regedit/lang/hu-HU.rc
+++ b/base/applications/regedit/lang/hu-HU.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Export", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/id-ID.rc
b/base/applications/regedit/lang/id-ID.rc
index 4bf6af06143..94e394ffbb8 100644
--- a/base/applications/regedit/lang/id-ID.rc
+++ b/base/applications/regedit/lang/id-ID.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Salin Nama Kunci", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Perluas/Perempit", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Ekspor", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Buang Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "&Gunting", ID_HEXEDIT_CUT
MENUITEM "&Salin", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/it-IT.rc
b/base/applications/regedit/lang/it-IT.rc
index 95c21cec8f0..0194a148bc2 100644
--- a/base/applications/regedit/lang/it-IT.rc
+++ b/base/applications/regedit/lang/it-IT.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copia il nome della chiave", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Espandi/Raccogli", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Esporta", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Scarica Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "&Taglia", ID_HEXEDIT_CUT
MENUITEM "&Copia", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/ja-JP.rc
b/base/applications/regedit/lang/ja-JP.rc
index b27b03b06bc..8eefdad5fec 100644
--- a/base/applications/regedit/lang/ja-JP.rc
+++ b/base/applications/regedit/lang/ja-JP.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "キー名のコピー(&C)", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "展開する/閉じる", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "エクスポート(&E)", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "ハイブのアンロード...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "切り取り(&C)", ID_HEXEDIT_CUT
MENUITEM "コピー(&C)", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/ko-KR.rc
b/base/applications/regedit/lang/ko-KR.rc
index 479d2d53260..907e13832fa 100644
--- a/base/applications/regedit/lang/ko-KR.rc
+++ b/base/applications/regedit/lang/ko-KR.rc
@@ -136,6 +136,14 @@ BEGIN
MENUITEM "키 이름 복사(&C)", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "확장/축소", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "내보내기(&E)", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "하이브 언로드...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/nl-NL.rc
b/base/applications/regedit/lang/nl-NL.rc
index 6c20f3989f3..ab5d3533f6b 100644
--- a/base/applications/regedit/lang/nl-NL.rc
+++ b/base/applications/regedit/lang/nl-NL.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Export", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/no-NO.rc
b/base/applications/regedit/lang/no-NO.rc
index e448ff3442c..c05b2e66696 100644
--- a/base/applications/regedit/lang/no-NO.rc
+++ b/base/applications/regedit/lang/no-NO.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Kopier nøkkelnavn", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Utvid/Minimer", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Eksport", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Fjern struktur...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/pl-PL.rc
b/base/applications/regedit/lang/pl-PL.rc
index d2e4d3f1acb..28c6fe7f70b 100644
--- a/base/applications/regedit/lang/pl-PL.rc
+++ b/base/applications/regedit/lang/pl-PL.rc
@@ -144,6 +144,14 @@ BEGIN
MENUITEM "&Kopiuj nazwę klucza", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Rozwiń/Zwiń", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Eksportuj", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Wyładuj Drzewo..", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "W&ytnij", ID_HEXEDIT_CUT
MENUITEM "&Kopiuj", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/pt-BR.rc
b/base/applications/regedit/lang/pt-BR.rc
index cd3c7c942b9..166d481fe14 100644
--- a/base/applications/regedit/lang/pt-BR.rc
+++ b/base/applications/regedit/lang/pt-BR.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copiar nome da chave", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expandir/Reduzir", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exportar", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "&Descarregar Seção...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/pt-PT.rc
b/base/applications/regedit/lang/pt-PT.rc
index 84b402183cd..c6079ee503b 100644
--- a/base/applications/regedit/lang/pt-PT.rc
+++ b/base/applications/regedit/lang/pt-PT.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copiar chave 'Nome'", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expandir/Recolher", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exportar", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ortar", ID_HEXEDIT_CUT
MENUITEM "&Copiar", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/ro-RO.rc
b/base/applications/regedit/lang/ro-RO.rc
index cd4a96c7fd1..33e499a56e7 100644
--- a/base/applications/regedit/lang/ro-RO.rc
+++ b/base/applications/regedit/lang/ro-RO.rc
@@ -136,6 +136,14 @@ BEGIN
MENUITEM "&Copiază numele cheii", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Extin&de/Restrânge", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "E&xportă", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Eli&berare registru…", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "&Decupează", ID_HEXEDIT_CUT
MENUITEM "&Copiază", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/ru-RU.rc
b/base/applications/regedit/lang/ru-RU.rc
index c90b91d6ced..39e44e1558c 100644
--- a/base/applications/regedit/lang/ru-RU.rc
+++ b/base/applications/regedit/lang/ru-RU.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Копировать имя ключа", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Развернуть/Свернуть", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Экспорт", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Выгрузить куст...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "&Вырезать", ID_HEXEDIT_CUT
MENUITEM "&Копировать", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/sk-SK.rc
b/base/applications/regedit/lang/sk-SK.rc
index 8e848e5c415..5ee8d0ec1e8 100644
--- a/base/applications/regedit/lang/sk-SK.rc
+++ b/base/applications/regedit/lang/sk-SK.rc
@@ -139,6 +139,14 @@ BEGIN
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Export", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/sl-SI.rc
b/base/applications/regedit/lang/sl-SI.rc
index 64630661e0f..b0294655a07 100644
--- a/base/applications/regedit/lang/sl-SI.rc
+++ b/base/applications/regedit/lang/sl-SI.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Export", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/sq-AL.rc
b/base/applications/regedit/lang/sq-AL.rc
index 744b686c883..442d19fcadd 100644
--- a/base/applications/regedit/lang/sq-AL.rc
+++ b/base/applications/regedit/lang/sq-AL.rc
@@ -138,6 +138,14 @@ BEGIN
MENUITEM "Kopjo emrin çelesit", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Hap/Zmadho", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exporto", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Shkarko koshere...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "Prej", ID_HEXEDIT_CUT
MENUITEM "Kopjo", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/sv-SE.rc
b/base/applications/regedit/lang/sv-SE.rc
index e7a4e5fdf03..5e3e0cf1b4a 100644
--- a/base/applications/regedit/lang/sv-SE.rc
+++ b/base/applications/regedit/lang/sv-SE.rc
@@ -134,6 +134,14 @@ BEGIN
MENUITEM "&Kopiera nyckelnamn", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Visa/dölj nivå", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Exportera", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Ta bort Registerdata...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "Klipp &ut", ID_HEXEDIT_CUT
MENUITEM "&Kopiera", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/th-TH.rc
b/base/applications/regedit/lang/th-TH.rc
index c98d1792daf..92bdac769aa 100644
--- a/base/applications/regedit/lang/th-TH.rc
+++ b/base/applications/regedit/lang/th-TH.rc
@@ -136,6 +136,14 @@ BEGIN
MENUITEM "&Copy Key Name", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Expand/Collapse", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Export", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Unload Hive...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/tr-TR.rc
b/base/applications/regedit/lang/tr-TR.rc
index 27cff32c12f..eadfdc5e597 100644
--- a/base/applications/regedit/lang/tr-TR.rc
+++ b/base/applications/regedit/lang/tr-TR.rc
@@ -136,6 +136,14 @@ BEGIN
MENUITEM "&Dizin Yolunu Çoğalt", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "&Genişlet ya da Daralt", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Ver...", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Y&ığını kaldır...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "&Kes", ID_HEXEDIT_CUT
MENUITEM "&Çoğalt", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/uk-UA.rc
b/base/applications/regedit/lang/uk-UA.rc
index 07c62979d3d..2a36942cb5a 100644
--- a/base/applications/regedit/lang/uk-UA.rc
+++ b/base/applications/regedit/lang/uk-UA.rc
@@ -136,6 +136,14 @@ BEGIN
MENUITEM "&Копіювати ім'я розділу", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "Розгорнути/Згорнути", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "&Експорт", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "Вивантажити файл реєстру...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "C&ut", ID_HEXEDIT_CUT
MENUITEM "&Copy", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/zh-CN.rc
b/base/applications/regedit/lang/zh-CN.rc
index 31cce603d91..1c5b784f2b3 100644
--- a/base/applications/regedit/lang/zh-CN.rc
+++ b/base/applications/regedit/lang/zh-CN.rc
@@ -136,6 +136,14 @@ BEGIN
MENUITEM "复制键名(&C)", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "展开/折叠", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "导出(&E)", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "卸载配置单元...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "剪切(&U)", ID_HEXEDIT_CUT
MENUITEM "复制(&C)", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/lang/zh-TW.rc
b/base/applications/regedit/lang/zh-TW.rc
index 0e52abca86e..5aeed75ea02 100644
--- a/base/applications/regedit/lang/zh-TW.rc
+++ b/base/applications/regedit/lang/zh-TW.rc
@@ -137,6 +137,14 @@ BEGIN
MENUITEM "複製項名稱(&C)", ID_EDIT_COPYKEYNAME
END
POPUP ""
+ BEGIN
+ MENUITEM "展開/摺疊", ID_TREE_EXPANDBRANCH
+ MENUITEM SEPARATOR
+ MENUITEM "匯出(&E)", ID_TREE_EXPORT
+ MENUITEM SEPARATOR
+ MENUITEM "解除載入 Hive 控制檔...", ID_REGISTRY_UNLOADHIVE, GRAYED
+ END
+ POPUP ""
BEGIN
MENUITEM "剪下(&U)", ID_HEXEDIT_CUT
MENUITEM "複製(&C)", ID_HEXEDIT_COPY
diff --git a/base/applications/regedit/main.h b/base/applications/regedit/main.h
index 084b62cf304..12ae68cfa3e 100644
--- a/base/applications/regedit/main.h
+++ b/base/applications/regedit/main.h
@@ -35,7 +35,8 @@
#define PM_MODIFYVALUE 0
#define PM_NEW 1
#define PM_TREECONTEXT 2
-#define PM_HEXEDIT 3
+#define PM_ROOTITEM 3
+#define PM_HEXEDIT 4
#define MAX_NEW_KEY_LEN 128