From b926b95a390c8a3b7e1dc9dedf8496fbcb17c4e4 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 15 May 2008 18:02:20 -0700 Subject: [PATCH] shell32: move make new folder error messages into resource files. --- dlls/shell32/brsfolder.c | 10 ++++++++-- dlls/shell32/shell32_En.rc | 2 ++ dlls/shell32/shresdef.h | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c index 06e1b08..139d07e 100644 --- a/dlls/shell32/brsfolder.c +++ b/dlls/shell32/brsfolder.c @@ -640,14 +640,20 @@ static BOOL BrsFolder_MakeNewFolder(browse_info *info) make_new_folder_done: if (error) { + WCHAR wszCaption[256]; + WCHAR wszText[512]; + switch (error) { case 1: - MessageBoxA(info->hWnd, "Unexpected Error.", "Error", MB_OK|MB_ICONEXCLAMATION); + LoadStringW(shell32_hInstance, IDS_CREATEFOLDER_CAPTION, wszCaption, sizeof (wszCaption)/sizeof (wszCaption[0])); + MessageBoxW(info->hWnd, wszCaption, wszCaption, MB_OK|MB_ICONEXCLAMATION); break; case 2: - MessageBoxA(info->hWnd, "You cannot create a new folder here. Choose a different location.", "Invalid location", MB_OK|MB_ICONEXCLAMATION); + LoadStringW(shell32_hInstance, IDS_INVALID_LOCATION_CAPTION, wszCaption, sizeof(wszCaption)/sizeof(wszCaption[0])); + LoadStringW(shell32_hInstance, IDS_INVALID_LOCATION_TEXT, wszText, sizeof(wszText)/sizeof(wszText[0])); + MessageBoxW(info->hWnd, wszText, wszCaption, MB_OK|MB_ICONEXCLAMATION); break; default: diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc index 68263ce..6efc5eb 100644 --- a/dlls/shell32/shell32_En.rc +++ b/dlls/shell32/shell32_En.rc @@ -212,6 +212,8 @@ STRINGTABLE "If the files in the destination folder have the same names as files in the\n"\ "selected folder they will be replaced. Do you still want to move or copy\n"\ "the folder?" + IDS_INVALID_LOCATION_CAPTION "Invalid location" + IDS_INVALID_LOCATION_TEXT "You cannot create a new folder here. Choose a different location." /* message box strings */ IDS_RESTART_TITLE "Restart" diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index 24373b7..fa01b39 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -95,6 +95,8 @@ #define IDS_OVERWRITEFOLDER_TEXT 141 #define IDS_NEWFOLDER 142 +#define IDS_INVALID_LOCATION_CAPTION 143 +#define IDS_INVALID_LOCATION_TEXT 144 #define IDS_LICENSE 256 #define IDS_LICENSE_CAPTION 257 -- 1.5.2.2