[PATCH 6/7] regedit: Update dialog messages related to key and value renaming (v3)
Hugh McMaster
hugh.mcmaster at outlook.com
Wed Feb 1 06:57:20 CST 2017
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/regedit/edit.c | 7 +++++--
programs/regedit/regedit.rc | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/programs/regedit/edit.c b/programs/regedit/edit.c
index bb83fda..48352b3 100644
--- a/programs/regedit/edit.c
+++ b/programs/regedit/edit.c
@@ -493,7 +493,10 @@ BOOL RenameValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR oldName, LPC
return FALSE;
}
/* check if value already exists */
- if (check_value(hwnd, hKey, newName)) goto done;
+ if (check_value(hwnd, hKey, newName)) {
+ error_code_messagebox(hwnd, IDS_VALUE_EXISTS, oldName);
+ goto done;
+ }
value = read_value(hwnd, hKey, oldName, &type, &len);
if(!value) goto done;
lRet = RegSetValueExW(hKey, newName, 0, type, (BYTE*)value, len);
@@ -554,7 +557,7 @@ BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName)
if (disposition == REG_OPENED_EXISTING_KEY)
lRet = ERROR_FILE_EXISTS;
if (lRet != ERROR_SUCCESS) {
- error_code_messagebox(hwnd, IDS_KEY_EXISTS);
+ error_code_messagebox(hwnd, IDS_KEY_EXISTS, srcSubKey);
goto done;
}
diff --git a/programs/regedit/regedit.rc b/programs/regedit/regedit.rc
index 82b1d43..649abfa 100644
--- a/programs/regedit/regedit.rc
+++ b/programs/regedit/regedit.rc
@@ -211,8 +211,8 @@ BEGIN
IDS_SET_VALUE_FAILED "Unable to modify the selected registry value."
IDS_CREATE_KEY_FAILED "Unable to create a new registry key."
IDS_CREATE_VALUE_FAILED "Unable to create a new registry value."
- IDS_KEY_EXISTS "Unable to rename the selected key.\nThe specified key name already exists."
- IDS_VALUE_EXISTS "Unable to rename the selected value.\nThe specified value name already exists."
+ IDS_KEY_EXISTS "Unable to rename the key '%1'.\nThe specified key name already exists."
+ IDS_VALUE_EXISTS "Unable to rename the value '%1'.\nThe specified value name already exists."
IDS_DELETE_KEY_FAILED "Unable to delete the selected registry key."
IDS_RENAME_KEY_FAILED "Unable to rename the selected registry key."
IDS_RENAME_VALUE_FAILED "Unable to rename the selected registry value."
--
2.7.4
More information about the wine-patches
mailing list